Skip to main content
Kapso reads a single YAML file. Every tunable value lives there, and nothing is configured through environment variables.

Where the config comes from

Kapso ships a packaged config.yaml and uses it unless you point somewhere else:
Configuration and credentials are separate. Knobs — models, budgets, timeouts, gates — come from this file. Credentials never do: the coding-agent CLIs hold their own logins, and keys such as OPENAI_API_KEY are read from .env by the SDKs that need them.

Top-level keys

default_mode

Names the entry in modes used when nothing overrides it. Override per run with kapso evolve --mode MINIMAL or evolve(mode="MINIMAL").

inference

Routes model calls that are not coding-agent work: research, reranking and utilities.
The packaged config’s inference block is the base layer. An inference: block in your own config file deep-merges over it — override one key (say default.model) and the packaged roles and remaining defaults stay in force.
roles overrides default for one named role. Anything a role omits falls back to default, so kg_rerank above keeps cli: codex and only lowers effort and timeout.

preflight

These are the same checks kapso doctor reports. Leaving enabled: true is what makes a missing CLI fail in seconds instead of deep inside a run.

gates

The hosted MCP gates (see MCP gates). Bundled gates run in-process and have no entry here. Sessions connect to Leeroopedia’s hosted server directly; there is nothing to install.

deployment

The agent must be able to serve the model: a Claude model name on the codex agent is refused by a ChatGPT login. deploy(coding_agent=..., model=...) and kapso deploy --coding-agent override per call, and a deployment: block in your own config file layers over the packaged one key by key.

defaults

modes

A mode is a named bundle of settings. Two ship: GENERIC and MINIMAL. MINIMAL differs mainly by turning knowledge search off. Each mode carries six blocks.

search_strategy

The packaged cost defaults live in defaults.search_strategy.params.cost and are inherited by every mode. Override individual keys under modes.<mode>.search_strategy.params.cost. Cost-enabled runs require the generic strategy and budget.fidelity.mode: off. Platform cost settings are separate from model spend in USD controlled by evolve(cost_budget=...). See Capability-aware MCP gates. See Cost-aware selection for the estimator contract, measured-cost manifest, admission lifecycle, and resume checks.

coding_agent and feedback_generator

Both take the same shape:
See Search backends.

retry

Bounded exponential backoff for transient model failures. See Model routing and retries.

learner

Two sub-blocks, ingestor and merger, controlling learn_knowledge(). Both take a cli, a model, an auth_mode, an effort and a timeout (shipped: claude_code, claude-opus-5-5, oauth, xhigh, null), plus an agent_specific map (shipped empty) that is passed to the agent. cli names the coding agent that runs the sessions: claude_code with the first-party login that auth_mode selects, or vertex_claude_code for an open model on Vertex AI, whose settings (vertex_project, vertex_location) go in agent_specific; on that agent effort is applied as the open model’s reasoning_effort (Vertex accepts minimal to max for GLM 5.2; xhigh is sent as max); see Coding Agents. effort is the reasoning effort of every learning session, pinned here so a session never inherits the effort from the machine’s own Claude settings. timeout is a deadline in seconds; null, the default, means a phase runs until it finishes. ingestor additionally takes cleanup, cleanup_staging, fail_on_validation_errors, publish_workflows and github_repo_visibility. publish_workflows (off by default) publishes each extracted Workflow as a runnable GitHub repository after the pages have been validated; gh authenticates with GH_TOKEN, which the preflight requires when publishing is on. Off, a Workflow page keeps a placeholder in its GitHub URL section. A failed phase stops the run: learn_knowledge() raises rather than returning a partial result as a success. A run stages its clone, phase reports and pages under <wiki_dir>/_staging/<repo>/<branch> and marks each finished phase, so a run that stopped continues from the first unfinished phase when the same source is learned again; cleanup removes the clone once a run completes, cleanup_staging the whole directory. Learning sessions hold five file tools (Read, Write, Edit, Glob, Grep) plus the knowledge tools and nothing else, so they cannot run commands, reach the network or delegate; only the publishing session also gets Bash, for git and gh.

learning

Everything about trajectory learning: mining finished campaigns into an evidence-priced lesson bank. Shipped values worth knowing:
The store and the bank are Kapso’s own state and live under ~/.kapso, outside the project you run from, so a campaign’s --data-dir and seed copy never pick them up.
learning.serving.enabled ships as false. Until you turn it on, campaigns do not read from the lesson bank, so banked lessons have no effect on evolve().
update_crew.default_version is the version learn() uses when you do not pass learner_version.

CLI

Commands that accept —config

Python API

Passing config_path to Kapso()
Related pages: CLI · Python API · CLI 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.