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.
These five recipes cover what most users actually do.
1. Research a market and build a thesis
# 1. Find candidate markets
sf query "Will the Fed cut rates by July?" --json --limit 5
# 2. Inspect the most interesting one
sf inspect KXFEDRATE-26JUL --json
# 3. Build a thesis
sf create "Fed cuts rates by July driven by jobs softening + CPI ≤ 2.5%"
# 4. Pull thesis context
sf context <thesis-id> --json
# 5. Inject a signal
sf signal <thesis-id> "NFP came in 50K below consensus"
# 6. Trigger evaluation
sf evaluate <thesis-id>
See Thesis lifecycle for the full conceptual model.
2. Set up watch + webhook delivery
# 1. Add to watchlist
sf watchlist add KXRATECUT-26DEC31
# 2. Register webhook receiver
sf webhooks create --url https://your.app/sf-hook --label ops
# → returns webhook id we_... and secret
# 3. Create alert
sf alerts create \
--object <watched-object-id> \
--condition price_above \
--threshold 65 \
--channel webhook \
--endpoint <webhook-endpoint-id>
# 4. Test fire
sf alerts test <alert-id>
See Watchlist + alerts and Webhook receiver.
3. Run portfolio autopilot in the cloud (BYOK)
# 1. Configure local Kalshi keys
sf setup # walks through Kalshi key + Polymarket wallet
# 2. Enable cloud manager
sf portfolio enable
# → walks through encryption + upload + cron + execution mode + strategies
# 3. Set strategies / views (optional)
sf portfolio strategy add "Fed thesis" "Long YES on Fed cut markets when IY > 30%"
sf portfolio view add "Recession 2026" "Soft landing more likely than hard" --conviction 4
# 4. Trigger first tick
sf portfolio trigger
# 5. Watch
sf portfolio status --json
sf portfolio history --json --ticks 10
See Portfolio autopilot and Risk gates.
4. Run an agent harness (headless)
# Spawn sf in headless mode and pipe NDJSON in/out
sf agent --headless < your-tool-calls.ndjson > output.ndjson
Or wire into your own LLM loop:
import subprocess, json
proc = subprocess.Popen(
['sf', 'agent', '--headless'],
stdin=subprocess.PIPE, stdout=subprocess.PIPE
)
# Send a tool call
proc.stdin.write(json.dumps({
'tool_call_id': 'tc_1',
'tool_name': 'query',
'arguments': { 'q': 'Fed rate cut', 'limit': 3 }
}).encode() + b'\n')
proc.stdin.flush()
# Read result
result = json.loads(proc.stdout.readline())
print(result)
See Build agents.
5. Embed live odds in your site
<iframe
src="https://simplefunctions.dev/embed/KXRATECUT-26DEC31"
width="320" height="220"
loading="lazy"
style="border: 0; border-radius: 8px;"
></iframe>
Or with the embed.js helper:
<div data-sf-embed="KXRATECUT-26DEC31"></div>
<script src="https://simplefunctions.dev/embed.js" async></script>
See Embed widget.
See also
CLI command reference
Every sf command.
API overview
All HTTP endpoints.
Thesis lifecycle
The full thesis conceptual model.