Skip to main content
Every experiment follows the same path: a parent is chosen, a branch is cut, a coding agent implements the candidate and runs its evaluation in one session, and the judged result is committed — so the whole search stays inspectable afterwards. There is no separate debug loop: a failed evaluation surfaces in the session’s tags, the judge marks the evaluation invalid or writes corrective feedback, and the next iteration addresses it.

Git branch model

Each experiment runs in its own git branch, inheriting code from its parent experiment. This enables:
  • Isolation: Each experiment starts from a clean parent state
  • Inheritance: Child experiments build on parent solutions
  • Versioning: All code changes are tracked

Experiment session

The ExperimentSession manages a single experiment:

Implementation flow

One session does the whole build. run_implementation renders the implementation prompt — the problem, the chosen solution, the knowledge context and the repo memory — and hands it to the coding agent with the budget’s deadline:
The agent is responsible for running the evaluation itself and reporting the result in its closing tags (<code_changes_summary>, <evaluation_script_path>, <evaluation_output>, <score>, <technical_difficulties>). Errors are not retried inside the iteration; they become feedback for the next one.

Result structure

Each experiment is recorded as a SearchNode — solution, branch, evaluation tags, judged feedback and score. The full field list is on the search strategies page.

Session finalization

After an experiment completes:
  1. Commit changes to the experiment branch
  2. Push to origin (available for child experiments)
  3. Record cost from coding agent
  4. Cleanup session folder

Execution flow

The loop around one experiment

Coding agents

Who writes the code
Related pages: Execution flow · Coding agents · Orchestrator Kapso is an open-source framework by Leeroo that builds software toward measurable goals through experiment campaigns. Source code: github.com/Leeroo-AI/kapso · Install: pip install leeroo-kapso · Every page as plain text: llms.txt.