Business Growth / workflow case

Hermes + Polymarket: How to Build a Self-Learning BTC Trading Agent Starting with $100 to Run Automated Strategies

Beginner to intermediate Set up once, then iterate continuously @Mikocrypto11
Result

Tool cost under $10/month + start with as little as $50–100 + deploy in about 30 minutes | Hermes self-learning BTC trading agent workflow

For

Polymarket traders / crypto practitioners looking to validate AI trading agents at low cost

Hermes + Polymarket: How to Build a Self-Learning BTC Trading Agent Starting with $100

Between 2025 and 2026, trading bots on Polymarket generated over $60 million in profit.

77% of that came from a single market type:

Crypto UP/DOWN

More specifically, short-cycle crypto markets like BTC Up/Down.

This article isn’t about simple “AI automated trading” concepts, nor is it a blind copy-trading guide for some bot.

What it really breaks down is:

  • Why do BTC 5-minute Up/Down markets persistently exhibit structural inefficiencies?
  • What edge are these bots actually eating?
  • How to build a BTC trading agent with Hermes + Atomic + Claude Opus + Polymarket CLOB v2 that can continuously review, adjust parameters, and self-learn.

---

01 | Where’s the Opportunity?

Why the BTC Up/Down market?

BTC 5-minute Up/Down markets on Polymarket are one of the most structurally inefficient sectors in prediction markets. Most people trade these markets based on emotion:

  • A news headline drops → they follow
  • Social media heats up → they follow
  • A sudden K-line fluctuation → they bet based on gut feeling

But the bots that actually make money don't trade that way.

They don't look at emotion or short-term noise.

They look at the transition probability behind BTC’s price state. When BTC enters a clear directional state, whether that state will persist can be mathematically measured.

While the crowd is still betting by feel, a transition matrix has already identified state persistence.

That’s the gap.

The difference between the probability given by the mathematical model and the current market price is the edge. And this edge isn’t one-off; it can be captured repeatedly, amplified, and automated.

The agent framework powering this system is Hermes.

Hermes is an open-source framework launched by NousResearch, which is backed by $70 million from Paradigm.

By April 2026, Hermes had more GitHub stars than Anthropic’s Claude Code.

This shows developer community rapid adoption of such agent frameworks — meaning automated trading is evolving from “hardcoded-rule bots” into “agent systems that can call models, read logs, and continuously review.”

The BTC Up/Down market is a perfect fit for this system.

  • Single asset: 288 trading windows per day
  • Average: A trading opportunity every 81 seconds
  • Average edge window: 5%–15% gap
  • When model probability satisfies: p ≥ 0.87 → corresponding win rate ~63%–72%

This doesn’t mean every trade wins — it means the bot only enters when the probability advantage is clear enough.

Several bots are already producing results in this market:

  • Bonereaper — Strategy: High-Confidence Spread Capture

Profile: https://polymarket.com/@bonereaper?via=Miko66

  • 0xe1D6b514 — Strategy: Dual-Mode Expected Value

Profile: https://polymarket.com/@0xe1d6b51521bd4365769199f392f9818661bd907?via=Miko66

  • 0xB27BC932 — Strategy: Multi-Asset Variance Reduction

Profile: https://polymarket.com/@0xb27bc932bf8110d8f78e55da7d5f0497a18b5b82-1772569391020?via=Miko66

Three bots, same market sector, same underlying math logic.
Combined profit: $2,112,019

---

02 | Where Does the Edge Come From?

The core of this model is Markov Chain analysis.

Its basic idea: decompose BTC price changes into different states, then calculate the probability that the current state transitions to the next state.

Key insight: price movement is not always random. When the market enters a persistent directional state, the probability that it continues along that state can be significantly above 50%. If the market price hasn’t fully reflected that probability, a trading opportunity appears.

Entry formula:

Δ^(w) = p̂^(w) − q^(w) ≥ ε → ENTER

Where:

  • p̂ = model probability
  • q = market price
  • ε = minimum gap

Here the minimum gap is set to 5%. For example, if the model believes the true probability of a direction is 70%, but the market prices it at 62%, there’s an 8% gap. As long as the gap exceeds 5%, the trade enters the candidate pool.

Profit formula:

r = (1 − q) / q
  • If entry price q = 0.647 → single-trade return ~+54.5%
  • If entry price q = 0.441 → single-trade return ~+126.7%

