Overview
TheOrchestratorAgent is the central coordinator that manages the experimentation loop. It connects all components and runs iterations until a stop condition is met.
Responsibilities
- Budget Tracking: Monitor time, iterations, and cost
- Stop Condition Checking: Determine when to stop
- Context Gathering: Assemble problem + KG + history
- Search Coordination: Run search strategy iterations
- Resource Cleanup: Close connections when done
Usage
Via Kapso API (Recommended)
Direct Usage
The Solve Loop
Budget Tracking
The orchestrator tracks three budgets:| Budget | Description | Progress Calculation |
|---|---|---|
| Time | Wall-clock time | elapsed / time_budget |
| Iterations | Experiment count | i / max_iterations |
| Cost | LLM API cost | cumulative_cost / cost_budget |
Component Creation
The orchestrator creates components from configuration:Search Strategy
Knowledge Search
Context Manager
Cost Tracking
Resource Cleanup
The orchestrator cleans up resources in afinally block:
Configuration
Constructor Parameters
| Parameter | Type | Description |
|---|---|---|
problem_handler | ProblemHandler | Handles problem context and evaluation |
config_path | str | Path to config.yaml |
mode | str | Configuration mode (GENERIC, MINIMAL, etc.) |
coding_agent | str | Override coding agent type |
is_kg_active | bool | Whether to enable knowledge graph |
knowledge_search | KnowledgeSearch | Pre-configured search instance |
workspace_dir | str | Custom workspace directory |
starting_repo_path | str | Seed experiments from existing repo |