Skip to main content
OrchestratorAgent runs the experiment loop. It asks the search strategy for a candidate, hands it to a coding agent, runs the evaluation, and asks the feedback generator whether to continue — tracking the budget across the whole campaign.

What does the orchestrator do?

  1. Budget Tracking: Monitor time, iterations, and cost
  2. Context Gathering: Assemble problem + KG + history
  3. Search Coordination: Run search strategy iterations
  4. Stop Checking: Check if feedback generator decided to stop
  5. Resource Cleanup: Close connections when done

How do I run one?

Direct usage

What happens in one iteration?

How is the budget tracked?

The orchestrator tracks three budgets: Budget progress is the maximum of all three:
When any budget reaches 100%, the loop stops.

How are components created?

The orchestrator creates components from configuration:

Search strategy

Cost tracking

Every component reports into one BudgetLedger: the inference meter, the coding-agent sessions, and per-node phase telemetry all record against it, and get_cumulative_cost() returns self.budget_ledger.total_cost(). There is no per-component summing to drift out of agreement.

What gets cleaned up?

The orchestrator cleans up resources in a finally block:

Configuration

Constructor parameters

Search Strategies

Explore solution space algorithms

Coding Agents

Pluggable code generators

Feedback Generator

How evaluation is validated

Execution Flow

Step-by-step execution process
Related pages: Search Strategies · Coding Agents · Feedback Generator · Execution Flow 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.