A local-first AI Agent stack for creating NautilusTrader-based Crypto strategies from natural language and backtesting them.
BitgetAgent is an open-source desktop system for building, explaining, and backtesting Crypto trading strategies with AI. Generated strategies are implemented as NautilusTrader strategy code and validated through a NautilusTrader-based backtesting workflow.
The current product focuses on the strategy research loop:
- Describe a strategy idea in natural language, including market, timeframe, indicators, entry/exit logic, and risk preferences.
- Generate NautilusTrader strategy code and structured strategy definitions that can be inspected and revised.
- Backtest the strategy with NautilusTrader against historical market data to evaluate returns, drawdown, win rate, and risk behavior.
- Iterate with the Agent by asking for explanations, parameter changes, risk adjustments, and new variants.
BitgetAgent is local-first by default. It runs with SQLite out of the box, while also supporting multi-model LLM routing, tools, Agent Skills, visual workflows, and MCP integrations, including bitget-mcp-server for Bitget/Crypto market capabilities. The goal is to help developers and strategy researchers turn trading ideas into observable, testable, and repeatable strategy workflows.
Simulated trading and live trading are not the current headline capability. They are planned extension areas that will build on top of the strategy generation, validation, backtesting, and risk-control foundation.
-
Natural-language Strategy Creation
Turn plain-language strategy ideas into NautilusTrader strategy code, including indicators, entry conditions, exit rules, sizing assumptions, and risk constraints. -
Strategy Explanation & Iteration
Ask the Agent to explain generated logic, revise parameters, compare variants, tighten risk rules, or adapt a strategy for different market regimes. -
Backtesting Workflow
Evaluate generated strategies through NautilusTrader backtests, then inspect performance, drawdown, win rate, and other risk/return signals before considering any execution path. -
Crypto Agent Runtime
Multi-turn sessions, streaming responses, tool execution, task tracking, layered prompts, model routing, and episodic / semantic / procedural memory. -
Visual Workflow Builder
A ReactFlow-based editor for composing reusable research, strategy validation, backtesting, reporting, and automation flows. -
NautilusTrader Foundation
Strategy code follows NautilusTrader conventions, and backtests are run through the NautilusTrader backtest runner rather than a lightweight custom simulator. -
Declarative Rule Engine
YAML-based rules for thresholds, date windows, regular expressions, cross-validation, LLM judging, and strategy or risk conditions. -
Agent Skills & MCP
Extend Agent behavior withSKILL.mdskill bundles and Model Context Protocol integrations for research, data access, strategy development, and validation workflows. -
bitget-mcp-server Integration
Connects BitgetAgent to bitget-mcp-server through MCP, giving the Agent a dedicated bridge for Bitget/Crypto market tooling instead of relying only on built-in local tools. -
Multi-Model Providers
Supports DeepSeek, DashScope / Qwen, OpenAI, Anthropic, Ollama, vLLM, Azure OpenAI, and other OpenAI-compatible providers. -
Local-first Deployment
SQLite by default, single-machine friendly, with optional PostgreSQL and Milvus for larger setups.
Strategy Ideas / Market Data
|
v
BitgetAgent Tools / MCP / Workflows
|
v
Agent Runtime
(QueryEngine, memory, prompts, model routing)
|
+-- Natural-language strategy creation
+-- NautilusTrader strategy code generation
+-- Strategy explanation and revision
+-- NautilusTrader backtesting and result analysis
+-- bitget-mcp-server MCP integration
+-- Risk-rule checks
+-- Research reports and workflow automation
+-- Simulated / live trading extensions (planned)
Key modules:
backend/bitget_agent/agent— Agent orchestration, planning, tool execution, and subagents.backend/bitget_agent/tools— Built-in tool system for data, automation, execution, and analysis.backend/bitget_agent/mcp— MCP client, server management, and proxy tools, including integration paths such asbitget-mcp-server.backend/bitget_agent/services/trading— NautilusTrader strategy generation, validation, backtesting, and strategy-chat iteration services.backend/bitget_agent/workflow— Workflow engine and visual node runtime.backend/bitget_agent/rules— Declarative rule engine.backend/bitget_agent/memory— Three-store Agent memory.backend/bitget_agent/llm— Multi-provider LLM service and routing.frontend/— React 19 + TypeScript desktop web UI.
Prerequisites: git, uv, Node.js 20+ or 22+.
git clone https://github.com/fantasyni/BitgetAgent.git
cd BitgetAgent/cd backend
uv sync --extra dev
uv run bitget-agent init
uv run bitget-agent app startcd frontend
npm install
npm run dev- Backend:
http://localhost:7860 - Frontend:
http://localhost:5172
BitgetAgent is being focused from a general AI automation platform into a dedicated Crypto strategy Agent stack.
Current implemented focus:
- NautilusTrader strategy generation, explanation, backtesting, and iteration
- Natural-language strategy creation and modification
- Backtest result analysis and strategy comparison
- Risk-rule expression and validation
- MCP integration with
bitget-mcp-server - A local, controllable Agent runtime for strategy research
Roadmap areas:
- Simulated trading
- Live trading
- Exchange adapters
- Execution monitoring and production-grade risk controls
Issues and pull requests are welcome. For larger or ambiguous changes, please open an issue first.
Please follow:
- Coding conventions in
AGENTS.md - Python type hints, Pydantic v2, and async I/O conventions
- TypeScript, React, and frontend i18n parity rules
- Tests for behavior changes
Apache License 2.0. See LICENSE.