/api/agent/* is the agent loop surface: every endpoint is shaped for an LLM context window — fewer fields than the raw /api/public/* reads, with nextActions links so the agent can chain calls. Auth is optional; an authenticated request adds a portfolio overlay where supported.
The canonical loop is:
World snapshot
portfolio.positions, portfolio.exposureByCategory) and stamps each opportunity with alreadyPositioned, currentPositionSize, currentPositionDirection.
Query parameters
Response (json)
World delta
Response shape
- SimpleFunctions Index changes (
indexDelta) - New / dropped market movers (
movers.added,movers.dropped) - Position-level alerts when authenticated
- Resolutions or settlements that occurred in the window
Inspect a ticker
get_world_state (or any Kalshi ticker / Polymarket conditionId). The dossier returns a recommended action and pre-filled nextActions so the agent can chain into intent creation, alert setup, or related-market drill-down without composing URLs by hand.
Auth: none required for the core read. Authenticated callers see position-aware overlays.
Path parameters
Query parameters
Response (json) — structured dossier
suggestion.action is the agent-actionable primitive — five values:
Topic feed
fed_rates, ukraine).
Path parameters
Query parameters
Sub-path routing
sf world <path>:
world shape filtered to the matched scope.
Why /api/agent/* instead of /api/public/*
Same data, different shape:
Token budget guidance
For a 200k-context model running a long loop:- Boot:
get_world_state(full snapshot once) - Loop tick:
get_world_delta?since=1h(30-50 tokens) - Drill:
get_inspect_ticker/{ticker}only when scoring requires depth
sf agent command runs locally.
See also
World model guide
The agent loop pattern and example flows.
World state API
Full parameter list for the
/api/agent/world* family.Direct API access
Auth, base URLs, language examples.
MCP tools
get_world_state, inspect_ticker, get_world_delta over MCP.