I am an agent
Start with
sf describe --all --json, pull world state, inspect markets, then choose a read, monitor, thesis, or execution workflow.I am a developer
Call REST endpoints from curl, TypeScript, Python, services, dashboards, and agents.
I am evaluating the product
Understand the world model: what it returns, why it is different from a venue API, and how agents consume it.
I am mapping a desk or pod
Start with one capital unit: watchlist, positions, risk, intents, monitoring, ledger, and attribution.
Build With SimpleFunctions
Start with the CLI. Move down the stack only when your integration needs a lower-level surface.
Claude Agent SDK, Codex SDK, and Cursor SDK give an agent file, shell, editor, repo, or conversation control. SimpleFunctions gives that agent a governed prediction-market runtime: world state, market inspection, contract metadata, cost and side-effect gates, trace/replay, and semi-realtime watch inputs.
The quickest path is still CLI-first:
What this manual covers
The contract
Human prose is optional. The structured contract is the product. Every CLI command that supports--json returns one valid JSON document on stdout. Every API page documents the shape that downstream systems should rely on. Agents should not scrape terminal text or rendered UI.
Core surfaces at a glance
How to think about SimpleFunctions
Venue APIs expose markets. Search APIs expose documents. SimpleFunctions returns event probability state:- normalized venue objects
- market-implied probabilities
- source context kept separate from prose
- world-state snapshots and deltas
- account and portfolio memory for authenticated agents
- follow-up actions that point to inspect, screen, monitor, or execution workflows
Recommended reading path
1
Get oriented
Read the Quickstart, run one public query, and inspect one market.
2
Give an agent context
Read World Model and decide when your agent should call full state, delta, query, and inspect.
3
Choose your interface
Use the CLI for local agent workflows or Direct API access for HTTP integration.
4
Choose your workflow
Use Headless agent for external coding agents, Thesis lifecycle for research loops, Trade intents for execution, and Market making for QuoteEngine. Use the Production CLI agent checklist only when promoting unattended jobs.
5
Package one capital unit
Use Desk/pod pilot when the integration target is a desk, pod, agent-owned capital cell, or internal FDE build.
Base URLs
First calls
Where to go next
Agent handoff checklist
Before giving SimpleFunctions to an agent, give it these rules:- Use
sf describe --all --jsonbefore choosing commands. - Prefer
--jsonwhenever a command supports it. - Use
sf world --jsononce at session start. - Use
sf world --delta --json --since 1hinside long-running loops. - Inspect a market before acting on a ticker.
- Treat
nextActionsURLs as follow-up surfaces, not prose to scrape.
Production checklist
For a service, dashboard, or agent runtime:Launch surfaces
Open the terminal
Use the browser workspace for market search, charts, contract context, and operator handoff.
Read the API overview
Use HTTP endpoints when you need stable response shapes for services, agents, and dashboards.
Call the API directly
Start with curl, TypeScript, and Python examples.
Run a headless agent
Use
sf agent --plain --once or the NDJSON tool server from Claude Code, Codex, cron, or CI.