circuit.toml that users can customize when starting a session. At runtime, the resolved values (defaults merged with any session-level overrides) are available on AgentContext.
How It Works
- Define settings in
circuit.tomlwith types, defaults, and options - Publish — settings are snapshotted with the agent version
- Users customize — when starting a session, users can override defaults
- Access at runtime — your agent reads resolved values via
advancedSettings
Accessing Settings
TheadvancedSettings property is a flat key-value map where each key matches a key from your circuit.toml definition. Values are resolved in order: session override > default value.
Value Types
The value type depends on the setting’stype in circuit.toml:
| Setting Type | Runtime Value Type | Example |
|---|---|---|
text | string | "0.5" |
boolean | boolean | true |
single_select | string | "conservative" |
multi_select | string[] / list[str] | ["uniswap_v3", "curve"] |
End-to-End Example
1. Define incircuit.toml:
Backward Compatibility
- Agents without settings defined:
advancedSettingsis an empty object{} - Old agents receiving new payloads: Extra fields are silently ignored by both SDKs
- New agents on old payloads:
advancedSettingsdefaults to{};getSetting()/get_setting()returnsundefined/None
See Also
circuit.tomlReference — Defining settings- Agent Context — All context properties and methods
- Quick Reference — SDK methods at a glance