Skip to main content
Download circuit.ts into your app. It runs in browsers, Node 22+ and Bun with no dependencies (it uses fetch and WebCrypto’s X25519, AES-GCM and SHA-256), and it is the same file that Pinewood, Circuit’s hosted demo of a partner app, runs: connect your account there to see the whole integration before writing any code.

A server-side demo

The hosted demo keeps the permit in the browser. server.ts is the same integration with the permit kept on your server instead, for one user: Connect, a balance, a chat that shows what Circuit proposes with Confirm and Dismiss, and Stop on running agents. The permit stays on the server, never in the page. Run it with bun server.ts <your app id> (add staging to use Circuit’s staging), then open http://localhost:4455.
server.ts