For the complete documentation index, see llms.txt. This page is also available as Markdown.

Let an External Agent In

Create a headless agent or register an MCP agent with tenant-scoped credentials.

This page is optional for headless integrations.

Goal: give an external agent a tenant-scoped credential while keeping it behind RobotMoney's authentication, policy, and audit controls.

Choose the Agent Path

Use POST /v1/agents for headless HTTP agents that need to request authorization decisions. The owner session receives a one-time brain_ak_ key, and the agent exchanges it at /token for a five-minute JWT with payment_intent:propose.

Use POST /v1/execution/agents/register for MCP agents that need the MCP tool surface and on-chain scope attestation.

Create a Headless Agent

const agent = await brain.agents.create({
  kind: "tenant",
  name: "Vendor Assistant",
  purpose: "Request authorization decisions before using customer-owned rails.",
  autonomy_preset: "ask_always",
});

console.log(agent.agent.id, agent.api_key_once, agent.exchange.token_endpoint);

Store api_key_once once, exchange it for an access token, and call POST /v1/authorizations with execution: "external". The agent can receive an approved, needs-review, or blocked decision. It cannot execute money.

Register an MCP Agent

The MCP registration route requires an agent identifier, role, and display name. The SDK calls that route.

The optional scope_hash, onchain_address, and registered_tx fields are the only optional registration fields in the current public request shape.

Available Agent Scopes

A headless tenant agent uses payment_intent:propose for authorization decisions and never receives execute scope.

An MCP agent can hold these canonical scopes: ledger:read, wiki:read, raw:read, raw:write, payment_intent:propose, and execution:propose. There is no public SDK grantScope or revoke method today. Scope issuance for MCP agents is controlled by the registered-agent flow.

External agents can propose but cannot execute money movement. Execution remains inside the PaymentIntent lifecycle and passes the section 6 gate.

Connect to MCP

The MCP server shares the API host. Production and staging use these endpoints:

The agent authenticates with its tenant-scoped JWT. Tool discovery returns only the tools the principal's scopes allow.

Ask a Grounded Question

The authenticated JWT supplies the tenant. Do not include a tenant identifier in the tool arguments.

wiki.question accepts question, optional as_of, and optional max_evidence_depth.

Review Agent Activity

Halt and Restore a Registered Agent

The current SDK exposes operational controls rather than per-scope mutation.

Both operations require payment_intent:approve. Restoring an agent does not resume payment intents paused by its earlier halt.

What's Next

Last updated