Building an agent with the SDKs and MCP
From a local emulator to a model that can pay for what it uses. A practical walk through the Paxeer X SDKs, the layerx CLI, the agent daemon and the MCP server, and how each layer keeps the agent inside its limits.
Agents8 min read

An agent that handles money needs three things from its tools. It needs a way to act, a set of limits it cannot cross, and evidence for everything it did. Paxeer X builds all three into the developer surface, from the first local run to a model calling paid tools in production.
This post walks through the layers in the order most teams meet them.
Start local
You do not need beta access or a funded account to begin. Paxeer X ships two local paths, and each stands on its own.
- The LayerX emulator. The
layerxCLI provisions a sequencer identity and runs a local gateway on127.0.0.1:9402. It serves the same/v1routes the CLI and SDKs call in a deployment, executes real transitions and signs real receipts. - A four-node chain.
make docker-cluster-startbrings up four Paxeer X chain validators in Docker Compose, with EVM JSON-RPC published from the first node.
Because the emulator signs receipts with its own provisioned key, a local run and a deployed run succeed or fail for the same reasons. Point the CLI at it with layerx environment use emulator and you are working against a real agent domain on your own machine.
Pick your language
Paxeer X ships client SDKs in seven languages: Rust, TypeScript, Python, Go, JVM, .NET and Swift. Two packages cover most work. paxeer-xdk is the network-wide client for joined account reads and unified history. layerx-sdk is the agent-domain client for wallets, budgets, payments and receipts. Both are published for TypeScript and Python.
Every client can verify a receipt locally, without trusting the node that answered. Shared conformance vectors hold all seven to the same canonical wire layout, so a receipt checked in Go and one checked in Python agree byte for byte.
The SDKs are early, and coverage differs by language. Each quickstart page states exactly which calls its package carries, so you can tell before writing code whether a step is reachable in your stack.
The CLI as a workbench
The layerx binary groups its commands into seventeen areas, covering wallets, tokens, keys, identity registration, payments, receipts, programs, the emulator and the agent transports. Add --json to any command for scripting.
It is strict about evidence. Every write is signed locally from the OS keyring or an encrypted file store, its full disclosure is printed before signing, and the result is checked against a receipt bound to the locally computed activity ID. A pending outcome keeps its activity ID so it can be recovered rather than blindly retried. Where no authenticated data exists, the CLI returns a typed unavailable error instead of a guess.
Give the agent a mandate
Before an agent spends unattended, it needs written rules. layerx-agentd is a local daemon that runs beside the agent and evaluates every write against a versioned policy, a bounded capability and a spending limit before the activity is prepared, signed or submitted.
- Policy rules match on activity type, counterparty, asset, amount, purpose and more.
- Capabilities carry seven bounded dimensions: expiry, activity type, counterparty, asset, amount, rate and purpose. None may be left open.
- Spending limits reserve before signing and reconcile afterwards against verified receipts.
- Approval holds queue the exact prepared activity for a person to approve or reject.
Each decision returns an allow or deny with the policy version, the matched rules and a stable reason, and any request can be dry-run through the same path. Underneath, the protocol’s own budgets and session keys remain the hard limit. The daemon adds the operator’s mandate on top.
Hand the model its tools over MCP
The layerx-mcp server gives a model a catalogue of scoped tools: reads such as balances, history and receipts, and writes such as submitting an activity, sending from a wallet or drawing on a grant.
One command registers it with a host:
layerx install mcpsupports Claude Code, Claude Desktop, Cursor and VS Code.- The config it writes carries no bearer token and no gateway key.
- Installation refuses to proceed until the daemon has enrolled.
The server’s authority is fixed at startup from one daemon session. A tool whose scope that session lacks never appears in the list. Every call becomes a daemon invocation and passes the same policy, capability, budget, rate-limit and audit gates as any other request. The MCP server has no write path of its own.
For a model that should only observe, read-only mode drops every write tool at construction. There is nothing to refuse because there is nothing to call.
Agents talking to agents
The same binary serves the agent-to-agent protocol on a loopback endpoint, publishing an agent card and answering task requests. A TypeScript integrations package carries adapters for MCP, A2A, OpenAI, Anthropic, LangChain and the Vercel AI SDK, exposing spend, track and receipt-verification tools to each.
Paying for what it uses
Once the agent can act, it can pay. With 402LXP middleware, a paid API answers HTTP 402, the agent pays inside the request, and the call completes with a signed receipt. The agent package reserves budget before each spend and commits or releases it after, so payment stays inside the limits the owner set.
From local to live
The path is the same at every stage. Build against the emulator. Move to the network when you are ready. The limited beta runs on mainnet with real value, and approved developers receive allocations from the team. There is no public faucet.
Start with the documentation, or read the source on GitHub.
Give your software a wallet.
The limited beta is open to approved developers. Tell us what you are building and we will get you an allocation.