Skip to main content
This is the primary manual for SimpleFunctions. Use it when you need to install the CLI, build an agent loop, call an HTTP endpoint, inspect response shapes, stream real-time data, run thesis workflows, wire MCP-compatible clients, or give another agent a precise surface map. The complete documentation index is available at https://docs.simplefunctions.dev/llms.txt. Agents should fetch that index first, then open the focused pages they need instead of scraping rendered UI.

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
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:
  1. Use sf describe --all --json before choosing commands.
  2. Prefer --json whenever a command supports it.
  3. Use sf world --json once at session start.
  4. Use sf world --delta --json --since 1h inside long-running loops.
  5. Inspect a market before acting on a ticker.
  6. Treat nextActions URLs 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.