mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-01 17:17:24 -04:00
Reorganize documentation into user-focused, developer-focused, and deployment-focused sections. **New structure:** - Root: README.md (streamlined), QUICK_START.md, API_REFERENCE.md - docs/user-guide/: configuration, API usage, integrations, troubleshooting - docs/developer/: contributing, development setup, testing, architecture - docs/deployment/: Docker deployment, production checklist, monitoring - docs/reference/: environment variables, MCP tools, data formats **Changes:** - Streamline README.md from 831 to 469 lines - Create QUICK_START.md for 5-minute onboarding - Create API_REFERENCE.md as single source of truth for API - Remove 9 outdated specification docs (v0.2.0 API design) - Remove DOCKER_API.md (content consolidated into new structure) - Remove docs/plans/ directory with old design documents - Update CLAUDE.md with documentation structure guide - Remove orchestration-specific references **Benefits:** - Clear entry points for different audiences - No content duplication - Better discoverability through logical hierarchy - All content reflects current v0.3.0 API
1.4 KiB
1.4 KiB
Architecture
System design and component overview.
Component Diagram
See README.md for architecture diagram.
Key Components
FastAPI Server (api/main.py)
- REST API endpoints
- Request validation
- Response formatting
Job Manager (api/job_manager.py)
- Job lifecycle management
- SQLite operations
- Concurrency control
Simulation Worker (api/simulation_worker.py)
- Background job execution
- Date-sequential, model-parallel orchestration
- Error handling
Model-Day Executor (api/model_day_executor.py)
- Single model-day execution
- Runtime config isolation
- Agent invocation
Base Agent (agent/base_agent/base_agent.py)
- Trading session execution
- MCP tool integration
- Position management
MCP Services (agent_tools/)
- Math, Search, Trade, Price tools
- Internal HTTP servers
- Localhost-only access
Data Flow
- API receives trigger request
- Job Manager validates and creates job
- Worker starts background execution
- For each date (sequential):
- For each model (parallel):
- Executor creates isolated runtime config
- Agent executes trading session
- Results stored in database
- For each model (parallel):
- Job status updated
- Results available via API
Anti-Look-Ahead Controls
TODAY_DATEin runtime config limits data access- Price queries filter by date
- Search results filtered by publication date
See CLAUDE.md for implementation details.