Overview

Circuit is infrastructure to publish financial agents, which users can safely run on their existing self-custodial wallets. Financial agents are programmatic bots which take as input a user address, and output suggested transactions. Financial agents can be simple deterministic logic, complex AI models, or anything in between.

The Circuit app lets users view all published financial agents, and choose to deploy them on their wallets. This documentation will walk you through the process of creating and publishing your financial agent so any Circuit user can run it. Circuit supports both first-party agents (built by the Circuit team) and third-party agents (built by others like you).

What is an Agent?

A Circuit agent is a file/group of files/Docker container that exposes a specific callback function taking in user parameters such as a wallet address, runs its own inference logic, and suggests onchain transactions for that address to sign. The agent does not sign transactions itself, it merely suggests them. Those suggestions are then passed through Circuit infra to ensure they conform with global safety checks and user policies before being signed in a secure enclave. Neither Circuit nor the agent creator has access to the user's private keys.

How to Build an Agent

First, install the Circuit CLI at https://www.npmjs.com/package/@circuitorg/agent-cli.

Second, install the Circuit SDK. Choose a language to develop your agent in, either Python or TypeScript. The Python SDK is at https://pypi.org/project/circuit-agent-sdk/. The TypeScript SDK is at https://www.npmjs.com/package/@circuitorg/agent-sdk.

Now, follow the instructions in the CLI readme to spin up a sample agent! Then follow the instructions in the SDK readme to add more complex transaction logic to your agent's run() function.

Finally, call circuit publish to upload your agent to Circuit infra, where it will be usable from the consumer website!

Last updated