# SimpleFunctions > Canonical manual for SimpleFunctions — prediction-market infrastructure for agents, traders, researchers, and institutional workflows. ## Docs - [Agent SDK](https://docs.simplefunctions.dev/agent-sdk/index.md): Use @spfunctions/agent to build Cursor-style market-intelligence agents. - [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): Compact, agent-shaped reads under /api/agent/* — world snapshot, deltas, ticker dossiers, topic feeds. The first three calls every SimpleFunctions agent makes. - [Contract tools](https://docs.simplefunctions.dev/api-reference/contract-tools.md): Strict SDK and Agent contract manifest for canonical SimpleFunctions tools. - [Execution Intents](https://docs.simplefunctions.dev/api-reference/execution-intents.md): Declare, inspect, update, and cancel Kalshi and Polymarket execution intents. - [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, Regime, and Calibration APIs](https://docs.simplefunctions.dev/api-reference/index-regime.md): Market-wide SimpleFunctions Index, regime scans, event calendar, trade ideas, and calibration scorecards. - [API keys + auth API](https://docs.simplefunctions.dev/api-reference/keys.md): Programmatic surfaces for creating, listing, and revoking SimpleFunctions API keys, plus the three-endpoint browser handshake the CLI uses for `sf login`. - [Market Detail](https://docs.simplefunctions.dev/api-reference/market-detail.md): Full profile for one Kalshi or Polymarket ticker — price, orderbook, indicators, regime, cross-venue counterpart, edges, and 7-day history. - [Market Watch panels](https://docs.simplefunctions.dev/api-reference/market-watch.md): User-configurable preset and screen panels on /dashboard2/market-watch — Upstash-cached, per-tier rate-limited dashboard surface. - [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, credential connection, and run endpoints — the same data exposed by sf portfolio. - [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): Create, evolve, evaluate, and publish theses over HTTP. The full thesis-lifecycle surface — create, signal, evaluate, augment, fork, node mutation, positions, strategies, publishing, video. - [Tools, skills, voice](https://docs.simplefunctions.dev/api-reference/tools.md): CLI-first tool discovery, HTTP tool catalog, skill catalog, prompt context, MCP adapter, and the speech-to-text / text-to-speech proxies for voice agents. - [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. - [Desk/pod pilot](https://docs.simplefunctions.dev/build/desk-pod-pilot.md): A focused institutional pilot for prediction-market intelligence, monitoring, risk review, and execution workflows. - [Direct API access](https://docs.simplefunctions.dev/build/direct-api-access.md): Call SimpleFunctions over HTTP from curl, TypeScript, Python, services, and agents. - [Evaluation and replay](https://docs.simplefunctions.dev/build/evaluation-replay.md): Evaluate SimpleFunctions agents, prompts, models, and trading workflows with trace receipts, replay, backtests, and promotion gates. - [Headless agent](https://docs.simplefunctions.dev/build/headless-agent.md): Run the SimpleFunctions agent without a TUI, then let Claude Code or another coding agent drive it through CLI commands or NDJSON tool calls. - [Market making](https://docs.simplefunctions.dev/build/market-making.md): Run QuoteEngine safely with paper mode, inventory limits, spreads, bias, and operational checks. - [Production CLI agent checklist](https://docs.simplefunctions.dev/build/production-agent-runbook.md): Advanced operator checklist for unattended SimpleFunctions CLI agents: doctor checks, boot context, approvals, traces, budgets, and recovery. - [Real-time data cookbook](https://docs.simplefunctions.dev/build/realtime-data-cookbook.md): Tested patterns for using SimpleFunctions live data in agents, dashboards, replay systems, and market-making research. - [Research monitors](https://docs.simplefunctions.dev/build/research-monitors.md): Natural-language research monitors — keep an LLM-driven loop watching a topic, with results delivered to dashboard, webhook, or Telegram. - [Skills](https://docs.simplefunctions.dev/build/skills.md): Agent skills — built-in cognitive guardrails plus user-defined slash commands stored on SimpleFunctions and runnable from any agent. - [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 SimpleFunctions CLI as an agent control plane for prediction-market workflows. - [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): Discover SimpleFunctions CLI commands programmatically. - [Heartbeat](https://docs.simplefunctions.dev/concepts/heartbeat.md): Per-thesis monitoring loop — news scan cadence, social cadence, evaluation model tier, monthly budget, and closed-loop intent behavior. - [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. - [SimpleFunctions 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 ids](https://docs.simplefunctions.dev/concepts/provenance.md): How SimpleFunctions makes async work auditable across requests, monitors, alerts, and portfolio operations. - [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 exports](https://docs.simplefunctions.dev/concepts/snapshots.md): Public HuggingFace datasets and live snapshot endpoints — for offline calibration, replay, and reproducible research on SimpleFunctions market state. - [Agent market monitor](https://docs.simplefunctions.dev/cookbook/agent-market-monitor.md): Build a read-only Agent SDK monitor with strict tools, bounded search, watch inputs, and traceable output. - [Agent trader loop](https://docs.simplefunctions.dev/cookbook/agent-trader-loop.md): Combine deterministic SDK screening, Agent SDK analyst notes, and explicit Kalshi or Polymarket execution policy. - [SDK candle screening loop](https://docs.simplefunctions.dev/cookbook/sdk-candle-screening.md): Build a watchlist-first K-line scanner with the SDK, then hand the ranked packet to an agent or trader. - [SDK execution guardrails](https://docs.simplefunctions.dev/cookbook/sdk-kalshi-execution-guardrails.md): Use SDK runtime and execution primitives with explicit budgets, limit prices, and runtime checks. - [SDK market research loop](https://docs.simplefunctions.dev/cookbook/sdk-market-research-loop.md): Build a read-only TypeScript loop that finds Kalshi markets, inspects candidates, and writes a compact research packet. - [API keys](https://docs.simplefunctions.dev/enterprise/api-keys.md): How SimpleFunctions API keys work — formats, creation, rotation, and revocation. - [Compliance](https://docs.simplefunctions.dev/enterprise/compliance.md): What SimpleFunctions is and isn't from a regulatory standpoint, plus risk and tax disclaimers. - [Data usage](https://docs.simplefunctions.dev/enterprise/data-usage.md): What SimpleFunctions stores, what's 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 and access requests. - [Rate limits](https://docs.simplefunctions.dev/enterprise/rate-limits.md): Verified per-route throttles for the SimpleFunctions APIs, plus the 429 + retry contract. - [Security](https://docs.simplefunctions.dev/enterprise/security.md): Encryption, secrets handling, audit trail, SSRF protections, and how to disclose vulnerabilities. - [Use SimpleFunctions tools from an agent](https://docs.simplefunctions.dev/guides/agent-contract-tools.md): Direct one-shot agent tool calls with stream-json or NDJSON events. - [Agent Runtime](https://docs.simplefunctions.dev/guides/agent-runtime.md): Long-running execution daemon for SimpleFunctions intents — hard + soft triggers, smart-mode LLM evaluation, BYOK exchange credentials, local + cloud runners. - [Build Agents](https://docs.simplefunctions.dev/guides/agents.md): Recommended patterns for agents using SimpleFunctions CLI and APIs — loop, safety classes, headless harness, MCP. - [Authenticated SDK surfaces](https://docs.simplefunctions.dev/guides/authenticated-read-sdk.md): User-scoped SDK wrappers for theses, portfolio, intents, execution, watchlists, and alert rules. - [Authentication](https://docs.simplefunctions.dev/guides/authentication.md): API keys, browser session, BYOK exchange credentials, MCP auth — every flavor and how they fit together. - [Query economic and government data](https://docs.simplefunctions.dev/guides/econ-gov-sdk.md): Use read-only SDK and agent tools for official econ and legislative context. - [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. - [Market candles and K-line screening](https://docs.simplefunctions.dev/guides/market-candles-sdk.md): Use the SDK and Agent SDK to read OHLCV candles across timeframes and rank short-term market moves. - [Discover and inspect markets](https://docs.simplefunctions.dev/guides/market-research-sdk.md): Use the SDK and Agent SDK for read-only prediction-market research, contract inspection, orderbook depth, and candle screening. - [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. - [SDK and Agent quickstart](https://docs.simplefunctions.dev/guides/sdk-agent-quickstart.md): Install the SimpleFunctions SDK and Agent SDK packages and run the first market-intelligence agent. - [SDK overview](https://docs.simplefunctions.dev/guides/sdk-overview.md): TypeScript SDK surfaces mapped to SimpleFunctions contracts. - [Stability and side effects](https://docs.simplefunctions.dev/guides/stability-side-effects.md): How SDK and Agent contract slices classify permissions, side effects, and deferred surfaces. - [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. - [Use the SDK to read world state](https://docs.simplefunctions.dev/guides/world-read-sdk.md): Experimental world.read vertical slice across API, CLI, SDK, agent metadata, and trace output. - [SimpleFunctions Manual](https://docs.simplefunctions.dev/index.md): The canonical manual for SimpleFunctions — CLI, agents, HTTP APIs, real-time data, world model, workflows, and MCP adapter. - [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-SimpleFunctions 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 every user-callable SimpleFunctions surface — REST routes, MCP tools, and CLI namespaces — and what is intentionally not promoted in docs. - [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. - [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): Safe local environment variables for the SimpleFunctions CLI and direct API use. - [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): Full tool list and input schemas for the SimpleFunctions MCP server — 101 tools across market data, world snapshots, regime & contagion analytics, editorial briefings, theses, portfolio, intents, skills, glossary, and the agent forum. - [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, APIs, MCP adapter, 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. - [Agent SDK v1 runtime RFC](https://docs.simplefunctions.dev/rfcs/agent-sdk-v1-runtime-rfc.md): Historical design boundary for the Agent SDK v1 runtime. - [API-key-first governed execution](https://docs.simplefunctions.dev/rfcs/api-key-first-governed-execution.md): RFC for SDK identity, contract metadata, Agent SDK policy, and trace boundaries before implementing @spfunctions/agent. - [SDK and Agent SDK full-chain execution spec](https://docs.simplefunctions.dev/rfcs/sdk-agent-full-chain-execution-spec.md): Contract, SDK, Agent SDK, CLI, and API design for research-to-execution applications and agent swarms. - [SDK and Agent hardening gap plan](https://docs.simplefunctions.dev/rfcs/sdk-agent-hardening-and-gap-plan.md): Current npm package hardening, alert creation idempotency, event identity limits, and execution boundaries. - [SDK and Agent release checklist](https://docs.simplefunctions.dev/rfcs/sdk-agent-release-checklist.md): Release-candidate gates used for SDK and Agent package publication. - [SDK candle and K-line screening spec](https://docs.simplefunctions.dev/rfcs/sdk-candles-kline-screening-spec.md): Product spec for adding trader-style OHLCV candles and multi-timeframe screening to the SDK and Agent SDK. - [TypeScript SDK](https://docs.simplefunctions.dev/sdk/index.md): Install and use the @spfunctions/sdk package. - [SDK and Agent SDK roadmap](https://docs.simplefunctions.dev/sdk/roadmap.md): Current SimpleFunctions SDK, Agent SDK, CLI, API, and contract boundaries after the 1.0 release. - [Agent SDK quickstart](https://docs.simplefunctions.dev/start/agent-sdk-quickstart.md): Install @spfunctions/agent and run the first Cursor-style market-intelligence agent with strict SimpleFunctions tools. - [API quickstart](https://docs.simplefunctions.dev/start/api-quickstart.md): Call SimpleFunctions over HTTP for market search, world state, market inspection, and authenticated portfolio reads. - [CLI quickstart](https://docs.simplefunctions.dev/start/cli-quickstart.md): Install sf, run the first JSON market reads, and discover the command manifest. - [SDK quickstart](https://docs.simplefunctions.dev/start/sdk-quickstart.md): Install @spfunctions/sdk, inspect the strict manifest, read world state, screen markets, and use guarded Kalshi or Polymarket execution primitives. - [Web terminal quickstart](https://docs.simplefunctions.dev/start/web-terminal-quickstart.md): Sign in at app.simplefunctions.dev for Kalshi market search, orderbook, watchlists, positions, P&L, and guarded execution.