Current state
| Surface | Current status | Use it for |
|---|---|---|
| HTTP API | Public raw network surface | Language-neutral access to SimpleFunctions endpoints |
| CLI | Published operator and automation surface | Terminal workflows, local agent loop, headless mode, daemon/runtime controls |
/api/contracts/tools | Strict SDK/Agent contract truth | Canonical tool names, auth, access, sideEffect, costEffect, replay metadata |
/api/tools | Broad hosted compatibility inventory | HTTP-native and MCP compatibility discovery |
@spfunctions/sdk | Published stable, 1.0.1 | Typed data, contract client, and governed Kalshi or Polymarket execution primitives for TypeScript |
@spfunctions/agent/v1 | Published stable, 1.0.2 | Cursor-style market agent loop, watch primitives, sessions, hooks, strict tools, and policy-gated execution |
| Low-level direct runner | Included in @spfunctions/agent | Deterministic canonical tool calls, local trace, and replay harnesses |
Which surface should I use?
Use the HTTP API if:- you are not writing TypeScript
- you need direct control over requests and response handling
- you are integrating from a service that already owns auth, retries, and error mapping
- a human, shell script, CI job, or coding agent is operating from a terminal
- you want the richer
sf agentlocal loop - you need headless NDJSON tooling
- you need local runtime controls such as
sf runtime
- you are writing TypeScript
- you want typed reads and stable resource objects
- you want API-key-first client behavior
- you want strict manifest inspection through
sf.manifest.* - you need K-line/OHLCV candle reads and watchlist-first screening through
sf.markets.candles()andsf.markets.screenCandles() - you need Kalshi or Polymarket
execution.place, runtime orchestration, and intent management with explicit auth
- you already have an application, worker, or agent harness
- you want a Cursor-style
Agent.create().send().stream()lifecycle - you want SimpleFunctions strict tools mounted into a model loop
- you need policy hooks,
sideEffect,costEffect, sessions, watch inputs, local trace, and replay - you want to compose research, monitoring, execution, and management agents behind configurable safety valves
What is not shipped
These are not shipped as stable SDK/Agent capabilities:- GA semver compatibility
- browser runtime or long-lived browser API keys
- MCP runtime inside the Agent SDK
events.*market.relatedsemantic graphauth.statusinvestigations.createintents.proposewebhooks.create
runtime.status and runtime.ensure are canonical SDK methods for runtime readiness. live_trade is a side-effect class and compatibility alias for execution.place; it is not a canonical SDK method.
Tool truth hierarchy
For SDK and Agent SDK work, use this hierarchy:| Source | Meaning |
|---|---|
GET /api/contracts/tools | Strict SDK/Agent contract truth |
sf describe --all --json | Local installed CLI command manifest |
GET /api/tools | Broad hosted compatibility inventory |
| MCP tools | Adapter inventory for MCP-compatible clients |
/api/tools or MCP names as SDK/Agent canonical names.
For example:
Roadmap
The current sequence is:- Keep the current stable SDK and Agent SDK versions pinned in examples and customer projects.
- Keep execution expansion contract-first through
/api/contracts/tools. - Harden watch/model-loop/execution examples against real production workloads.
- Add public support, rate-limit, and error-handling commitments before GA.
- Keep 1.x stable releases backward-compatible for direct-runner replay, trace behavior, and policy gates.
/api/tools aliasing is not part of the current SDK roadmap.