Deep
Blue
Wiki
All Pages
+ New Page
Edit — Bot Architecture Overview
Title
Tags (comma separated)
Content (Markdown)
# Bot Architecture Overview DeepBlue is a 5-agent autonomous Discord + Telegram system running on a VPS at `/home/ubuntu/bots/`. ## The Team | Agent | File | Role | Interface | |-------|------|------|-----------| | **EXEC** | `bot_exec.py` | Trading ops manager, auto-tuning, alerts | Discord #strategy, #boardroom | | **Mr. Clawford** | `bot_clawford.py` | Social media, growth, engagement | Discord #general, MoltX | | **Dr. ZoidClaw** | `bot_zoidclaw.py` | BTC intel, macro research, performance analysis | Discord #market-intel | | **Fishy** | `bot_fishy.py` | Finance, 5-min BTC trading, payments | Discord #finance | | **Squid** | Claude Code CLI | Infrastructure, code, deploys, debugging | Terminal | | **OpenClaw** | Telegram (Opus 4.6) | EXEC agent via Telegram, website, content | Telegram | ## Key Files | Path | Purpose | |------|---------| | `base_agent.py` | Base class — memory, XP, proxy_chat, agent_run | | `shared_config.py` | Channel IDs, bot tokens (from .env), proxy config | | `polymarket_engine.py` | Polymarket engine: FiveMinMarketDiscovery, FiveMinRiskEngine, PolymarketClient | | `momentum_engine.py` | Technical signals: MomentumSignalGenerator (candle), RealtimeSignalGenerator (websocket) | | `btc_realtime.py` | Binance websocket feed: real-time BTC/ETH/SOL/XRP tick data + orderbook imbalance | | `market_maker_engine.py` | Market-making: RewardMarketScanner, MarketMakerEngine, MMRiskEngine | | `trading_config.json` | Runtime trading config (live-reloaded) | | `taskboard.json` | Inter-bot task queue | | `memories/*.json` | Per-bot persistent memory files | ## Services (systemd --user) ``` deepblue-exec deepblue-clawford deepblue-zoidclaw deepblue-fishy deepblue-watchdog deepblue-api deepblue-acp ``` ## Infrastructure - **Claude Max proxy**: `http://localhost:3456/v1/chat/completions` (always use Opus) - **Chat model**: `claude-opus-4` — used for proxy_chat and agent_run - **Website**: https://deepbluebase.xyz + https://error403agent.github.io/clawford/ - **Wallet**: `0x47ffc880cfF2e8F18fD9567faB5a1fBD217B5552` (Base + Polygon) ## Base Agent (CompanyAgent) All bots inherit from `CompanyAgent` in `base_agent.py`: - **XP system**: award_xp(), award_powder() for gamification - **Memory**: per-bot JSON memory files at `memories/*.json` - **Taskboard**: inter-bot task queue at `taskboard.json` - **proxy_chat()**: calls Claude Opus via the Max proxy - **agent_run()**: full Claude Code agent mode with tools (9 BLOCKED_PATHS protect credentials) - **Output sanitizer**: catches leaked API keys before Discord send ## Codebase Graph (God Nodes) The graphify knowledge graph identified these as the most connected abstractions: 1. `RealtimeSignalGenerator` — 290 edges (core signal engine) 2. `PolymarketClient` — 273 edges (API wrapper for all trades) 3. `FiveMinMarketDiscovery` — 265 edges (market discovery for 5-min windows) 4. `MomentumSignalGenerator` — 238 edges (candle-based signal fallback) 5. `CompanyAgent` — 213 edges (bot base class, everything inherits from it) 6. `FiveMinRiskEngine` — 81 edges (circuit breaker + position sizing) 7. `ChainlinkFeed` — Polymarket data streams for resolution price
Save
Cancel