beebots README

The project's README from github.com/imikerussell/beebots. As one markdown file: README.md.

beebots 🐝

Watch the video: I built AI trading bees with Jev

Three AI trading bees race each other on OKX perpetual futures. Every decision comes from Jev (TypeSafe AI's decision model), and every order goes through a risk layer written in plain code. A live dashboard shows each decision, order, fee and funding payment as it happens.

It runs on paper by default. The bees use real market prices and simulated money. Nothing touches an exchange account unless you change the settings yourself, on purpose.

The beebots dashboard: three named bees trading on paper

Not financial advice. beebots is an experiment and a piece of open-source software. It is not a trading product, and nothing it does is a recommendation to buy or sell anything. Leveraged crypto trading can lose everything you put in. The software comes with no warranty (see LICENSE). If you ever switch it to real money, that is your decision and your risk.

Run your own in one click

Deploy on Hostinger

Use code MAGIC10 at checkout for 10% off.

  1. Click the button, pick a VPS plan (a KVM 2 is plenty) and check out. Hostinger sets up Docker and starts beebots for you.
  2. Open your server's IP address in a browser. You'll see the Setup page. Do this soon: Setup stays open for 2 hours after the server starts (see Setup safety).
  3. On Setup:
    • tick the three risk statements
    • pick an owner password (8+ characters). Your dashboard is public; the password is what lets you change things from it later, like joining or leaving the Hive. Write it down.
    • paste your Jev key (from console.typesafe.ai/keys)
    • paste an OpenAI key (required: it designs your bees and paints them; a few cents in total)
    • design your three bees. For each one, answer How do you want this bee to trade? in a sentence ("a Trump bee that only ever trades TRUMP", "a sleepy bee that only buys bitcoin dips"), press Create my bee, and OpenAI invents its name, tagline, trading rules and the coins it may trade. Rename it if you like, then press Generate your bee's portrait. You can carry on once all three bees have their portraits.
    • choose whether to join the Hive (see below). "Not now" is fine; you can join later.
  4. Press Start paper trading. The engine restarts, and the dashboard goes live.
Agree to the rules Pick an owner password Design your bees
Risk statements Owner password Design your bees

Setup safety

Setup has no code to find: the page is open to whoever reaches the server first. So:

Set up right after deploying, and use a domain with HTTPS if you can (PUBLIC_DOMAIN, below) so your keys don't travel over plain HTTP.

Each bee gets its own portrait, painted in the same style as the originals:

A generated bee portrait

Copy a winning bee. Every bee on beebots.tech shows its rules with a Copy button. Copy a winner's rules and paste them into How do you want this bee to trade? to start from its playbook.

Each bee starts with $333 of paper money. Jev spending is capped at $2 a day by default.

Already have a server?

Any machine with Docker works:

curl -fsSLO https://raw.githubusercontent.com/imikerussell/beebots/main/docker-compose.yml
docker compose up -d

Then open http://<your-server-ip>/.

Updating

New versions are published as releases. When one is out, your dashboard shows Update available next to the trading mode, linking to what's new. Nothing updates by itself.

To update, pull the new images and restart. Your bees, settings and history live in Docker volumes and are kept:

docker compose pull
docker compose up -d

Run it over SSH (or hPanel's browser terminal on Hostinger) in the folder that holds your docker-compose.yml (docker compose ls shows where it is). To turn the check off, set UPDATE_CHECK=false.

The Hive

The Hive is a public leaderboard at beebots.tech where everyone's bees race each other. It is opt-in: nothing is sent unless you join. What you agree to when you join:

You're about to share your bees' names, styles and paper-trading results on the public leaderboard at beebots.tech. The board shows % gain/loss only. No keys, no exchange account details, no IP address. Paper trading only. Not financial advice. You can leave any time.

The Hive is a game, not a signal service. Not financial advice.

The Beekeeper (optional, Zapier)

The Beekeeper is an outside coach for your bees. Every few hours he looks at all three, and if one keeps losing because its rules are wrong, he writes it new rules. He runs as a Zap on Zapier: Jev picks the bee, and Claude Opus 5.5 writes the rules.

How your bees trade

Your sentence becomes two things the engine enforces, and one it passes on:

A coin still has to pass the same gates as any other (at least $1M of 24h volume, a tight spread). If your bee's coin doesn't, the bee just waits until it does.

The three trading styles

style the original bee what it does
Breakout Bizzy, the grinder One volatility breakout a day on BTC, ETH, SOL or HYPE, ridden to the daily close.
Trend Breezy, the calculated one Trend following on BTC and ETH only. Few trades, rides winners, sized by volatility.
Momentum Boozy, the degen Chases the strongest 7-day mover across every liquid coin, and adds to winners.

Bizzy, Breezy and Boozy are the official bees (they run on beebots.tech), so their names and art are theirs; your bees get their own. Two of your bees can share a style. The full rules are in strategies/, and the rules every bee shares (caps, stops, "never flat for long") are in strategies/DRAMA_RULES.md.

How a decision is made

Every tick, for every bee:

  1. Look. Live OKX market data: tickers, candles, RSI, MACD, ATR, Bollinger, Donchian, funding, open interest.
  2. Summarise. A small numeric snapshot of the market and the bee's own position.
  3. Ask Jev. Jev picks one move from a menu of moves that are actually valid right now, with probabilities.
  4. Check. Plain code can veto, shrink or force the move: max 2x leverage, per-bee stops, a daily loss stop, trade caps, a fee budget, cooldowns, and a hard daily cap on Jev spending.
  5. Record, then act. The decision is written to SQLite before anything happens.
  6. Broadcast. The dashboard streams it live.

Jev is stateless and never sees an order endpoint. If Jev is down or slow, the bees hold and open nothing.

Settings

Most people need none: Setup covers the keys. To change anything else, create a .env next to docker-compose.yml (or set the variables in Hostinger Docker Manager) and restart. Every setting is documented in .env.example. The common ones:

setting default what it does
PUBLIC_DOMAIN blank A domain pointed at your server. Caddy then gets an HTTPS certificate on its own. Recommended: without it, the Setup page and your keys travel over plain HTTP.
TICK_MS 10000 How often each bee asks Jev. Faster is more exciting and costs more (see docs/COSTS.md).
JEV_DAILY_USD_CAP 2 Hard daily cap on Jev spend. When it's hit, every bee holds until 00:00 UTC.
BEE_START_EQUITY_USD 333 Paper money per bee.

Run Setup again (new names, new keys, or a forgotten owner password):

docker compose exec engine rm /data/settings.json
docker compose restart engine

Run these on the server (on Hostinger, over SSH from hPanel), then open the site and go through Setup again. The setup window starts over with the restart.

Owner password: it's stored only as a salted hash in /data/settings.json, so nobody (including you) can read it back. If you forget it, run Setup again as above. Installs from before the owner password existed can set OWNER_PASSWORD in .env (8+ characters) instead.

Something wrong? The engine's log says what it's doing: docker compose logs engine, or Hostinger Docker Manager → the engine container's logs.

Backups: a sidecar writes a nightly copy of each database to /data/backups inside the bees-data volume and keeps 7 days. That copy lives on the same server, so take an off-server copy yourself if you care about the history.

Real money (read this twice)

beebots can trade OKX demo accounts or real money, but only if you set it up by hand. It is not part of Setup, and there is no button for it.

Ending a live run: docker compose exec engine touch /data/close-live. The engine stops asking Jev, closes every position with reduce-only market orders, and stays up so the dashboard keeps the final result.

Again: this is not financial advice, and you can lose everything.

Develop

pnpm install
pnpm test            # risk layer (every cap, gate and forced move, both directions), setup, redaction, indicators, ledger
pnpm universe        # the tradable coin list from live public data (no keys)
pnpm snapshot        # each style's menu and snapshot from live data (no Jev call)
pnpm e2e:fake-jev    # the whole engine on paper with a random fake Jev (no spend)
pnpm dev             # the real engine on paper, with real Jev calls (Setup runs if there is no key)

cd dashboard && pnpm install && pnpm dev    # http://127.0.0.1:5173, proxied to the engine

Build the images yourself instead of pulling them:

docker compose -f docker-compose.yml -f docker-compose.build.yml up -d --build

Everything on OKX is built on OKX's own open-source Agent Trade Kit (MIT). Public market data (instruments, tickers, candles, open interest, funding) runs in-process on the kit's own public REST client and rate limiter, vendored in src/okx/kit/ with its licence, so there is no child process per call; pnpm parity checks it returns the same data as the CLI. Signed calls (orders, positions, fills, leverage, news) go through the kit's CLI. Keys never touch disk inside the container except in the Setup file (/data/settings.json, owner-only). The logger and the event stream redact anything that looks like a key, an IP address or an email.

Credits

Built by Mike on the Creator Magic YouTube channel, in the video "I gave three AI bees $1,000". Hosted on Hostinger. Decisions by Jev.

MIT licence. No warranty. Not financial advice.

beebots (imikerussell/beebots)

Searching Database…

这是什么?beebots 运行三只在 OKX 永续合约上相互竞赛的 AI 交易蜜蜂,每个决策都由名为 Jev 的决策模型做出,每笔订单都要经过一层用普通代码写的风控。它默认以模拟盘模式启动,用真实价格、模拟资金。
这是我买入的交易产品,还是我自己运行的软件?它是你自行托管的开源软件,不是托管的交易产品,也不是投资服务;作者明确表示它做的任何事都不构成投资建议。
怎么让 beebots 跑起来?最快的方式是 Hostinger VPS 一键部署按钮(KVM 2 套餐就够)——它会自动装好 Docker 并启动 beebots;否则任何装了 Docker 的机器都能通过 docker-compose 运行。然后在浏览器里打开服务器的 IP,完成 Setup 页面。
需要 Jev 密钥和 OpenAI 密钥吗?需要——Setup 需要一个来自 console.typesafe.ai/keys 的 Jev 密钥用于交易决策,外加一个 OpenAI 密钥(总共只花几分钱),用来设计蜜蜂的名字、规则和头像。
开箱就是真金白银地交易吗?不是。它默认以模拟盘运行(模拟资金、真实市场价格);切换到 OKX 实盘交易需要手动设置 DRYRUN=false、MODE=live、只有 Read+Trade 权限的子账户 API 密钥,以及一个明确的 LIVEACK 标志。
如果我加入公开的 Hive 排行榜,它会公开我的什么信息?加入只会分享蜜蜂的名字、标语、风格、交易次数、模拟盘权益/资金和成交(以涨跌百分比显示,不显示美元金额);你的 Jev、OpenAI 和 OKX 密钥、交易所账户数据和服务器地址绝不会发送。
蜜蜂可以使用哪三种交易风格?每只蜜蜂运行三种内置策略之一:Breakout(对 BTC/ETH/SOL/HYPE 每天做一次波动突破)、Trend(趋势跟随,仅限 BTC 和 ETH)和 Momentum(追逐任意流动性充足的币种中 7 天涨幅最强者)。
Beekeeper 是什么?一个可选的、基于 Zapier 的教练,会定期检查每只蜜蜂,如果哪只因为规则不对而一直亏损,就用 Claude Opus 5.5 和 Jev 的判断重写它的交易规则。它只能改蜜蜂的规则文本和币种列表,绝不会碰杠杆或实盘设置,而且每次重写都能撤销。
每个节拍的交易决策实际是怎么做出的?Jev 查看实时 OKX 行情数据(ticker、RSI、MACD、ATR 等),从当前有效的选项菜单中挑选一个动作,一层用普通代码写的风控可以否决或缩小这个动作(杠杆上限、止损、每日亏损限额),而且决策会在任何事发生之前先记录进 SQLite。
Size
2 MB
Stars
301
Age
23d
Commits · 90 Days