World Model API
~800 tokens of calibrated world state from thousands of prediction markets. Updated every 15 minutes. Inject into any system prompt.
Why this exists
LLMs have no idea what's happening right now. Their training data is months old. Web search gives articles, not structured state. The world model distills real-money prediction markets into a compact snapshot that any agent can consume.
2% → 71% accuracy on world-awareness benchmarks when injected into system prompts.
Full world state
GET /api/agent/world # Optional: focus on a topic for deeper coverage GET /api/agent/world?focus=iran GET /api/agent/world?focus=economy
Returns ~800 tokens of markdown. Covers: geopolitics, economy, energy, elections, crypto, tech, plus divergence alerts (where markets disagree with consensus).
No auth required. Rate limit: 60/min.
Incremental delta
GET /api/agent/world/delta?since=1h GET /api/agent/world/delta?since=30m GET /api/agent/world/delta?since=2026-04-04T10:00:00Z
Returns only what changed since the given time. ~30-50 tokens. Much cheaper than full state for polling. Use this when your agent needs to check "what's new?" without re-reading the entire world state.
SF Prediction Market Index
GET /api/public/index
{
"disagreement": 57, // 0-100, median per-ticker realized vol (last hour)
"geoRisk": 35, // 0-100, theater-equal weighted curated basket (signed)
"breadth": +0.33, // -1 to +1, up/down skew of |24h Δ| ≥ 10c
"activity": 83, // 0-100, percentile rank vs trailing 30d windows
"components": { ... } // raw inputs (geo_level, geo_delta, geo_vol, etc.)
}Four numbers that summarize the entire prediction market landscape. Useful for regime detection, portfolio sizing, and alerting.
Usage patterns
Inject into system prompt
const world = await fetch('https://simplefunctions.dev/api/agent/world')
const worldState = await world.text()
const systemPrompt = `You are a trading assistant.
## Current world state
${worldState}
## Instructions
...`Poll for changes
// Check every 15 minutes
const delta = await fetch(
'https://simplefunctions.dev/api/agent/world/delta?since=15m'
).then(r => r.text())
if (delta.trim()) {
// Something changed — inject into next agent turn
agent.addContext(delta)
}RSS feed
GET /api/agent/world/feed # Atom/RSS feed of world state updates
Related endpoints
| Endpoint | Description |
|---|---|
| /api/public/contagion | Cross-market contagion: which connected markets should move but haven't? |
| /api/public/diff | Market derivatives: price/volume/spread/depth deltas + divergence signals |
| /api/public/briefing | Daily topic briefing: what changed, why it matters, sentiment, outlook |
| /api/changes | Server-side market change detection (every 15 min) |