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.
This quickstart gives an agent or developer a working path in five minutes:
- install the CLI
- run a public market query
- pull world state
- inspect one market
- discover the full command manifest
1. Install
npm install -g @spfunctions/cli
Check that the binary is available:
or set an API key:
export SF_API_KEY="sf_..."
export SF_API_URL="https://simplefunctions.dev"
Public market and world-state reads do not require an API key. Account, portfolio, thesis, intent, and exchange-related reads do.
3. Query prediction markets
sf query "Fed rate cut" --json --limit 3
The result should be one JSON document containing normalized Kalshi and Polymarket markets, implied probabilities, related contracts, source context, traditional-market anchors, and next actions.
HTTP equivalent:
curl "https://simplefunctions.dev/api/public/query?q=Fed%20rate%20cut&limit=3"
4. Read world state
sf world --json
sf world --delta --json --since 1h
Use the full snapshot at session start. Use deltas inside a long-running loop.
HTTP equivalents:
curl "https://simplefunctions.dev/api/agent/world"
curl "https://simplefunctions.dev/api/agent/world/delta?since=1h"
5. Inspect a market
sf inspect KXRATECUT-26DEC31 --json
Returns market metadata, price, liquidity, indicators, regime state, related surfaces, and follow-up URLs.
HTTP equivalent:
curl "https://simplefunctions.dev/api/agent/inspect/KXRATECUT-26DEC31"
6. Pull account context
sf me --json --detail --limit 10
sf feed --json --hours 24
sf intent list --json
sf portfolio status --json
sf me returns a bounded boot context. Use sf feed, sf intent list, and sf portfolio ... when the agent needs a narrower user-scoped read.
7. Pull portfolio history
sf portfolio status --json
sf portfolio history --json --ticks 20 --trades 10 --since 2026-04-23
sf portfolio last --json --include handoff
sf portfolio view list --json
sf portfolio strategy list --json
Portfolio reads are scoped to the authenticated user.
Agents should use the manifest to see each command’s args, options, auth requirements, policy tags, side-effect level, and JSON support.
Minimal agent loop
sf describe --all --json
sf world --json
sf query "Fed rate cut" --json --limit 3
sf inspect KXRATECUT-26DEC31 --json
sf world --delta --json --since 1h
If authenticated:
sf feed --json --hours 24
sf portfolio history --json --ticks 20 --trades 10 --since 2026-04-23
sf intent list --json