Reference
SDKs
What each client covers today, and how it is distributed.
The clients are not on public package registries yet, so this page has no install commands. Everything they do is also available over the HTTP API, which works from any language.
TypeScript client
| Area | Coverage |
|---|---|
| Payments | exact (EIP-3009 and Permit2), upto, batch-settlement |
| Policy | Full policy engine, durable budgets with the PostgreSQL store, guarded signer |
| Intents | resolve(), do(intent), operation(), awaitSettlement(), profiles |
| Tools | catalog(), find(), quote(), call(), history() |
| Receipts | Verification with pinned keys, a trust store, or labelled trust on first use |
| Recovery | Operation journal, lost-response retries with the same authorization |
| Approval | approve: confirm each payment after the policy allows it, before signing |
| Integrations | AI SDK and AgentKit packages; LangChain, CrewAI and ElizaOS through MCP; A2A client. See Integrations |
import { TollexClient, TollexTools, usdg, type AgentPolicyProfile } from "@tollex/client";
import { PolicyEngine } from "@tollex/policy";
import { verifyReceipt } from "@tollex/receipts";
const client = new TollexClient({
wallet, // a viem account or a remote signer; the key never leaves it
policy: new PolicyEngine({
id: "research-policy",
agentId: "research-03",
networks: [NETWORK],
assets: [{ network: NETWORK, address: USDG_ADDRESS, decimals: 6 }],
schemes: ["exact"],
maxPerRequest: usdg("0.01"),
budgets: { daily: usdg("5") },
}),
requireReceipt: true,
});
const tollex = new TollexTools(client, TOLLEX_URL);Python client
| Area | Coverage |
|---|---|
| Payments | exact (EIP-3009) |
| Policy | Networks, assets, schemes, per-request maximum, hourly, daily and merchant budgets; optional approval step |
| Intents | resolve(), do(need, input, constraints), operation(), await_settlement(), typed results and errors |
| Tools | catalog(), find(), quote(), call() |
| Receipts | Verification, matching the TypeScript implementation byte for byte |
| Async | AsyncTollexTools |
The TypeScript and Python clients run the same scenarios against one service in the test suite and must agree on every economic outcome.
MCP server
tollex mcp (or tollex-mcp) runs over stdio; hosted deployments serve Streamable HTTP with bearer authentication. By default the server exposes the five operations described in MCP server.
TOLLEX_URL=https://your-tollex-host \
TOLLEX_POLICY_FILE=./policy.json \
TOLLEX_WALLET_KEY_FILE=./payer.key \
tollex mcpThe key is read by the server process and never placed in tool descriptions, results or metadata.