Skip to main content

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

GuideWhat You'll BuildDifficulty
Adding a New ToolA custom tool the LLM can invoke during reasoning (e.g., web search, database query)⭐ Easy
Adding a New EnvironmentA new task domain with its own reward, parsing, and projection logic⭐⭐ Medium
Adding a New AlgorithmA 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:

Design Principles

AlphaApollo follows several conventions that all extensions should respect:

  1. Gym-style interface — Environments implement reset() / step() / close().
  2. Decorator-based registration — Tools use @tool; no manual registry needed.
  3. XML tag protocol — The LLM communicates tool calls via <tool_name>...</tool_name> tags.
  4. Config-driven — All behavior is controlled by YAML configs with CLI overrides.
  5. Workflow pattern — Every algorithm is a workflow: config → preprocess → train/infer.