Skip to main content

Step 1: Create Your Agent

Sign in and scaffold a new agent project:
circuit signin
circuit new
The CLI prompts you for a template, a language (TypeScript or Python), and an agent name, then generates a project directory with your agent code, circuit.toml config, and dependencies. Install dependencies and navigate into the project:
cd agent-name && bun install
Your generated agent code looks like this:
from agent_sdk import Agent, AgentContext

def run(agent: AgentContext) -> None:
    agent.log("Hello from my agent!")

agent = Agent(run_function=run)

handler = agent.get_handler()

if __name__ == "__main__":
    agent.run()

Step 2: Test Locally

circuit run
The CLI prompts you to select a wallet, creates a test session, and executes your run function. You should see output like:
✓ Connected to wallet 0x1234...abcd
✓ Session created (mode: manual)
ℹ Running agent...
  Hello from my agent!
✓ Execution complete

Step 3: Publish

circuit publish
If your agent needs API keys or other secrets, create a local .env file before publishing:
YOUR_API_KEY=...
circuit publish reads .env from the agent root, then applies any --env KEY=VALUE overrides, encrypts those values at rest, and injects them into your deployed agent runtime as normal environment variables. For more details, see Publishing → Environment Variables. This uploads your agent to Circuit. Once published, users can find and run it through the Circuit app.