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.
Summary
SimpleFunctions should let builders use the SDK and Agent SDK to build full-chain applications and agent swarms:- research markets and theses,
- monitor world, market, and user state,
- propose and execute Kalshi or Polymarket orders,
- manage live intents, fills, orders, positions, and risk.
Product goal
Builders should be able to create:- desk apps that scan, inspect, and place bounded Kalshi or Polymarket orders;
- agent swarms where different agents own research, risk, execution, and reconciliation;
- autonomous loops that can create intents, start or observe runtime, manage orders, and close or cancel exposure;
- audit-ready workflows where every action is traceable and policy-reviewed.
Non-goals
- No unguarded autonomous trading.
- No promise of profitability or investment performance.
- No replacement of venue terms, geography restrictions, credential requirements, or compliance review.
- No SDK dependency on the CLI package.
Safety model
Execution must be supported, but applications need configurable safety valves:maxSideEffect: maximum side-effect class allowed by the agent policy.maxCostEffect: maximum provider/API/venue cost class allowed.trade.maxOrderCostCents: maximum notional per order.trade.maxQuantity: maximum contracts per order.trade.allowedVenues: venue allowlist, such as["kalshi"]or["polymarket"].trade.blockedVenues: explicit venue denylist.trade.requireJurisdiction: require a jurisdiction field before live execution.trade.blockedJurisdictions: jurisdiction denylist for venue-specific compliance safety valves.trade.allowedTickers: optional ticker allowlist.trade.requireLimitPrice: requiremaxPriceorlimitPricefor order-producing tools.trade.allowRuntimeStart: allow SDK runtime orchestration to start or wake a runtime.trade.confirmToken: optional operator-provided token that must matchinput.confirm.
Contract surfaces
Read and research surfaces:world.readmarkets.searchmarkets.screenmarket.inspectmarket.candlesportfolio.stateportfolio.ticks.listportfolio.trades.listintents.list
intents.createintents.getintents.cancel
runtime.statusruntime.ensureexecution.place
live_trade is a side-effect class and compatibility alias for execution.place, not the canonical SDK method name.
SDK requirements
The SDK exposes typed wrappers:Agent SDK requirements
The Agent SDK exposes the same canonical tools:maxSideEffect, maxCostEffect, and trade guardrails explicitly allow it.
Runtime routing
execution.place checks cloud and configured SDK runtime candidates before creating the intent. Hosted cloud status is daemon-aware: a started machine without a live runtime daemon is not treated as executable. If none is running, runtime.ensure starts or wakes one when allowed.
Set runtime: { mode: "none" } only for explicit intent-only workflows.
Routing boundary
- SDK and Agent SDK reads go to the configured SimpleFunctions API base URL. Default:
https://simplefunctions.dev. - Agent SDK tools use the SDK client; they do not shell out to the CLI.
- SDK packages do not depend on CLI packages.
- Local/self-hosted runtimes are plugged in through SDK runtime controllers or an explicit
SF_API_URL.
Verification gates
Before exposing a full-chain workflow to users:- SDK and Agent SDK tests pass.
- Contract manifest maps every tool to side-effect, cost, auth, trace, replay, HTTP, SDK, and Agent metadata.
- Consumer smoke installs published packages from npm.
- Runtime status proves the daemon is live, not only that a machine is started.
- Trading examples use limit prices and policy guardrails.
- Docs show Kalshi and Polymarket as dual-venue surfaces.