The idea in one breath
You rest quotes on both sides of a market on the home venue. When one side fills, the bot immediately buys the opposite outcome on the second venue at a matching price, so your net position stays flat. You earn the gap between the two books. The pairs that work are same-day match-winners that resolve in hours and mirror an identical market on the other venue, so the two quotes never drift apart.
Why it is safe to run with real money: the fast inner loop, quote, get filled, hedge, stay flat, is deterministic code with a loss breaker, an inventory guard, and flatten-on-stop. A model never holds live risk tick by tick. The agent does setup and judgment, not trades.
Assumes you’ve done Setup
This is the fast path, so it assumes you finished Setup: a runtime, a fresh burner wallet funded with USDC + ETH on Base, your Limitless API key, an LLM key, and an editor with your agent harness of choice (Claude Code, Cursor, etc.). New here? Do Setup first (~5 min), then come back.
On top of that floor you need:
- A Telegram account, fill pings and a Kill button in your pocket.
- ~15 minutes. Optional ~$20–$50 to fund a live run; stay dry and you fund nothing.
- The agent adds the Polymarket side (a relayer key + a gasless deposit wallet) for you in Part 1.
Part 1
Dependencies and boilerplate.
With Setup done, the agent gets the market-making-specific pieces up with you: the repo, the Polymarket side (relayer key + gasless deposit wallet), the hedge funding, your pair, and the safety checks. Each step is what you ask, what the agent does, and what you do or see. You hold every custody step yourself.
Bootstrap the repo
- Ask
- “Set up the cross-market-mm strategy from agents-starter.”
- Agent
- clones and installs, scaffolds your .env and config, then runs cross-market-mm:init to walk the rest.
- You see
- a real, runnable bot on your machine.
Add the Polymarket side
- Have
- your wallet key and Limitless API key already, from Setup.
- Agent
- adds the Polymarket relayer key (tells you where to get it), then runs cross-market-mm:setup-poly to deploy your gasless, key-less Polymarket deposit wallet.
- You do
- paste your own keys, the agent never sees them in a prompt.
Fund (or stay dry)
- Agent
- tells you precisely where money goes: USDC and a little ETH to your wallet on Base for the Limitless side, and for the hedge side it runs cross-market-mm:deposit to print a bridge address you send USDC to (it auto-wraps to pUSD).
- You do
- the transfers. Skip this entirely for a dry run.
- Watch out
- send to the printed bridge address only, never straight to the deposit wallet.
Pick a pair (the real judgment)
- Ask
- “Find a good pair to make right now.”
- Agent
- runs cross-market-mm:find-pairs, then reasons: prefers a same-day match-winner (resolves in hours, so quotes do not go stale), verifies both venues resolve on identical criteria, and avoids far-dated winner markets that bleed.
- You see
- a chosen pair with the agent’s reasoning.
Approve and preflight
- Agent
- runs the one-time on-chain approval, then cross-market-mm:preflight, and reads the checks (auth, funding, approvals, dust-hedge guard, both venues resolve). It proceeds only on all-green.
- You see
- a clean preflight, or the exact thing to fix.
Dry-run proof (zero risk)
- Agent
- runs the bot in dry mode with a simulated fill and points the control panel at its data dir.
- You see
- on the panel: the quote board, a fill, the hedge fire on the second venue, then net back to flat. Nothing signed. This is the “it actually works” moment.
That dry run is your proof. The quote, hedge, and flatten path works with nothing signed. Now we make it real and always-on.
Part 2
Make it run on its own.
To work a match window it has to be running when your laptop is closed, so we deploy it to a host that keeps it up (this guide uses Railway). Be clear about what is running: this is the deterministic bot, not an agent. It quotes, hedges, and enforces its own risk limits as a long-lived process. No model is in the trade loop, which is exactly what you want.
Deploy
Push the repo to a host (Railway in this guide) as a long-running service, with your .env as encrypted environment variables and restart-on-crash. The exact steps live in Module 11 and the repo’s deploy docs.
Watch
The control panel shows the quote board, fills, hedges, and net delta in real time, served by the running bot.
Operate
Telegram is your remote: fills ping your phone, and Pull (pause quoting, keep hedging) or Kill (halt and flatten) work from anywhere. A tripped loss-breaker flattens on its own.
Persist the bot, not your keys in the open.
Your PRIVATE_KEY and API secrets go in the host’s encrypted environment, never in the repo or a prompt. Start with a small size and the pre-match pull buffer set; raise size only after clean runs.
Part 3
Add an AI agent supervisor.
Now the agent layer on top. It does not place trades. It reads the bot’s surfaces (the panel, Telegram, and the data it writes) and drives the repo’s commands: select and validate the next pair, pull or restart, score each run, and tune the one knobs file. This is the autoresearch pattern applied to market making, the agent researches how to make markets while the bot does the making.
A persistent Claude Code instance
Simplest if you already use it. Keep a session running against the deployment; it reads status and the experiment log, proposes a knob change, and applies it. Good for supervised, in-the-room operation.
Hermes (preferred)
A dedicated autonomous runtime that runs the loop unattended, around the clock, next to the bot. This is the “agent runs it on its own” tier.
Either way, the supervisor follows the same loop, defined in the repo:
Edits
strategy.knobs.json, the one file it changes: pair filters, margin, size, risk, timing.
Scores
cross-market-mm:score turns a run into one number (hedge success + flatness + fills, minus bleed, inventory, manual rescues) and logs it. A run with no fills is marked inconclusive, not rewarded.
Loops
program.md is the loop it follows: read the log, change one knob, run a bounded experiment, score, keep or revert, repeat.
Markets are non-stationary.
A knob set that won Tuesday’s match may lose Wednesday’s. This is adaptive experimentation, tracking the currently good conditions, a handful of real experiments a day (one per match window), not a hundred overnight. You parallelize across the day’s matches, not across hours.
Why we hedge instead of predict
AI agents as prediction-market makers is a real, fast-moving research area. The honest finding worth knowing: the naive version, point an LLM at a market and quote around its guess of the odds, gets eaten by adverse selection, because today’s best models still are not calibrated enough. So we do not do the naive version. Our agent never predicts the odds. It quotes one venue, hedges every fill on the other, stays market-neutral, and the agent supervisor researches operating conditions rather than outcomes. That is the version that holds up.
Run it
Point an agent at the repo.
Open the agents-starter repo in your agent harness of choice (Claude Code, Cursor, whatever you use) and say “set me up to market-make.” It reads SKILL.md and drives the steps above while you supervise.