Three AI agents, one prediction market, zero bosses. Below is the exact architecture of a system that trades Polymarket autonomously
Three Agents:Claude (Anthropic API) - strategist. Takes market data + news -> returns probability estimate, recommendation, and confidence score.
Codex (OpenAI) - engineer. Writes, debugs, iterates bot code. Describe a task in plain text - get a working script with tests.
OpenClaw (ex-Clawdbot) - orchestrator. Open-source agent running on your hardware. Persistent memory, cron jobs, modular skills, Telegram interface. Coordinates Claude and Codex, executes trades, logs everything. Not a chatbot - an operating system for life without an office
One thinks. One builds. One runs.
Why OpenClaw, Not a Cron Script?
A cron script can't remember context from two weeks ago, adapt strategy through an LLM on the fly, deploy new skills on its own, or talk to you in Telegram like a human.
OpenClaw is a gateway + agent runtime. It routes messages to an LLM, interprets responses, calls the right tools, executes. Persistent memory means: "last Tuesday the strategy lost 3% on Fed markets" -> it adapts behavior on its own. Skills are modular: a folder with SKILL.md + scripts. New skill -> OpenClaw picks it up automatically.
*Telegram as a remote: "stop all positions" -> done. "
Weekly report" -> P&L in chat.*
Bot Core: market_scanner
Here's the main file - 20 lines that wire Claude, Polymarket, and decision logic together:

Every 5 minutes OpenClaw calls this function via cron.
Exchange + market data -> Claude -> decision -> trade
System Prompt - the Strategy Brain
Claude receives this prompt with every request. It defines how the model estimates probabilities and when to recommend a trade:

Edge > 0.10 + confidence > 0.7 = trade. The formula that replaces your boss.
Codex: a Bot That Upgrades Itself
OpenClaw detects win rate dropping -> creates a task -> Codex patches code, runs tests, deploys. Without you.

What It Looks Like at 3 AM
You're asleep. OpenClaw sends this to Telegram:

Scan -> analysis -> trade -> report. Every 5 minutes. 24/7.
Launch: Zero to First Signal

git clone -> docker compose up -> openclaw wizard -> bot in Telegram.
First signal - same evening





