The SF CLI is designed to be driven by an LLM. The recommended loop, the tool classifications, and the JSON contract all assume an agent — not a human — is the primary caller.Documentation Index
Fetch the complete documentation index at: https://docs.simplefunctions.dev/llms.txt
Use this file to discover all available pages before exploring further.
Recommended loop
Pull world state
sf world --json for fresh global context, or sf world --delta --json --since 1h for a long-running agent.Query or inspect
sf query for natural-language search, sf inspect <ticker> for a structured market dossier.Long-running agents
Use deltas instead of full snapshots so the context window stays small:Safety classes
Agents should treat commands as:| Class | Meaning |
|---|---|
safe_read | Public read-only. No auth required. Always safe to call. |
account_read | Authenticated read-only. Returns user-scoped data. Safe to call. |
server_write | Mutates SimpleFunctions server state (creates intents, theses, alerts). Reversible. |
local_runtime | Starts/stops a local process (e.g. sf agent). Side-effects on the local box only. |
exchange_write | Can place or cancel orders on Kalshi or Polymarket. Real money. |
Headless mode
sf’s tool surface from your own LLM harness — for example, embed it in a Trigger.dev task 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.