Directory Structure
- TypeScript
- Python
Agent Code
run Function
- TypeScript
- Python
- Signature:
async function run(agent: AgentContext): Promise<void> - Called periodically based on
runtimeIntervalMinutes - Receives
AgentContextwith session data and SDK methods - Returns
void(no return value)
unwind Function
- TypeScript
- Python
- Signature:
async function unwind(agent: AgentContext, positions: CurrentPosition[]): Promise<void> - Called when the agent is unwound
- Optional unwind logic for the provided positions
- Returns
void(no return value)
DESCRIPTION.md
Every agent must include aDESCRIPTION.md file alongside circuit.toml. This Markdown file is displayed to users in the Circuit UI.
circuit.toml
Thecircuit.toml file defines your agent’s metadata, asset requirements, execution settings, and deployment configuration. It must be in the root of your agent directory.
Full Example
Field Reference
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name shown in the Circuit UI (32 characters or less) |
tagline | string | Yes | Brief subtitle shown on agent cards (32 characters or less) |
walletType | string | Yes | "ethereum" or "solana" |
allowedExecutionModes | string[] | Yes | Array of "auto" and/or "manual". First entry is the default for circuit run. |
runtimeIntervalMinutes | number | Yes | How often run() is called (in minutes). Interval starts after previous run completes. |
version | string | Yes | Semver version (major.minor.patch). Auto-bumped on circuit publish if not manually incremented. |
filesToInclude | string[] | No | Extra files/directories to upload (for monorepo setups). Relative paths from agent directory. |
filesToExclude | string[] | No | Files in agent directory to exclude from upload. |
imageUrl | string | No | Agent icon URL. Defaults to "https://cdn.circuit.org/agents/default". |
deploymentRegionOverride | string | No | Override deployment region: "us-east-1" or "eu-central-1". If omitted, uses default. |
[startingAsset] Section
Defines the token a user must hold to start a session.
| Field | Type | Required | Description |
|---|---|---|---|
network | string | Yes | Network identifier (e.g., "ethereum:1", "solana", "hypercore:perp") |
address | string | Yes | Token contract address. For native tokens: "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee" (EVM) or "11111111111111111111111111111111" (Solana). For Hyperliquid perps: "USDC". |
minimumAmount | string | Yes | Minimum balance in raw units (wei, lamports, USDC with 6 decimals for Hyperliquid). |
Common Configurations
EVM agent with ETH on mainnet:Notes
- The
versionfield follows semver. If you don’t increment it beforecircuit publish, the CLI auto-bumps the patch version. filesToIncludepaths are relative to the agent directory. Use../../utilsto include shared code from a monorepo root. See Multi-Agent Monorepo.allowedExecutionModesorder matters — the first entry is used as the execution mode when running locally withcircuit run.
Next Steps
- Execution Model — How sessions and the run loop work
- Multi-Agent Monorepo — Share code across multiple agents