What is agent registration?
Agent registration creates a new identity in Mandate and returns two credentials: aruntimeKey for API authentication and a claimUrl for the wallet owner. The runtime key is a bearer token (prefixed mndt_test_ or mndt_live_) that your agent includes in every subsequent API call. The claim URL is a one-time link the wallet owner visits to connect the agent to their dashboard, where they configure policies, approve transactions, and view the audit log.
Registration is the only unauthenticated endpoint in the Mandate API. Every other operation requires the runtime key. You run registration once per agent, store the key securely, and share the claim URL with the person who controls the wallet. No private keys are involved at any point in this process.
How do you register an agent?
Use the SDK, CLI, or raw HTTP. All three methods hit the samePOST /api/agents/register endpoint and return the same response.
Registration parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Human-readable agent name, displayed in the dashboard |
evmAddress | 0x${string} | Yes | The agent’s wallet address on the target chain |
chainId | number | Yes | Target chain ID (e.g. 84532 for Base Sepolia) |
defaultPolicy | object | No | Initial spend limits in USD |
Response
How should you store credentials?
The runtime key is the only secret your agent needs. Treat it like a database password. SDK and curl users: save the key to a.env file with restricted permissions.
login command writes credentials automatically to ~/.mandate/credentials.json with 0600 permissions. All subsequent CLI commands read this file.
How does the wallet owner claim the agent?
TheclaimUrl is a one-time link. Share it with the person who owns the wallet. When they visit the URL:
- They sign in with GitHub (or their existing dashboard account).
- The agent appears in their Agents page.
- They can configure policies, set approval thresholds, and view the audit log.
Claiming is not required for the agent to function. An unclaimed agent validates transactions normally using the default policy. Claiming gives the wallet owner visibility and control.
What is the default policy?
Every new agent starts with a default policy. If you do not specifydefaultPolicy during registration, these values apply:
| Rule | Default value |
|---|---|
| Per-transaction limit | $100 USD |
| Daily limit | $1,000 USD |
| Monthly limit | None |
| Address restrictions | None (any recipient allowed) |
| Approval required | No |
| Schedule | 24/7 |
| Circuit breaker | Off |
What happens after registration?
With the runtime key stored, your agent is ready to validate transactions. The typical next step is callingclient.validate() before every transaction to check it against the policy engine’s 14 sequential rules. If validation passes, the agent signs locally and broadcasts. If it fails, the agent receives a typed error with a specific block reason.
Next Steps
Validate Transactions
Check every transaction against the policy engine before signing.
Policy Builder
Configure spend limits, allowlists, and approval thresholds in the dashboard.
CLI Login Reference
Full flag reference for the login command.
Credential Management
Best practices for storing, rotating, and revoking runtime keys.