Not a backtest framework. A live team of 5+ AI agents that research, screen, trade, monitor, and review across 3 markets. Copilot V2 routes
@agentchat to the real agent instances — they read genuine DB data and run real pipelines, not LLM impersonation. 22 MCP tools, Blackboard shared memory, 3-layer signal pipeline.
Athena is a production-grade multi-agent AI investment-research & trading system written in Go (~72,000 lines) + Python (~5k) + React (~9k). It deploys 5+ specialized LLM-powered agents that operate as a real trading team — not just analyze one stock at a time, but scan entire markets, debate each pick, execute trades, monitor positions, and review performance in a continuous feedback loop.
Copilot V2 — talk to the real agents, not an impersonator: The Copilot chat assistant routes @agent messages to the actual agent instances. Ask @screener 选股 and the real Screener runs its multi-strategy pipeline; ask @researcher 日报 and it reads the genuine persisted briefing from the DB. Replies are grounded in real data (with a no-fabrication fallback), not LLM improvisation. Multi-agent roundtable (@researcher @screener @trader) lets several agents answer in turn. (Paper/simulated execution — a research tool, not financial advice.)
3 Markets, Same Pipeline:
| Market | Data | Broker | Schedule |
|---|---|---|---|
| 🇨🇳 A-Share | Tencent API · akshare MCP | PaperBroker | RunDailyAt 08:01→15:05 |
| 🌐 Crypto | Binance API | Ai4TradeBroker | GlobalRunner 24/7 |
| 🇺🇸 US | yfinance · FRED · Reddit · StockTwits · Polymarket | PaperBroker | GlobalRunner NY 09:30-16:00 |
Signal Pipeline: Researcher(08:01) → ResearchSignal → Screener(09:27/14:55) → PoolSignal → Monitor(30s) → TradeSignal → Trader(5min). Full vnpy-style 3-layer architecture with breakout/pullback/volume_spike entry conditions. Design doc →
| Dimension | Athena | Typical Agent Framework |
|---|---|---|
| Copilot V2 (real agents) | ✅ @agent routes to real agent instances — reads DB, runs pipelines, grounded in real data (not fabricated) |
❌ One LLM pretends to be every agent |
| Causal inference | ✅ event-study CAR + LLM industry-chain propagation + counterfactual refutation + historical backfill | ❌ Correlation only |
| AutoTuner | ✅ Weekend LLM-driven param search, train/val split anti-overfit, versioned DB skills | ❌ Hardcoded params |
| Signal Pipeline | ✅ 3-layer (日频→盘中→执行) with ResearchSignal/PoolSignal/TradeSignal | ❌ No structured signal flow |
| Live trading | ✅ PaperBroker + Ai4TradeBroker | ❌ Backtest only |
| Market scanning | ✅ 105 stocks simultaneously | ❌ One ticker at a time |
| Knowledge injection | ✅ 9-source assembly before every analysis | ❌ Single prompt |
| Human-in-the-loop | ✅ Obsidian vault · feedback · stale detection | ❌ No human feedback loop |
| Debate | ✅ Bull/Bear 5-round adversarial + Judge | ❌ Single-pass analysis |
| MCP protocol | ✅ 22 tools · hot-plug registry | ❌ Hard-coded data sources |
| Dashboard | ✅ Agent status · thinking chains · token costs | ❌ Log files only |
# 1. Clone
git clone https://github.com/hjx/athena.git && cd athena
# 2. Set your DeepSeek API key
cp .env.example .env # then edit .env and fill DEEPSEEK_API_KEY
# 3. Start the engine (build + Docker Compose)
make run
# 4. Talk to the team
./ask "分析通鼎互联002491"
./ask "BTC 后市怎么看"
./ask "美股存储板块有没有机会"That's it. The engine starts all 5 agents across 3 markets automatically. Open http://localhost:8765 for the dashboard.
📐 Agent Workflow Diagram — EventBus topology, event routing table, daily timeline, 16-item data matrix.
Agent Pipeline:
- Researcher (2,177 lines) — 9-source knowledge injection → ReAct engine → daily briefing
- Screener (1,445 lines) — WarRoom coarse filter → Top20 → Bull/Bear LLM debate → Top5 signals
- Trader (1,611 lines) — 3-layer risk (hard limits · LLM judgment · execution rules) → broker
- Monitor (438 lines) — Every 3min scan · cooldown dedup · cross-market thresholds
- Reviewer (622 lines) — Post-close comparison · hit rate/Sharpe/drawdown → vault → feedback loop
9-Layer Knowledge Assembly: Before every Researcher run, 9 sources are assembled into a single context block and injected into the LLM prompt — including human feedback, review performance, debate verdicts, Obsidian vault notes with human annotations, Gold events, causal chains, and cross-references.
Bull vs Bear Debate: Each candidate stock goes through 5 rounds of adversarial debate with a judge verdict. Every claim must cite a [source: ...] — anti-hallucination by design.
Causal Inference, not just correlation: Every market event runs through event-study (CAR via the Python sidecar), causal discovery, and LLM-driven industry-chain propagation — then a refutation test (counterfactual) grades each causal link. Historical backfill recovers causality for events missed while offline. Design →
AutoTuner — self-tuning on weekends: An LLM-driven autotuner searches agent parameters (screener thresholds, risk config, entry conditions) every weekend, validates candidates on a train/validation split to avoid overfitting, then commits the best as a versioned update to the DB-backed skills store. Design →
22 MCP Tools on One Endpoint: Hermes, Codex, Claude, or any MCP client connects to :8767 and gets full access to the trading team — from querying briefings to fetching FRED macro data to calling StockTwits sentiment.
MIT License. See LICENSE for details.
Disclaimer: Athena is a research tool. It is not financial, investment, or trading advice. Trading performance varies based on model, temperature, data quality, and market conditions. Use at your own risk.
Athena 是一个生产级多 Agent AI 投研与交易系统,使用 Go(~72,000 行) + Python(~5k)+ React(~9k)编写。它部署了 5+ 个专业 LLM Agent,像真正的交易团队一样运作——不是分析一只股票,而是扫描全市场、辩论每只候选标的、执行交易、盯盘监控、复盘回顾,形成持续反馈闭环。
Copilot V2 —— 和「真正的 Agent」对话,而非扮演: Copilot 助手把 @agent 消息路由到真实的 agent 实例。@screener 选股 会触发真正的 Screener 跑多策略选股流程;@researcher 日报 会从数据库读取真实持久化的日报。回复基于真实数据(带防编造回退),不是 LLM 现场编的。多 agent 圆桌(@researcher @screener @trader)让多个 agent 轮流发言。(模拟盘执行——研究工具,非投资建议。)
三大市场,同一管线:
| 市场 | 数据源 | Broker | 调度 |
|---|---|---|---|
| 🇨🇳 A股 | 腾讯API · akshare MCP | PaperBroker | 定时 08:01→15:05 |
| 🌐 加密货币 | Binance API | Ai4TradeBroker | 24/7 持续 |
| 🇺🇸 美股 | yfinance · FRED · Reddit · StockTwits · Polymarket | PaperBroker | 纽约时段 09:30-16:00 |
| 维度 | Athena | 典型Agent框架 |
|---|---|---|
| Copilot V2(真 Agent) | ✅ @agent 路由到真实 agent 实例——读 DB、跑真实流程、基于真实数据(非编造) |
❌ 一个 LLM 扮演所有 agent |
| 因果推断 | ✅ 事件研究 CAR + LLM 产业链传播 + 反事实反驳 + 历史回溯 | ❌ 仅相关 |
| AutoTuner | ✅ 周末 LLM 调参 + 训练验证防过拟合 + 版本化写回 DB | ❌ 硬编码参数 |
| 实盘交易 | ✅ PaperBroker + Ai4TradeBroker | ❌ 仅回测 |
| 全市场扫描 | ✅ 同时扫描 105 只 | ❌ 一次分析一只 |
| 知识注入 | ✅ 每次分析前注入 9 个数据源 | ❌ 单次提示词 |
| 人机协同 | ✅ Obsidian双向编辑 · 反馈 · 过期检测 | ❌ 无人类反馈闭环 |
| 辩论机制 | ✅ 多空5轮对抗 + 裁判裁决 | ❌ 单次分析 |
| MCP协议 | ✅ 22个工具 · 热插拔注册中心 | ❌ 硬编码数据源 |
| 可视化 | ✅ Agent状态 · 思维链 · Token消耗 | ❌ 仅日志文件 |
因果推断,而非相关: 每个市场事件经事件研究法(Python sidecar 算 CAR)、因果发现、LLM 产业链传播,再用反事实反驳检验给每条因果链打分。历史回溯可补齐系统离线期间错过的事件因果。设计 →
AutoTuner —— 周末自动调参: LLM 驱动的调参器每周末搜索 agent 参数(选股阈值 / 风控 / 入场条件),在训练 / 验证集上验证候选以防过拟合,把最优解作为版本化更新写回 DB skills。设计 →
# 1. 克隆项目
git clone https://github.com/hjx/athena.git && cd athena
# 2. 配置 DeepSeek API key
cp .env.example .env # 编辑 .env 填入 DEEPSEEK_API_KEY
# 3. 启动引擎(编译 + Docker Compose)
make run
# 4. 与团队对话
./ask "分析通鼎互联002491"
./ask "BTC 后市怎么看"
./ask "美股存储板块有没有机会"启动后所有 Agent 自动运行,打开 http://localhost:8765 查看 Dashboard。
📐 Agent 工作流图 — EventBus 拓扑、事件路由表、交易日时间线、16 项数据落库矩阵。
Agent 管线 | 研究员出日报 → 选股官多空辩论选股 → 交易官三层风控下单 → 盯盘官持续扫描 → 复盘官收盘对比
9层知识注入 | 每次研究员分析前,9 个数据源组装为单一上下文块注入 LLM——含人类反馈、复盘绩效、辩论裁决、Obsidian笔记、Gold事件、因果链、交叉引用
多空辩论引擎 | 每只候选标的经5轮对抗辩论 + 裁判裁决。每个论点必须标注 [来源: ...]——天然反幻觉
22个MCP工具 | Hermes、Codex、Claude 等任何 MCP 客户端连接 :8767 即可访问全部交易团队能力
MIT 协议。详见 LICENSE。
免责声明: Athena 是研究工具,不构成任何金融、投资或交易建议。交易表现因模型、温度、数据质量和市场条件而异。使用风险自负。