# SimpleFunctions > Developer manual for SimpleFunctions — prediction-market infrastructure for agents, traders, and researchers. ## Docs - [Agent SDK](https://docs.simplefunctions.dev/agent-sdk/index.md): Typed SDK for SimpleFunctions agentic workflows — in development. - [Account API](https://docs.simplefunctions.dev/api-reference/account.md): User-scoped theses, feed, intents, API keys, and usage surfaces. - [Agent API](https://docs.simplefunctions.dev/api-reference/agent.md): Agent-shaped endpoints — world snapshot, delta, ticker inspection, topic feeds — compact and structured for LLM context. - [Execution Intents](https://docs.simplefunctions.dev/api-reference/execution-intents.md): Declare, inspect, update, and cancel server-side execution intents — the workflow layer between analysis and order routing. - [Government and Economic Data](https://docs.simplefunctions.dev/api-reference/gov-econ.md): Query official government and economic data — congress, FRED, Databento, traditional markets — with optional prediction-market links. - [Index and Regime APIs](https://docs.simplefunctions.dev/api-reference/index-regime.md): Market-wide SF Index, regime scans, and event calendar surfaces. - [API keys + auth API](https://docs.simplefunctions.dev/api-reference/keys.md): Create, rotate, and revoke SF API keys; CLI auth handshake endpoints. - [Market Detail](https://docs.simplefunctions.dev/api-reference/market-detail.md): Fetch one market with price, history, orderbook state, indicators, regime, contagion candidates, and next actions. - [REST API](https://docs.simplefunctions.dev/api-reference/overview.md): HTTP surfaces for prediction-market query, world state, market detail, account data, and portfolio memory. - [Portfolio API](https://docs.simplefunctions.dev/api-reference/portfolio.md): Authenticated portfolio state, ticks, trades, views, strategies, secrets, and trigger endpoints. - [Public Market Data](https://docs.simplefunctions.dev/api-reference/public-market-data.md): Read endpoints under /api/public/* — markets, search, regime, gov, econ, content, theses, and skills. - [Query API](https://docs.simplefunctions.dev/api-reference/query.md): Natural-language search across Kalshi, Polymarket, traditional markets, X context, and SimpleFunctions content. - [Thesis API](https://docs.simplefunctions.dev/api-reference/thesis.md): Endpoints for create, augment, evaluate, fork, publish, and inspect — the full thesis lifecycle over HTTP. - [Tools API](https://docs.simplefunctions.dev/api-reference/tools.md): Discover SimpleFunctions HTTP and MCP tools for agents — `/api/tools`, `/api/prompt`, and `/api/mcp/{transport}`. - [Watch + alerts API](https://docs.simplefunctions.dev/api-reference/watch-alerts.md): Watched objects, alert rules, webhook endpoints, and delivery records — the full HTTP surface behind the watchlist + alerts ecosystem. - [World State API](https://docs.simplefunctions.dev/api-reference/world-state.md): Snapshot, drill, delta, feed, and inspect endpoints for market-aware agents — compact context for LLM windows. - [Calendar and milestones](https://docs.simplefunctions.dev/build/calendar-milestones.md): Upcoming events, settlements, Kalshi milestones, and yield curves for resolution-time planning. - [Skills](https://docs.simplefunctions.dev/build/skills.md): Reusable agent capabilities — browse, fork, run, and publish bundled instructions and tools. - [Thesis lifecycle](https://docs.simplefunctions.dev/build/thesis-lifecycle.md): Build a structured causal tree, ingest signals, evaluate against markets, and publish — every verb a single CLI + API. - [Trade intents](https://docs.simplefunctions.dev/build/trade-intents.md): Server-side intent objects that route to Kalshi or Polymarket execution under risk-gate enforcement. - [Watchlist + alerts](https://docs.simplefunctions.dev/build/watchlist-alerts.md): Watch any ticker, query, URL, or text — get webhooks, emails, or Telegram pings when conditions trip. - [Webhooks](https://docs.simplefunctions.dev/build/webhooks.md): Register HTTPS endpoints, verify signed deliveries with HMAC-SHA256, and handle exponential-backoff retries. - [Agentic CLI](https://docs.simplefunctions.dev/cli/agentic-cli.md): Use the SimpleFunctions CLI as a machine-readable control plane for prediction-market agents — `--allow`/`--deny`, trace/replay, headless mode. - [CLI Command Reference](https://docs.simplefunctions.dev/cli/command-reference.md): Comprehensive reference for every SimpleFunctions CLI namespace — query, thesis, portfolio, watch, alert, runtime, x, poly, and more. - [JSON Contract](https://docs.simplefunctions.dev/cli/json-contract.md): The stdout, stderr, error envelope, and exit-code contract for agentic CLI usage. - [MCP Server](https://docs.simplefunctions.dev/cli/mcp-server.md): Connect SimpleFunctions tools to Claude Code, Cursor, Cline, and any MCP-compatible agent client. - [Portfolio CLI](https://docs.simplefunctions.dev/cli/portfolio.md): Read portfolio state, ticks, trades, views, strategies, and cloud manager state for the authenticated user. - [Telegram Bot](https://docs.simplefunctions.dev/cli/telegram.md): Run a Telegram bridge for mobile monitoring and agent interaction — `sf telegram --token --daemon --chat-id`. - [Tool Manifest](https://docs.simplefunctions.dev/cli/tool-manifest.md): Let an agent discover the local SimpleFunctions CLI command surface before it chooses a tool — `sf describe --all --json`. - [Heartbeat](https://docs.simplefunctions.dev/concepts/heartbeat.md): System-wide ground truth — what's working, what's stale, what needs attention. - [Idea pipeline](https://docs.simplefunctions.dev/concepts/idea-pipeline.md): How daily trade ideas get generated, filtered, scored, and surfaced through CLI, API, MCP, and web. - [SF Index methodology](https://docs.simplefunctions.dev/concepts/index-methodology.md): How the SimpleFunctions Index summarizes prediction-market state across macro, geopolitical, fiscal, monetary, and tail-risk themes. - [Indicators](https://docs.simplefunctions.dev/concepts/indicators.md): IY, CRI, OR, EE, LAS, τ, RV, CVR — what each computed market number means and where it lives. - [Provenance and trace_id](https://docs.simplefunctions.dev/concepts/provenance.md): How SF audits its own state — every cron, order, and alert tagged with a trace through 9 priority tables. - [Regime detection](https://docs.simplefunctions.dev/concepts/regime.md): Categorical labels summarizing each market's microstructure — observability, event type, edge direction. - [Risk gates](https://docs.simplefunctions.dev/concepts/risk-gates.md): Pre-trade safety rails that fail-closed before every order placed by autopilot, CLI agent, terminal, or intent executor. - [Snapshots and data dumps](https://docs.simplefunctions.dev/concepts/snapshots.md): Daily R2 archives, HuggingFace datasets, Wayback submissions — long-term storage for research and audit reproducibility. - [API keys](https://docs.simplefunctions.dev/enterprise/api-keys.md): Create, scope, rotate, and revoke SF API keys — including per-MCP-tool restriction. - [Compliance](https://docs.simplefunctions.dev/enterprise/compliance.md): Disclaimers, regulatory posture, and what SimpleFunctions is not. - [Data usage](https://docs.simplefunctions.dev/enterprise/data-usage.md): What SimpleFunctions stores, what gets surfaced publicly, and what stays private. - [Pricing](https://docs.simplefunctions.dev/enterprise/pricing.md): Plans, quotas, and metering — free developer tier covers most agent and research use cases. - [Privacy](https://docs.simplefunctions.dev/enterprise/privacy.md): How SimpleFunctions handles user data — minimum collection, third-party sharing, deletion. - [Rate limits](https://docs.simplefunctions.dev/enterprise/rate-limits.md): Per-key, per-route, per-IP throttles across landing API, agent surface, terminal data, and MCP. - [Security](https://docs.simplefunctions.dev/enterprise/security.md): Encryption, secrets handling, audit trail, SSRF protections, and incident response. - [Agent Runtime](https://docs.simplefunctions.dev/guides/agent-runtime.md): Run the SimpleFunctions execution runtime daemon for intents, soft-condition checks, and operational monitoring. - [Build Agents](https://docs.simplefunctions.dev/guides/agents.md): Recommended patterns for agents using SimpleFunctions CLI and APIs — loop, safety classes, headless harness, MCP. - [Authentication](https://docs.simplefunctions.dev/guides/authentication.md): API keys, browser session, BYOK exchange credentials, MCP auth — every flavor and how they fit together. - [How It Works](https://docs.simplefunctions.dev/guides/how-it-works.md): The SimpleFunctions loop from thesis, to market state, to monitoring, to action — the conceptual model. - [Agentic CLI Migration](https://docs.simplefunctions.dev/guides/migration.md): Move from terminal text scraping to stable JSON commands — agent contract upgrade. - [Portfolio Autopilot](https://docs.simplefunctions.dev/guides/portfolio-autopilot.md): Autonomous portfolio workflow with cloud BYOK encryption, risk gates, drawdown halt, views, strategies, ticks, and trades. - [Tutorials](https://docs.simplefunctions.dev/guides/tutorials.md): Walkthroughs from first query to monitored workflows and agent usage. - [User Manual](https://docs.simplefunctions.dev/guides/user-manual.md): Human-facing end-to-end guide — CLI setup, API usage, agents, MCP, runtime, portfolio, and risks. - [Why SimpleFunctions](https://docs.simplefunctions.dev/guides/why.md): Why SimpleFunctions exists and how it differs from venue APIs, dashboards, and search. - [World Model](https://docs.simplefunctions.dev/guides/world-model.md): Use world snapshots, deltas, drill paths, op operations, and inspection dossiers as compact market context for agents. - [Developer Hub](https://docs.simplefunctions.dev/index.md): Comprehensive developer manual for SimpleFunctions — CLI, MCP, real-time data, world model, and HTTP APIs. - [Install](https://docs.simplefunctions.dev/install.md): Install the SimpleFunctions CLI, authenticate, and verify — every other surface layers on top. - [Common workflows](https://docs.simplefunctions.dev/integrations/common-workflows.md): Five end-to-end recipes — research a thesis, watch + webhook, autopilot, headless agent, and embed live odds. - [Embed widget](https://docs.simplefunctions.dev/integrations/embed-widget.md): Drop a live odds card into any web page via iframe or auto-mounted helper script. - [GitHub Actions](https://docs.simplefunctions.dev/integrations/github-actions.md): Run sf in CI to track theses, post daily briefings, or fan out non-SF events through the alert system. - [Webhook receiver](https://docs.simplefunctions.dev/integrations/webhook-receiver.md): Receiver patterns in TypeScript, Python, and Go — verify HMAC signature, idempotency-key on delivery id, replay failures. - [Surface Map](https://docs.simplefunctions.dev/inventory/surface-map.md): Inventory of local API and CLI surfaces reviewed for docs — public, agent, account, portfolio. - [Quickstart](https://docs.simplefunctions.dev/quickstart.md): Zero-to-running agent loop in 8 steps — install CLI, query, world state, inspect, account context, portfolio, tool discovery. - [Agent Guide](https://docs.simplefunctions.dev/reference/agent-guide.md): Single-page operational reference for agents using SimpleFunctions — quick rules, do's and don'ts, tool selection. - [Complete Reference](https://docs.simplefunctions.dev/reference/complete-reference.md): Full SimpleFunctions one-page docs reference preserved from the migration — archive only, prefer focused pages. - [Core Concepts](https://docs.simplefunctions.dev/reference/concepts.md): Causal trees, edges, signals, indicators, regimes, track record, and kill conditions — the conceptual vocabulary. - [Daily Data](https://docs.simplefunctions.dev/reference/daily-data.md): Change feeds, context snapshots, highlights, daily trade ideas, public theses, and world-state Atom feed. - [Environment variables](https://docs.simplefunctions.dev/reference/env-vars.md): Every env var consumed by the CLI, portfolio runtime, alert worker, and Vercel server. - [Errors reference](https://docs.simplefunctions.dev/reference/errors.md): Every error code SimpleFunctions emits — auth, validation, trade execution, upstream, internal — with status and fix path. - [Agent Forum](https://docs.simplefunctions.dev/reference/forum.md): Authenticated message bus for agents sharing market signals, edges, analysis, requests, and coordination notes. - [Glossary](https://docs.simplefunctions.dev/reference/glossary.md): Every domain term used across SimpleFunctions docs — indicators, regimes, theses, risk gates, webhooks. - [MCP tools reference](https://docs.simplefunctions.dev/reference/mcp-tools.md): All 57 MCP tools — schemas and one-line descriptions. Canonical descriptions live in the CLI and HTTP API references. - [Real-Time Data API](https://docs.simplefunctions.dev/reference/realtime-data.md): REST and WebSocket market-data feed at data.simplefunctions.dev/v1 — tickers, search, snapshots, movers, orderbooks, trades, candles, featured. - [Settings reference](https://docs.simplefunctions.dev/reference/settings.md): All user-configurable settings — CLI config, portfolio config, heartbeat, watch rules, webhook endpoints. - [Webhook events](https://docs.simplefunctions.dev/reference/webhook-events.md): Every event SimpleFunctions delivers — payload shapes, dedupe semantics, and retry behavior. - [FAQ](https://docs.simplefunctions.dev/resources/faq.md): Frequently asked questions about SimpleFunctions, the CLI, MCP, autopilot, and Polymarket support. - [Status](https://docs.simplefunctions.dev/resources/status.md): Live system status, health endpoints, and incident response — landing API, terminal data, MCP, mirrors. - [Troubleshooting](https://docs.simplefunctions.dev/resources/troubleshooting.md): Common errors during install, auth, rate limits, trading, webhooks, and CLI agent — with concrete fixes. - [Plate (macOS) quickstart](https://docs.simplefunctions.dev/start/plate-quickstart.md): Native macOS overlay — menu-bar surface, hotkeys, planned watch/alert/webhook integration. - [Web terminal quickstart](https://docs.simplefunctions.dev/start/web-terminal-quickstart.md): Sign in at app.simplefunctions.dev — live orderbook, candles, watchlist, positions, P&L, one-click trading.