Skip to main content
Give Kapso a goal it can measure and it runs a campaign: designing candidate solutions, implementing each one, scoring it, and refining the best. You get back the winning code, its score, and a git branch per experiment.

Before you start

Kapso runs its inference through coding-agent CLIs, so confirm the machine is ready first:
Every required row must read [OK ]. If any does not, follow Installation — the CLIs and their logins are the part people miss.

Run a campaign

State a goal with a number in it. A goal Kapso cannot score is a goal it cannot optimize.
The campaign stops when the goal is met or the iteration budget runs out.
Bound the run by wall clock or spend instead of iterations with --time-budget-minutes and --cost-budget. Both are also evolve() keyword arguments.

What you get back

evolve() returns a SolutionResult:
Every experiment is committed to its own branch, so you can read the whole search, not just the winner:
If the run ends with WAITING ON YOU instead of COMPLETED, a session needs something only you can provide, such as an API key. kapso inbox shows the request and kapso inbox reply resumes the campaign; see the inbox.

Deploy the result

DeployStrategy accepts AUTO (the default, which picks for you), LOCAL, DOCKER, MODAL, BENTOML and LANGGRAPH. See Deployment.

Give the campaign more to work with

A campaign starts stronger when it starts with context. Both of these are optional.

Research the problem first

mode takes "idea", "implementation", "study", or a list of them. depth is "light" or "deep".

Ground it in a knowledge graph

Index a corpus once, then point campaigns at the index:
Indexing needs Weaviate and Neo4j running. See Optional: knowledge-graph backends.

How Evolve works

The experiment loop, end to end

CLI reference

Every command, flag and default

Execution flow

What happens inside one experiment

Knowledge and learning

How campaigns compound over time
Related pages: How Evolve works · CLI reference · Execution flow · Knowledge and learning 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.