This directory contains comprehensive analysis of the HelixCode distributed AI development platform.
1. HELIXCODE_COMPREHENSIVE_ANALYSIS.md (28KB)
Most detailed reference for architecture and implementation
Covers:
- Complete project structure and architecture
- All 10 LLM provider implementations with specific file locations and line numbers
- Advanced features breakdown (prompt caching, extended thinking, vision support, MCP protocol)
- Complete configuration system documentation
- Context window and token management strategies
- Task management system design
- Distributed worker pool architecture
- Intelligent model selection algorithm
- Type definitions and data structures
- Recommended features to port to other projects
Best for: Deep understanding of the codebase, implementation details, feature research
2. HELIXCODE_QUICK_REFERENCE.md (9KB)
Fast lookup reference for developers
Contains:
- Provider file locations table with API endpoints
- Core features location map
- Environment variables checklist
- Architectural patterns overview
- Advanced features matrix
- Build commands reference
- API endpoints list
- Important type definitions
- Model capabilities
- Debugging tips
- Performance considerations
Best for: Quick lookups while coding, finding where features are implemented
File: HELIXCODE_COMPREHENSIVE_ANALYSIS.md - Section 2
- Anthropic Claude (extended thinking, prompt caching, vision)
- Google Gemini (2M token context, multimodal)
- OpenAI, Qwen, xAI, OpenRouter, GitHub Copilot
- Local providers (Llama.cpp, Ollama)
File: HELIXCODE_COMPREHENSIVE_ANALYSIS.md - Section 3 & 7
- Tool/Function calling system (lines 14-53 in tool_provider.go)
- Reasoning engine (4 types: chain-of-thought, tree-of-thoughts, self-reflection, progressive)
- MCP protocol (WebSocket, tool execution, broadcasting)
- Vision support (multi-provider image understanding)
- Streaming (token-by-token delivery)
File: HELIXCODE_COMPREHENSIVE_ANALYSIS.md - Section 1 & 6
- Provider abstraction pattern
- Model manager and intelligent selection
- Task distribution system
- Worker pool management
- Configuration system
File: HELIXCODE_COMPREHENSIVE_ANALYSIS.md - Section 4
- Server settings
- Database configuration
- LLM provider configuration
- Notification channels (Slack, Telegram, Email, Discord)
- Environment variables
- Language: Go 1.24.0
- Module: dev.helix.code
- LLM Providers: 10 (Anthropic, Google, OpenAI, Qwen, xAI, OpenRouter, Copilot, Llama.cpp, Ollama, Local)
- Total Models Supported: 100+
- Core Packages: 18 internal packages
- Provider Files: 10 separate implementations
- Test Coverage: Unit, integration, E2E, automation, load tests
- Platforms: Linux, macOS, Windows, iOS, Android, Aurora OS, Symphony OS
| Topic | Location |
|---|---|
| Anthropic Claude | COMPREHENSIVE - Section 2 (anthropic_provider.go:1-400+) |
| Google Gemini | COMPREHENSIVE - Section 2 (gemini_provider.go:1-400+) |
| Tool Calling | COMPREHENSIVE - Section 3.1 (tool_provider.go:14-404) |
| Reasoning Engine | COMPREHENSIVE - Section 3.2 (reasoning.go:13-332) |
| MCP Protocol | COMPREHENSIVE - Section 3.3 (mcp/server.go:1-383) |
| Task Management | COMPREHENSIVE - Section 3.4 (task/manager.go:1-200+) |
| Worker Pool | COMPREHENSIVE - Section 3.6 (worker/ssh_pool.go:17-300+) |
| Model Selection | COMPREHENSIVE - Section 3.7 (model_manager.go:74-420) |
| Configuration | COMPREHENSIVE - Section 4 (config/config.yaml) |
| Provider Pattern | COMPREHENSIVE - Section 6 (provider.go:112-361) |
| Build Commands | QUICK_REFERENCE - Build Commands |
| Environment Setup | QUICK_REFERENCE - Environment Variables |
| API Endpoints | QUICK_REFERENCE - API Endpoints |
| Type Definitions | QUICK_REFERENCE - Type Definitions |
/internal/llm/provider.go- Base provider interface (line 112)/internal/llm/model_manager.go- Model selection algorithm (line 75)/internal/server/server.go- HTTP server setup/config/config.yaml- Configuration system
anthropic_provider.go- Extended thinking, prompt caching, visiongemini_provider.go- 2M token context, multimodalopenai_provider.go- Vision, function calling, reasoningqwen_provider.go- OAuth2, Chinese modelsxai_provider.go- Fast Grok modelsopenrouter_provider.go- Multi-provider aggregationcopilot_provider.go- GitHub integrationlocal_provider.go- Llama.cpp integrationollama_provider.go- Docker-based modelsllamacpp_provider.go- Direct C++ integration
tool_provider.go- Tool calling frameworkreasoning.go- Reasoning enginemcp/server.go- MCP protocoltask/manager.go- Task managementworker/ssh_pool.go- Worker poolworkflow/executor.go- Workflow engine
- Start Here: QUICK_REFERENCE.md - Get overview of file locations and features
- Provider Pattern: COMPREHENSIVE.md Section 6 - Understand how providers work
- Core Providers: COMPREHENSIVE.md Section 2 - Study Anthropic and OpenAI implementations
- Advanced Features: COMPREHENSIVE.md Section 3 - Learn tool calling, reasoning, MCP
- Architecture: COMPREHENSIVE.md Section 1 - Understand overall system design
See COMPREHENSIVE.md Section 9 - "Recommended Features to Port"
Suggested phased approach:
- Phase 1: Core provider system and manager
- Phase 2: Model selection intelligence
- Phase 3: Tool calling framework
- Phase 4: Advanced features (caching, thinking, vision)
- Phase 5: Task management and workflows
- Prompt caching reduces costs by 70-90% (Anthropic)
- Streaming for real-time responses
- Hardware-aware model selection
- Worker pool connection reuse
- Task checkpointing every 300 seconds
- API keys in environment variables
- JWT token expiration (24 hours default)
- SSH key-based worker authentication
- MCP tool permission system
- Database password encryption
Q: How do I add a new LLM provider? A: Implement the Provider interface (provider.go:112) and register with ProviderFactory (provider.go:339)
Q: How does model selection work? A: See ModelManager.SelectOptimalModel() in model_manager.go:75 - scores based on 6 factors
Q: How is prompt caching implemented? A: Automatic in anthropic_provider.go:48 - system messages and last message cached with ephemeral cache control
Q: How does distributed execution work? A: SSH worker pool (ssh_pool.go:17) with auto-installation, health monitoring, and capability-based assignment
Q: What's the MCP protocol flow? A: WebSocket connection → Session creation → Tool list → Tool execution → Broadcast notifications
- HELIXCODE_COMPREHENSIVE_ANALYSIS.md: 28KB, 500+ lines
- HELIXCODE_QUICK_REFERENCE.md: 9KB, 350+ lines
- This README: Reference index
This analysis was generated from the HelixCode repository at:
/Users/milosvasic/Projects/HelixCode/HelixCode
For the latest code, refer to the actual source files at the above location.
Last Updated: November 5, 2025 Analysis Scope: Complete codebase examination with line-by-line references