Forecasting + multi-agent research + execution/backtesting, unified under one integration-first API hub.
Kronos Hub connects:
Kronosfor OHLCV forecastingTradingAgentsfor multi-agent research and debateAI Hedge Fundfor execution and backtesting
Instead of smashing three codebases into one fragile runtime, it adds a worker-based orchestration layer and a single API surface on top of existing projects.
Quick links: Hosted Docs · Architecture · API · Hybrid Demo · 中文说明
The current workspace already supports real worker-backed routes for:
| Route | Purpose | Status |
|---|---|---|
POST /predictions/kronos |
Single-series OHLCV forecasting | Live |
POST /predictions/kronos/batch |
Batch OHLCV forecasting | Live |
POST /research/tradingagents |
Multi-agent research and decision generation | Live |
POST /execution/ai-hedge-fund/run |
Analysis / execution flow | Live |
POST /execution/ai-hedge-fund/backtest |
Backtesting flow | Live |
POST /runs |
Unified engine entrypoint | Live |
New in this repo:
- a minimal hybrid demo chain that executes a real Kronos forecast and synthesizes a structured signal in the hub
- optional fan-out into
TradingAgentsresearch andAI Hedge Fundexecution/backtesting when credentials are available - GitHub Pages-ready docs and a public-facing repo structure designed for discoverability
These upstream projects are complementary, but they are not packaged around the same boundary:
Kronosbehaves like a forecasting engine and model toolkitTradingAgentsbehaves like a reusable research engineAI Hedge Fundbehaves like an execution, backtesting, and app shell
Kronos Hub turns them into one extensible workspace with:
- a shared FastAPI gateway
- a unified engine registry
- subprocess worker isolation for dependency conflicts
- runnable request templates and PowerShell scripts
- a bridge layer for forecast -> research -> execution orchestration
The new hybrid mode is no longer only a placeholder.
Minimal demo path
- Run a real
Kronosforecast from OHLCV history. - Build a hub-side signal summary from forecast output.
- Optionally expand into
TradingAgentsresearch. - Optionally expand into
AI Hedge Fundexecution or backtesting.
Use the demo template:
Or the runnable script:
.\examples\scripts\invoke-hybrid-demo.ps1With optional expansion:
.\examples\scripts\invoke-hybrid-demo.ps1 -EnableResearch
.\examples\scripts\invoke-hybrid-demo.ps1 -EnableResearch -EnableExecutionYou absolutely can, and for some users that is still the right choice.
But this repo becomes interesting when you want one or more of these:
- one API surface instead of three unrelated entrypoints
- one place to inspect project availability, health, and orchestration paths
- isolated workers for conflicting dependencies instead of a risky merged environment
- a bridge layer where forecast outputs can be normalized before research/execution
- a future product surface that can evolve into one coherent quant workflow
In short:
- use the upstream repos if you want each tool on its own
- use
Kronos Hubif you want an integration layer and an eventual unified platform
flowchart LR
Client["Client / Scripts / Future UI"] --> Gateway["FastAPI Gateway"]
Gateway --> API["kronos_hub.api"]
API --> Registry["EngineRegistry"]
Registry --> Services["Service Layer"]
Services --> Workers["JSON Workers"]
Workers --> Kronos["Kronos-master"]
Workers --> TradingAgents["TradingAgents-main"]
Workers --> AIHF["ai-hedge-fund-main"]
Registry --> Hybrid["Hybrid Adapter"]
The request flow is intentionally simple:
- A client hits the unified hub API.
- The API layer validates and translates the request.
- The service layer builds a worker payload.
- A dedicated worker process enters the target subproject.
- Results are normalized back into a single JSON contract.
Copy-Item .env.example .envpip install -e .Or bootstrap a dedicated hub environment:
.\scripts\bootstrap_hub.ps1python .\scripts\smoke_check.py
python -m unittestpython -m uvicorn apps.api_gateway.main:app --reload --port 8010Or:
.\scripts\run_api.ps1Then open:
http://127.0.0.1:8010/http://127.0.0.1:8010/docs
The recommended setup is to give each vendored project its own Python environment, then point the hub at each interpreter:
KRONOS_HUB_KRONOS_PYTHON
KRONOS_HUB_TRADINGAGENTS_PYTHON
KRONOS_HUB_AI_HEDGE_FUND_PYTHON
This keeps:
- LangGraph / LangChain conflicts contained
- Kronos model dependencies isolated
- integration work moving without forcing a risky full refactor
F:\kronos
├─ ai-hedge-fund-main/ # vendored execution / backtesting app
├─ TradingAgents-main/ # vendored multi-agent research engine
├─ Kronos-master/ # vendored OHLCV forecasting project
├─ apps/
│ └─ api_gateway/ # external FastAPI entrypoint
├─ docs/
│ ├─ api.md
│ ├─ architecture.md
│ ├─ development.md
│ ├─ github-branding.md
│ └─ index.html # GitHub Pages-ready docs landing page
├─ examples/
│ ├─ requests/
│ └─ scripts/
├─ kronos_hub/
│ ├─ api/
│ ├─ engines/
│ ├─ services/
│ ├─ shared/
│ └─ workers/
├─ scripts/
├─ tests/
└─ README.md
The repo already includes runnable request templates and PowerShell scripts:
- examples/README.md
examples/requests/*.jsonexamples/scripts/*.ps1
Common entrypoints:
.\examples\scripts\invoke-kronos-sample.ps1
.\examples\scripts\invoke-hybrid-demo.ps1
.\examples\scripts\invoke-tradingagents-sample.ps1
.\examples\scripts\invoke-aihf-run-sample.ps1
.\examples\scripts\invoke-aihf-backtest-sample.ps1This repo already unifies three working capability layers, but deeper product integration is still ahead:
TradingAgentsnow receives forecast context across analyst, researcher, trader, risk, and portfolio prompts, but deeper tool-level fusion is still aheadhybridcurrently bridges forecast and research through hub-generated signal synthesis plus injected prompt contextAI Hedge Fundis not yet fully re-centered around the hub gateway- a unified UI, result store, and logging layer are still future work
For open-source users, this repo is valuable in at least three ways:
- as a practical reference for integrating heterogeneous AI/quant projects without a full rewrite
- as a working FastAPI + subprocess worker orchestration example
- as a foundation for building a forecasting-aware research and execution stack
The highest-leverage next steps are:
- Make
hybridperform a deeper forecast-aware research handoff inside upstream reasoning graphs. - Define a shared signal schema between forecast and research layers.
- Route more of the execution and UI surface through the hub gateway.
- Add unified storage, logging, and visualization for results.
- Publish a lightweight live demo or hosted sandbox beyond docs-only Pages.
- Hosted Docs
- docs/architecture.md: architecture and runtime boundaries
- docs/api.md: routes and request payloads
- docs/development.md: local development workflow
- docs/github-branding.md: GitHub About / Topics / Website suggestions
- CONTRIBUTING.md: contribution guidance
- SECURITY.md: security reporting guidance
- THIRD_PARTY_NOTICES.md: third-party code and license boundaries
- MERGE_ASSESSMENT.md: original integration strategy notes
The root integration layer is licensed under Apache-2.0. Vendored upstream directories keep their own licenses and notices. Read THIRD_PARTY_NOTICES.md before redistributing the full repository.
This repository is for research, engineering integration, and educational use. It is not investment advice.
Kronos Hub 是一个面向量化研究与策略执行场景的集成式 Hub,用统一 API 把下面三个独立项目接到同一套工作流里:
Kronos-master: 金融时间序列 OHLCV 预测模型TradingAgents-main: 多代理研究与辩论引擎ai-hedge-fund-main: 执行、回测、后端和前端应用壳
这不是把三套代码强行揉成一个单体应用,而是一个 integration-first 的总控层:上层统一接口,下层隔离运行时。
Kronos已通过 worker 封装为统一预测服务TradingAgents已通过 worker 接为真实研究引擎ai-hedge-fund已通过 worker 接为执行 / 回测壳hybrid已经具备可演示链路:真实 forecast + hub-side signal synthesis + forecast 注入 TradingAgents 提示链 + 可选 research/execution
TradingAgents和ai-hedge-fund的 LangGraph / LangChain 版本并不一致Kronos偏 PyTorch / Hugging Face 模型推理- 三者产品边界不同,一个像模型工具箱,一个像研究引擎,一个像应用壳
所以 Hub 采用:
- 上层统一:FastAPI 网关、引擎注册表、共享请求 / 响应模型
- 下层隔离:每个子项目可以绑定自己的 Python 解释器
- 调度方式:通过
subprocessworker 直接调用真实项目代码
.\examples\scripts\invoke-hybrid-demo.ps1扩展到研究 / 执行:
.\examples\scripts\invoke-hybrid-demo.ps1 -EnableResearch
.\examples\scripts\invoke-hybrid-demo.ps1 -EnableResearch -EnableExecutionTradingAgents已经在 analyst / researcher / trader / risk / portfolio prompts 中消费 forecast context,但更深的工具级融合还没完成hybrid当前仍以 Hub 侧 signal synthesis + prompt 注入作为桥接主路径ai-hedge-fund还没有完全以 Hub 网关作为统一后端- 统一日志、统一回测结果视图、统一前端入口仍是下一阶段工作
