Contribution Guide
This section provides step-by-step guides for extending AlphaApollo with new components. Whether you want to add a new tool, plug in a new task domain, or implement a new training algorithm, these guides walk you through the full process.
Extension Points
| Guide | What You'll Build | Difficulty |
|---|---|---|
| Adding a New Tool | A custom tool the LLM can invoke during reasoning (e.g., web search, database query) | ⭐ Easy |
| Adding a New Environment | A new task domain with its own reward, parsing, and projection logic | ⭐⭐ Medium |
| Adding a New Algorithm | A new training or inference workflow with CLI entry point and YAML config | ⭐⭐⭐ Advanced |
Prerequisites
Before diving into these guides, make sure you are familiar with:
- Agent System — The layered environment architecture
- Tools — The decorator-based tool framework
- Self-Evolution — The self-improvement pipeline
- Configuration — Hydra configs and YAML structure
Design Principles
AlphaApollo follows several conventions that all extensions should respect:
- Gym-style interface — Environments implement
reset()/step()/close(). - Decorator-based registration — Tools use
@tool; no manual registry needed. - XML tag protocol — The LLM communicates tool calls via
<tool_name>...</tool_name>tags. - Config-driven — All behavior is controlled by YAML configs with CLI overrides.
- Workflow pattern — Every algorithm is a workflow: config → preprocess → train/infer.