This explains why some mid-range Up/Down trades show very high returns. The lower the price, the higher the potential return — but also the higher the risk. So you can’t look only at return rate; you also need model probability, win rate, and position sizing.

The bot has a stricter entry condition:

p(j*, j*) ≥ 0.87

This is the Markov persistence threshold. Only when the probability of a state continuing is at least 87% will the bot enter. Below that threshold, it doesn’t trade.

That’s why it doesn’t need traditional “directional prediction” yet can still maintain a win rate above 65%. It doesn’t bet on every window; it only enters when the market is in a high-persistence state, then captures the gap between model probability and market price.

Position sizing uses the Kelly Criterion:

Kelly f* = p − (1−p)/b

Where:

  • p = model probability or win rate
  • b = payout odds

When p = 0.87 and b = 0.647, the corresponding Kelly fraction is approximately f* ≈ 0.71.

Kelly’s role isn’t to make the bot go all-in blindly. It calculates a more reasonable bet proportion given determined win rate and odds. Too small → growth too slow; too large → one mistake can hurt principal. So this system doesn’t rely on “winning every trade”; it relies on:

  • Probability filtering
  • State persistence filtering
  • 5%+ gap filtering
  • Kelly sizing for position control

---

03 | What Tools Do You Need?

This system can run entirely on open-source tools. You don’t need to build a full trading system from scratch, nor do you need to be an advanced developer.

  • Monthly cost: Under $10
  • Minimum starting capital: $10 (recommended: $50)
  • Gas fees: ~2 POL (~$1)
  • Setup time: ~30 minutes

Core stack:

  • Hermes agent framework
  • Atomic
  • Claude Opus
  • GitHub repo
  • Polymarket CLOB v2
  • Telegram bot

This combo isn’t about having AI bet based on gut feel — it’s about having the agent read the strategy, execute rules, log trades, review results, and update parameters accordingly.

---

04 | How to Set Up Hermes in 3 Steps

Step 01 – Install Atomic & Launch Hermes

First, go to: atomicbot.ai
Download Atomic.

Once open, select Hermes agent on the home page. You can run locally or click Run in Cloud (top right). Log in with Google — cloud and local share the same interface. If running locally on Mac, move the app to the Applications folder after downloading.

Atomic supports 100+ integrations, persistent memory, and major AI models like Claude, ChatGPT, Gemini. So it’s more like an agent workbench than a simple trading script.

Step 02 – Connect a Model API

Second, connect a model API in Atomic.

Path:
Atomic settings → AI Models → Anthropic → paste your API key

Then select Claude Opus 4.7. It acts as the agent’s brain — for real-time market analysis, reading trade logs, reviewing strategy performance, and adjusting parameters based on results.

Alternatives:

  • OpenRouter – pay per use
  • OpenAI Codex – through ChatGPT Pro

Example config: set temperature to 0.2, because trading decisions need consistency, not divergent thinking — lower temperature means more consistent output.

Step 03 – Connect a Telegram Bot

Third, connect a Telegram bot to the agent.

Path:
Atomic → Skills → Messengers → Telegram → Connect

Open Telegram, create a bot via @BotFather, copy the token, and paste it back into Atomic.

Now the Hermes agent can send you trade reports, run status, dry-run summaries, and daily reviews via Telegram. From this step onward, the agent is online and waiting for your trading logic input.

---

05 | Setting Up the BTC Trading Strategy

Don’t build a trading system from scratch.

Better approach: find an existing GitHub repo as the base logic, then give it to Hermes and let Claude Opus update it to the latest Polymarket CLOB v2.

Recommended repos:

  1. aulekator/polymarket-BTC-15-Minute-Trading-Bot
  • Production-grade, 7-phase architecture, Grafana, Redis, SL/TP
  • Good for Markov-based entries + Kelly sizing
  1. JLowo/gengar-polymarket-bot
  • Quarter-Kelly, Brownian motion, calibrated vol
  • Good for more conservative position sizing and realistic risk boundaries
  1. dijenne/Polymarket-bot
  • Two strategies: arbitrage + momentum, with auto-optimization
  • Good for multi-strategy combination

Step 1 – Feed Hermes a Trading Logic Prompt

The first prompt’s goal: have Hermes build a Polymarket BTC 5-minute Up/Down trading agent based on an existing repo.

Base repo: github.com/aulekator/polymarket-BTC-15-Minute-Trading-Bot
Goal: update to Polymarket CLOB v2 and prepare a version safe for live trading.

Prompt:

