OpenClaw.
The skill the agent reads. The engine the runtime fires.
For MCP-compatible OpenClaw hosts, a 101-tool adapter exposes Kalshi + Polymarket. Read context, surface edges, write a thesis tree, arm intents with full kill chain, attribute fills. Read tools are free; execution is BYOK + metered. Add it once; the agent gets the same loop a human runs from the CLI.

Lovelace + Babbage · 1843 — the human writes the skill, the machine executes. The first agent loop.
What the agent connects to
One MCP adapter endpoint. 101 tools. Portfolio ledger review.
The skill manifest is human-readable Markdown with tool schemas. The agent reads context, walks the orderbook, decomposes a thesis, declares an intent, and pulls recorded fill/ledger rows — all through one normalized surface.
mcpEndpointhttps://simplefunctions.dev/api/mcp/mcp — adapter endpoint for MCP hosts.
skillManifest/api/mcp/skill.md — Markdown skill description with tool schemas, kept in sync with code.
readToolscontext, edges, market, book, search, calibration public; portfolio ledger/fills/attribution require an authenticated SimpleFunctions key.
writeToolsthesis.create, intent.create, intent.cancel — BYOK + metered when execution can fire.
sessionIdPer-agent identifier; intents and fills tag back to the originating agent.
killChainKill conditions declared on intent fire automatically; agent gets the cancel reason.
portfolioLedger/api/portfolio/ledger and /api/portfolio/activity — authenticated intent/fill review surface.
Edges your agent sees right now
Updated every 15 minutes · data from Kalshi and Polymarket
Why MCP over raw venue SDKs
Hand-coded Polymarket SDK
Lowest-level control
No thesis loop, no cross-venue, no edge math, no kill chain, no agent path
Generic LLM with web tools
Familiar tooling, fast to start
No depth math, no settlement awareness, no audit trail, no BYOK signing
Single-venue agent kit
Tight on one exchange
Hard-coded to one venue; agent cannot reason across Kalshi + Polymarket
OpenClaw + SimpleFunctions
Thesis tree + edges + intents across both venues
Surfaces only post-slippage survivors; ledger-backed review for recorded events
Six agent shapes
Same MCP surface, different responsibilities. Multi-agent setups share the ledger review surface through source tags.
Research agents
Read context + edges, draft a thesis tree, surface candidates — no execution path needed.
Scanner agents
Continuous edge monitoring across themes, push to Slack / Telegram / your IC pack.
Executor agents
BYOK + signed-off candidate list → intents armed with full kill chain.
Multi-agent fund desks
Research / scanner / executor split; shared audit trail per session.
Backtest agents
Daily HF dump (CC-BY-4.0) + thesis primitives = reproducible historical edge replay.
Compliance agents
Pull portfolio ledger, fills, and grouped attribution; preserve unknown attribution for weekly review.
Wire-up
Add the skill once. Tool schemas live in the manifest. Pull context, feed it to the agent, declare intents from the response.
Add the skill
openclaw mcp add simplefunctions --url https://simplefunctions.dev/api/mcp/mcpopenSkill manifest
GET /api/mcp/skill.mdopenLive context (read)
mcp call simplefunctions.context { topics: ["macro", "crypto"] }openEdges feed (read)
mcp call simplefunctions.edges { min_edge: 8, depth: "high" }openArm intent (BYOK)
mcp call simplefunctions.intent.create { ... }openA first agent loop
Five tool calls. Read → think → write. The agent prompt fits on one page.
$ openclaw mcp add simplefunctions \
--url https://simplefunctions.dev/api/mcp/mcp
✓ skill added · 101 tools loaded
read: context, edges, market, book, search, ...
write: thesis.create, intent.create, intent.cancel
byok: configure --kalshi-key, --poly-keyagent: mcp.simplefunctions.context({
topics: ["macro", "crypto"]
})
→ {
macro: {
hot: ["WTI ladder", "FOMC", "recession"],
regime: "trending oil up",
moves: [...]
},
crypto: {...}
}agent: mcp.simplefunctions.edges({
min_edge: 8,
depth: "high",
classes: ["consensus","timing"]
})
→ [
{ ticker:"KXWTIMAX-T150", edge:+18,
class:"consensus", kelly:280, ... },
{ ticker:"KXFEDDEC-25", edge:+13,
class:"timing", kelly:150, ... }
]agent: mcp.simplefunctions.intent.create({
ticker: "KXWTIMAX-26DEC31-T150",
side: "buy", size: 280, max_price: 40,
trigger: { below: 38 },
kills: [
{ above: 60 },
{ news: "iran ceasefire signed" }
]
})
→ { intent_id: "i_8a2f4c", state: "armed",
review: "/api/portfolio/activity?source=intent" }FAQ
What is OpenClaw and why pair it with SimpleFunctions?
OpenClaw is the open-source agent framework for tool-using AI assistants. SimpleFunctions ships an MCP adapter for OpenClaw-style hosts, while the canonical local surface remains the `sf` CLI and the canonical network surface remains HTTP/Data API. The adapter gives OpenClaw market context, edges, thesis workflows, intents, and authenticated portfolio ledger reads without wiring rate-limit handlers, key rotation, or cross-venue normalization.
How do I add the SimpleFunctions skill to OpenClaw?
Three lines: openclaw mcp add simplefunctions --url https://simplefunctions.dev/api/mcp/mcp. The agent immediately gets the current MCP adapter catalog — context, market, orderbook, search, edges, thesis, intent, and authenticated portfolio read tools. BYOK on Kalshi + Polymarket if you want execution; public read-only research works without venue keys.
What are the most useful tools for a first agent loop?
sf.context (live world state, ~few hundred tokens), sf.edges (mispricing feed), sf.book (per-ticker orderbook + depth), sf.thesis.create (decompose a sentence into a causal tree), sf.intent.create (arm an action with kill chain), and authenticated portfolio read tools for ledger/fill review. A working agent loop fits in a single prompt with those surfaces.
Does the agent need keys to do anything useful?
No for public research: context, edges, book, search, and calibration are public and free. User-owned portfolio fills, ledger rows, positions, and attribution require an authenticated SimpleFunctions key. BYOK Kalshi + Polymarket keys are only needed when you arm an intent that can fire execution.
How does the audit trail work for agent trades?
Every intent the agent declares logs thesis context, risk gates, kill conditions, and status transitions. Recorded execution events and fills read back through /api/portfolio/ledger, /api/portfolio/fills, and attribution endpoints with explicit confidence. Fund-admin export is integration-specific; venue statements remain the capital source of truth.
Latency for an OpenClaw agent vs a human?
Tool-call round-trip is ~80-150ms (cached context + edge feed). Heartbeat-driven thesis updates flow through every 15 minutes. Critical-event out-of-band ticks (FOMC, CPI, geopolitical break) reach the agent within 30 seconds. Sub-second is reserved for orderbook depth via WebSocket; agents typically pull on a schedule rather than streaming.
Multi-agent setups?
Supported. Each agent can carry its own session or source tag; intents and recorded ledger events preserve the available source evidence. Common patterns: a "research" agent that writes theses, a "scanner" agent that surfaces edges, an "executor" agent that arms intents only on signed-off candidates. All three share the same CLI/API surface, with MCP available as the adapter when the host requires it.
How does this differ from a Polymarket SDK or Kalshi REST wrapper?
A venue SDK exposes endpoints; we expose a thesis loop + edge surface + intent layer + portfolio ledger reads across both venues, normalized. The agent does not deal with RSA-PSS for Kalshi or EIP-712 for Polymarket — it calls sf.intent.create with a unified intent shape and the runtime handles signing and routing.
Open source?
The canonical local interface is the npm package @spfunctions/cli; its public GitHub repo is a reference and issue mirror, not the full private operator runtime. The MCP adapter is the compatibility surface for OpenClaw-style hosts. Skills (Markdown + tool schemas) are versioned at /api/mcp/skill.md. The runtime engine that powers heartbeat, routing, and execution remains hosted.
Cost?
Public MCP tools (context, edges, market, book, search, calibration) are free CC-BY-4.0. Authenticated execution tools (intent, fill, BYOK signing) are metered. Heartbeat ticks are bundled into the metered quota. No subscription floor; per-call billing only.
Related surfaces
AI agents
Why prediction markets are the natural home for autonomous agents.
Agentic CLI
The same surface as the human CLI — sf scan, sf book, sf intent.
PM agent overview
Architecture and prompt patterns for prediction-market agents.
Agentic usage stats
Which tools agents actually use; live calibration of the MCP surface.
Prediction market API
CLI, REST/Data API, and MCP adapter — same shape across all three.
Portfolio Autopilot
A worked example: full LLM agent that runs the loop on a schedule.
Heartbeat engine
24/7 monitoring + thesis re-evaluation that drives the agent's tick.