One POST. One human click. A governed Axiru tenant.
External agents discover Axiru via /.well-known/agent.json, call /api/agent/onboard once, and hand the human a single magic link. Workspaces start in shadow mode — the engine evaluates and logs every decision but never blocks until the human flips enforcement on.
agent.json — the canonical machine-readable description.
Served at /.well-known/agent.json with a co-published legacy /.well-known/ai-plugin.json. The block below is rendered from the same builder that powers the well-known route, so the doc you copy and the doc an agent fetches can never drift.
The MCP endpoint advertises protocol_version 2025-03-26 over the streamable-http transport. Auth is bearer with the ak_ prefix; the legacy ai-plugin.json maps the same auth model down to the user_http / bearer pair for older clients.
Pick the intent. The orchestrator does the rest.
Each intent installs a different starter policy pack. Repeated calls with the same idempotency key return the same tenant, so an agent loop never forks workspaces.
intent: "refund_governance"Spin up refund control with shadow mode on. Stripe refund tool calls evaluate against three starter policies (amount caps, customer segment, suspected-fraud signal) before money moves.
intent: "chargeback_review"Stand up dispute-evidence routing in shadow mode. Decisions are logged to the ledger; nothing is submitted automatically until enforcement is turned on.
intent: "subscription_pause_review"Pre-execution review for subscription pause, cancel, and proration tool calls. Currently plumbing only — routes through the policy engine; native dashboard surface is on the roadmap.
intent: "payment_action_governance"General-purpose payment-tool intercept for any rail registered through @axiru/agt-extension. Same engine, same ledger, same policy templates.
intent: "audit_only"No enforcement, no policy install. Just a ledger reader so an external agent can answer questions about historical Stripe activity through MCP.
POST /api/agent/onboard — request and response.
Unauthenticated by design — the endpoint mints shadow-mode-only tenants. Rate-limited to 10 requests per 60 seconds per identifier so a runaway agent loop cannot fork workspaces.
The api_key is returned exactly once. Hand the magic_link straight to the human; the rest goes to the agent loop. human_summary is a one-liner the agent can relay verbatim so the user sees consistent language across providers.
Four steps, every time, in the same order.
The orchestrator lives in @intentledger/agent-core/onboarding. Each step is idempotent and side-effect-injected through an OnboardingHost so Axiru and any sibling service can reuse the engine.
Mint a shadow-mode-only tenant keyed off the contact email + agent id + idempotency key. Repeated calls with the same idempotency key return the same tenant.
Mint a tenant-scoped API key prefixed `ak_`. Stored as a SHA-256 hash; the plaintext is returned exactly once in this response.
Install starter policies for the chosen intent. All start in shadow mode; the engine evaluates and logs decisions but does not block tool calls until enforcement is flipped.
Sign a single-use magic link the human clicks to claim the workspace, complete Stripe Connect, and graduate from shadow mode to enforced.
Shadow mode is the default. Always.
Every workspace minted through /api/agent/onboard starts with policies installed in shadow mode. The engine evaluates every decision and writes to the ledger — but tool calls are not blocked and money does not move until the human clicks the magic link, completes Stripe Connect, and explicitly flips enforcement.
- No silent enforcement. Shadow mode is on for every starter intent, no exceptions.
- No bearer key without a human. The api_key is tenant-scoped and the magic link is the gate to graduate to a real money-moving workspace.
- Idempotent by design. Same idempotency key in, same tenant out — agent loops cannot multiply workspaces.
- Rate-limited fail-closed. The endpoint declines when Redis is unavailable; it never silently skips the limit.
Discoverable. Idempotent. Safe by default.
Three properties every external-agent integration should have. Axiru ships them on day one.
Start in shadow mode first. Move to live enforcement later.