Component responsibilities
Kapso (main API)
The user-facing entry point that provides the four-pillar API:OrchestratorAgent
The central coordinator. Each iteration it computes budget progress, hands the strategy the problem statement plus the previous iteration’s feedback, runs one search iteration, and stops when the judge’s verdict says the goal is met (and the handler’s task semantics honor that vote) or a budget dial reaches 100%. The faithful loop sketch lives on the orchestrator page;solve() returns a SolveResult with the deliverable experiment and the stop reason.
Pluggable components
All major components are created via factories and can be swapped via configuration:Configuration flow
Data flow
- Problem Handler provides problem context
- Experiment History accessed via MCP tools
- Search Strategy generates and selects solutions
- Experiment Workspace manages git branches
- Coding Agent generates code and runs evaluation
- Coding agent ends its session with XML result tags (summary, evaluation path and output, score)
- Feedback Generator validates evaluation and decides stop/continue
- RepoMemory tracks code understanding across experiments
Directory structure
Key design patterns
Factory pattern
All pluggable components use factories with decorator-based registration:Configuration modes
Configuration is organized into modes that bundle related settings:Git-based experiment isolation
Each experiment runs on its own git branch, enabling:- Parallel experimentation
- Easy rollback to any state
- Parent/child lineage across candidates
- RepoMemory inheritance across branches
Related
Execution Flow
Step-by-step execution process
Feedback Generator
How evaluation is validated and feedback generated
Knowledge graph
How knowledge is acquired and used
Components
Deep dive into core components
pip install leeroo-kapso · Every page as plain text: llms.txt.