Skip to main content

Execution Modes

Declare which modes your agent supports in circuit.toml:
  • auto - Transactions execute immediately when your code calls a transactional SDK method
  • manual - Supported money actions become suggestions that the user must approve in the Circuit UI before they are broadcast. Methods without a suggestion card are rejected.
Manual mode captures only SDK methods backed by a suggestion card: swaps; Polymarket marketOrder and redeemPositions; Hyperliquid placeOrder and deleteOrder; and Kraken placeOrder and cancelOrder. Raw transactions, transfers, signMessage, and any other method without a suggestion card fail instead of executing. For card-backed methods, the same call works in both modes and returns a suggestion envelope when the session is manual. The first entry in the array is the default mode for circuit run when you don’t pass --mode. Manual approvals require Circuit’s hosted suggestion store and approval UI. A fully embedded run rejects a resolved manual mode before authentication, funding, dependency installation, or agent spawn. A --dry-run may keep the agent’s manual branch because it cannot cause effects, but it warns that writes are journaled and approvals are not simulated.

Same Code, Different Behavior

You write the same code regardless of mode. Circuit handles the routing:

Suggestion Lifecycle

In manual mode:
  1. Your agent calls a card-backed method such as placeOrder, marketOrder, swap.execute, redeemPositions, deleteOrder, or cancelOrder
  2. Circuit creates a suggestion visible to the user in the UI
  3. The user approves or ignores the suggestion
  4. If approved, Circuit executes the transaction
  5. At the start of the next run cycle, all unapproved suggestions are automatically cleared

expiresAt

Suggestion-producing methods accept an optional expiresAt parameter (ISO 8601 timestamp). If the user hasn’t approved by this time, the suggestion is discarded. Useful when the transaction is only valid for a limited window (e.g., a quote that expires).

Checking Mode at Runtime

Which Modes to Use

Notes

  • If your agent only supports ["auto"], it cannot be run in manual mode.
  • If your agent only supports ["manual"], every transaction requires user approval.
  • The clearSuggestedTransactions() method lets you manually clear pending suggestions mid-execution. See Suggestions.

See Also