Evolve System
The Evolve System is Kapso’s core engine for building software solutions. It orchestrates an iterative experimentation loop that explores multiple approaches, learns from failures, and converges on high-quality solutions.How It Works
The system works by:- Receiving a goal : What you want to build (include success criteria in the goal)
- Initializing repo : From
initial_repo, workflow search, or empty - Gathering context : From Knowledge Graph and Repo Memory
- Generating solutions : Via pluggable coding agents
- Running evaluation : Agent builds and runs evaluation in
kapso_evaluation/ - Generating feedback : Feedback generator validates results and decides stop/continue
Key Components
Orchestrator
Central coordinator that manages the experimentation loop, budget tracking, and component lifecycle
Search Strategies
Algorithms for exploring the solution space: tree search or linear search
Coding Agents
Pluggable code generators: Aider, Gemini, Claude Code, OpenHands
Feedback Generator
Validates evaluation results and decides when to stop
Repo Memory
Tracks code understanding with file-level evidence
Basic Usage
Repository Initialization
Whenevolve() is called, the system initializes the workspace:
initial_repo Value | Behavior |
|---|---|
| Local path | Use existing repository as starting point |
| GitHub URL | Clone repository and use as starting point |
None (default) | Search for relevant workflow via Knowledge Graph. If found, clone workflow’s repo. Otherwise, create empty repo. |
Configuration Modes
Kapso provides preset configurations for different use cases:| Mode | Search Strategy | Best For |
|---|---|---|
GENERIC | Tree search (default) | General problem solving |
MINIMAL | Linear search | Quick experiments, simple problems |
TREE_SEARCH | Tree search with debugging | Complex problems requiring exploration |
SCORED | Tree search with scoring | Problems with clear metrics |
The Experimentation Loop
Each iteration of the evolve loop:- Select — Choose which solution candidates to explore
- Expand — Generate new variations using the coding agent
- Implement — Agent implements solution code
- Evaluate — Agent builds and runs evaluation in
kapso_evaluation/ - Feedback — Feedback generator validates results and provides guidance
- Check — If feedback says stop (goal achieved), return solution
Git Branch Model
Each experiment runs on its own Git branch:- Isolation — Experiments don’t interfere with each other
- History — Full Git history of all attempts
- Recovery — Easy to checkout and examine any experiment
Workspace Structure
After setup, the workspace looks like:Memory Systems
The Evolve System uses two memory systems:Repo Memory
Tracks understanding of the codebase:- Architecture — High-level structure and patterns
- Key Claims — Important facts about the code
- File Evidence — Which files support each claim
Experiment History
Learns from past experiments via MCP tools:- Top Experiments — Best scoring experiments
- Recent Experiments — Most recent experiments
- Similar Experiments — Semantic search for related experiments
Budget Tracking
The Orchestrator tracks costs across all components:max_iterations or time/cost budgets in configuration.