Skip to main content
This walkthrough goes from nothing to an executed agent-drafted payment. It assumes an onboarded customer with a funded non-custodial wallet and a Full access API key (or a signed-in team member): creating an agent, actuating an instruction and approving a mandate are not open to an Operate key. See API key scopes.
Steps 1 and 4 can answer 503 with problem type check-unavailable when a status or address-screening check can’t run at that moment. Nothing was created: retry with backoff and the same idempotency key.
Beta — the agentic surface is in early access. Run this walkthrough against the sandbox.

1. Create a hosted payment agent

The agent gets its own signer key, managed by Dakota. That signer is the identity everything else binds to: mandates bind it, scheduled payments fire under it.
Keep signer_public_key — it is what you grant wallet access to next.

2. Grant the agent wallet access

The agent’s signer must be recognized on the funding wallet before anything it drafts can fire. Recognition is signer-group membership, and there are two ways to grant it: Option A — add the agent to a signer group already attached to the wallet (recommended). The agent operates under whatever policy constraints that group already carries. The call below is unsigned, which works while your team does not have governance enforcement on and the group has no governance settings and governs no other group. Otherwise the addition must be signed by the group’s governance: send signatures and signer_group_version too, as in Add Signers to Group.
member_key is the agent’s signer_public_key from step 1.
We plan to make governance enforcement the default for all clients. Today it is off unless Dakota turns it on for your team, so build and test your integration as if it is on. In practice: collect signatures from signer group members for signer group, policy and wallet changes; manage API keys and users from a signed-in session, not with an API key; give your servers Operate keys that pass along those signed changes; and handle insufficient_endorsements and retry 503 responses, such as check_unavailable.
In this quickstart, that changes Option A: sign the member addition, because with governance enforcement on an unsigned addition is refused (400 endorsement_required, or 403 for an Operate key). Two more things change under enforcement:
  • The agent’s key never signs governance. Agent and other Dakota-provisioned keys don’t count towards a group’s quorum, even when they are members, so only your customer’s own keys can approve changes to the group.
  • Adding the agent can raise the group’s default quorum. With enforcement on and no explicit governance_threshold, a group of three or more members needs 2 signatures for governance changes. Adding the agent to a two-person group makes it three members, so later changes to that group need both people’s signatures. Check effective_governance_threshold on the group after the change.
Option B — attach a signer group containing the agent’s signer to the wallet. Changing which groups govern a wallet is a wallet-state mutation, so it must be signed by the wallet’s existing signers — an endorsed request. With governance enforcement on, the attach needs the quorum of every signer group already on the wallet (except Dakota-managed spending groups), each in the same signatures array. A group whose quorum no one can meet, such as one whose only members are agent keys, can’t be attached. wallet_ids on the agent reflects the wallets that currently recognize it.

3. Draft a plan from a prompt

The reply contains conversational text plus zero or more proposals — each a summary and a concrete action series:
Nothing has been created yet — a proposal is a draft your application shows the customer for review. The conversation is stateless on the platform side — the agent keeps no memory between calls. To refine a draft with a follow-up (“make it 12 USDC”, “start in August”), resend the whole conversation so far in messages, in order, with the new turn appended (a prompt alone works only for the first turn, or as shorthand for the latest user message alongside messages). You can also attach an invoice (PDF or image, up to 8 MiB) and ask the agent to draft from it.

4. Accept — turn proposals into real objects

Send the reviewed proposals back verbatim:
Actuation creates the recipient, destination, scheduled payments — and the mandate, in status pending. A failure mid-way rolls back the instruction’s objects (no orphan payees). The response returns each drafted mandate in full wire shape (identical to GET /mandates/{mandate_id}), so your application can put it in front of the customer to sign immediately — no follow-up fetch or polling. GET /instructions/{instruction_id} remains available to audit what an instruction created.

5. The customer signs the mandate

You already hold the pending mandate from step 4’s response. It activates only when a recognized signer other than the agent’s signs its canonical payload — this is the dual-control step that keeps spending authority with the customer:
How to construct signature — the exact payload bytes, canonicalization, and passkey support — is covered in Mandate signing. A passkey approval must come from a real sign-in (navigator.credentials.get() with the user present); otherwise it is a 400.

6. Payments fire on their dates

From here the platform does the rest. On each scheduled date the payment is re-checked against the active mandate (caps, target, asset, validity) and sent through the standard money path. Watch progress either way:
  • Poll: GET /scheduled-payments?status=scheduled,executed,failed — rows come back under data, each carrying its status and, once executed, the covering mandate_id and wallet_transaction_id for audit. Omitting limit returns every match; see paging if you want pages and a total.
  • Webhooks: a success emits the standard wallet.transaction.created; a failure emits scheduled_payment.failed with a machine-readable failure_code. See Agentic webhooks.
If a check the payment needs can’t run when it is due (the customer’s status can’t be read, or the payee address can’t be screened), the payment is held, not failed: it stays scheduled, no event is sent, and it fires on a later run once the check works. A held payment can therefore go out later than its date.

Where this leaves you

One signed mandate now covers the whole monthly series — no re-signing per payment, and the agent still cannot exceed 10 USDC per transaction, once per month, to Alice alone. To grant more, draft more and sign again; to end it, POST /mandates/{mandate_id}/cancel or revoke the agent.