Skip to main content

Overview

Kapso uses a modular architecture with pluggable components connected through factories. The system is designed around a central orchestration loop that coordinates experimentation.

Component Responsibilities

Kapso (Main API)

The user-facing entry point that provides the four-pillar API:

OrchestratorAgent

The central coordinator that manages the solve loop:

Pluggable Components

All major components are created via factories and can be swapped via configuration:

Configuration Flow

Data Flow

  1. Problem Handler provides problem context
  2. Experiment History accessed via MCP tools
  3. Search Strategy generates and selects solutions
  4. Experiment Workspace manages git branches
  5. Coding Agent generates code and runs evaluation
  6. Developer Agent returns structured JSON with evaluation results
  7. Feedback Generator validates evaluation and decides stop/continue
  8. 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
  • Tree-based solution exploration
  • RepoMemory inheritance across branches

Next Steps

Execution Flow

Step-by-step execution process

Feedback Generator

How evaluation is validated and feedback generated

Knowledge System

How knowledge is acquired and used

Components

Deep dive into core components