Recommended loop
1
Discover tools
sf describe --all --json returns every command with its safety class and JSON shape.2
Pull world state
sf world --json for fresh global context, or sf world --delta --json --since 1h for a long-running agent.3
Query or inspect
sf query for natural-language search, sf inspect <ticker> for a structured market dossier.4
Pull account context
sf me --json --detail if authenticated.5
Decide
Monitor, create an intent, place an order, or wait.
Long-running agents
Use deltas instead of full snapshots so the context window stays small:Safety classes
Agents should treat commands as:Headless mode
sf’s tool surface from your own LLM harness — for example, embed it in a scheduled task, CI job, or another agent runtime.
See Common workflows for a worked example.
MCP
Same tools, different transport. See MCP server for the wire-up.Next steps
JSON contract
CLI envelope shape and exit codes.
Tool manifest
Discover every command programmatically.
CLI command reference
Comprehensive command surface.
Risk gates
Pre-trade safety rails for exchange_write commands.