*(The prompt itself is not provided in the source text; it would be a structured instruction to Hermes. We keep it as a heading placeholder.)*

Step 2 – Set Up Wallet

Step 3 – Environment Variable Configuration

Example .env config:

DRY_RUN=true

Run in simulation first.

MIN_EDGE=0.05

At least 5% gap before entry.

MIN_PROB=0.87

Markov state persistence probability ≥ 87%.

MIN_BET=1.00

Test with $1 small bets.

MAX_BET=50.00

Limit max single bet to $50.

BANKROLL=100.00

Initial bankroll set to $100.

This is where “starting from $100” comes from. It’s not a guarantee that $100 becomes $10,000 — it’s just using $100 as seed capital to test a tradable, reviewable, iterable framework.

Step 4 – Run a Dry Test First

---

06 | The Self-Learning Loop: How the Agent Gets Smarter

The biggest difference between Hermes and a typical static bot is its self-learning loop.

A normal bot has hardcoded rules — whatever parameters you set, it uses them forever. But markets don’t stay static. BTC volatility changes, liquidity changes, trade quality varies by time, and certain Markov states may work today but fail tomorrow.

So this system needs the agent to read its trade logs and adjust strategy based on actual results.

Step 1 – Execute Trades

When the bot detects: p(j*, j*) ≥ 0.87 and the gap meets requirements, it enters the market. Every entry, exit, and P/L gets recorded into a journal. This journal is the foundation of self-learning — no logs, no review; no review, no optimization.

Step 2 – Nightly Review

At the end of each day, Claude Opus reads the full trade log. It analyzes:

  • Which Markov states had the highest win rate
  • Which persistence thresholds performed best
  • Which windows had the most losses
  • Which entry price ranges had the best EV

This isn’t AI adjusting strategy by gut — it’s the model doing a real review based on actual trade records.

Step 3 – Update Strategy

Claude Opus rewrites threshold rules, adjusts Kelly sizing, and updates key parameters based on the trade log. For example:

  • Raise MIN_PROB or MIN_EDGE if they’re too loose and causing more losses
  • Increase weight for price ranges that performed better
  • Lower position size if Kelly sizing was too aggressive

Step 4 – Trade Next Session with New Rules

When the next session runs, the agent uses the updated parameters. It doesn’t repeat the same rules every day — it adjusts tomorrow’s strategy based on today’s results.

After 50–100 trades, the agent gradually builds its own trade history. It starts to learn which states work, which price ranges are effective, which windows to avoid, and which rules are just noise.

This is the core of the self-learning loop. Every morning, Telegram sends a report including:

  • Yesterday’s trade performance
  • Updated rules
  • Today’s strategy

You can review the report, confirm the changes, and decide whether to continue running. This makes the agent more than an automated trading script — it’s a trading agent that records, reviews, adjusts, and reports.

Nightly review prompt could be designed like this:

*(The actual prompt for the nightly review is not detailed in the source text; we note it as a design suggestion.)*

The goal of this loop is not for the AI to magically predict the market — it's to turn every trade into learning data: record after each execution, review daily, update parameters based on results, and keep testing with the new parameters in the next round.

Conclusion

Trading bots on Polymarket have already taken a lot of profits from manual traders.

And that share is still growing.

With the emergence of agentic frameworks like Hermes and Atomic, the barrier to building a trading agent is lowering.

You don't necessarily need to be an advanced developer.

What you need:

  • Claude Opus as the brain.
  • A GitHub repo as a starting point.
  • Hermes / Atomic as the agent framework.
  • Polymarket CLOB v2 as the execution interface.
  • Telegram as the reporting entry point.
  • 50–100 training trades as learning data.

Then let the self-learning loop keep reviewing and optimizing.

But don't rush at the start.

Start small.

First: DRY_RUN=true

Then: $1–$2 per trade

Run training.

Don't skip the learning phase.

Because what really matters in this system is not how much you make on day one — but whether the agent can improve with every trade.

Whether it can identify which states have an edge.

Whether it can spot which windows are losing money.

Whether it can adjust thresholds and positions in time.

Whether it can avoid mistaking short-term luck for long-term skill.

What's truly noteworthy about Hermes + Polymarket is not "AI making money automatically" — it's that it turns prediction market trading from human subjective judgment into a recordable, reviewable, iterable agent system.

PM Smart Money Leaderboard:
https://polymarket.com/zh/leaderboard?via=Miko66

If you found this tweet helpful, please like and retweet ♥

Related