Circuit-Partner-Version: 0.1. Calls after connecting also send the user’s permit as Authorization: Bearer <permit>. Build against https://api.circuit.org with paper money; see Test with paper money.
1
Add the client
Download
circuit.ts into your app. It has no dependencies and runs in browsers, Node 22+ and Bun. The curl tabs show the same calls without it.2
Connect a user
Start a connection, open its The user signs in, picks wallets and approves with their passkey. Circuit then sends them to your
url in a real browser, and wait for the permit. The client generates the key pair, polls, and decrypts the permit for you.Response
returnUrl. The permit lasts 30 days.3
Read the account
Response
4
Send a message
Pick a UUID per conversation and one per message. Reuse the message id if you retry; a retry never acts twice. Then poll the conversation until
retryAfterMs is null.Response (one turn)
5
Confirm the action
Offer what The answer is the action, now
decisions lists, and nothing else.pending and then done. Poll the conversation to follow it.6
Run and stop agents
Start an agent by asking: “Start Funding Fade with $1,000 of paper money”. Ask proposes the start as an action to confirm. Stop it with the controls the agent lists.
Next
- Concepts: permits, polling, ids, errors and versions.
- API reference: every route and field.
- Reference client: the client’s source and a server-side example.