Which agents can I use?
Both shipped config modes,
GENERIC and MINIMAL, set coding_agent.type: claude_code, so that is the agent you get unless you override it.
An agent is only registered if its dependencies import, so aider is absent from a default install and kapso --list-agents shows six. Run that command to see what is actually available on your machine — it prints each registered agent with its description, default model, install command and the environment variables it reads:
Agent interface
All agents implementCodingAgentInterface:
How do I build an agent directly?
Most of the time the config picks the agent. To construct one yourself:CodingAgentFactory.list_available() returns the registered agent names.
Claude Code
Anthropic’s CLI, and what both shipped config modes use. Best on complex refactoring and planning, with MCP tool support.How do I authenticate Claude Code?
auth_mode accepts four values:
The shipped config sets
oauth on every Claude Code block, and the low-level adapter defaults to auto. For a non-interactive environment set CLAUDE_CODE_OAUTH_TOKEN in .env.
An explicit mode removes higher-precedence credentials from the Claude subprocess environment, so oauth ignores an inherited ANTHROPIC_API_KEY, and bedrock drops every Anthropic credential so the CLI cannot bill the wrong provider. The parent process environment is never modified.
Bedrock happens only when a config names it. auto never resolves to Bedrock, even with AWS credentials in the environment, so an existing campaign never changes provider, cost or model naming behind your back. Two things change together with the mode: aws_region is required and read from the config, never from AWS_REGION, and models are named by Bedrock inference profile id (us.anthropic.claude-haiku-4-5-20251001-v1:0) rather than by the aliases the other modes take. A missing region or missing credentials fails when the agent is constructed, with the fix in the message.
Codex
OpenAI’s CLI, run non-interactively with a full-access sandbox. This is whatinference uses for research, judging and utility calls.
CODEX_API_KEY in .env instead of logging in for a non-interactive environment.
Gemini
Google’s SDK, viapip install google-generativeai. Fast and cost-effective for iterative refinement.
GOOGLE_API_KEY in .env.
OpenHands
Sandboxed, Docker-backed execution with full system access inside the sandbox.OSS Claude Code
The Claude Code CLI pointed at an open-source model over an Anthropic-compatible endpoint, such as GLM on Fireworks. Same CLI, different backend.Vertex AI Claude Code
The Claude Code CLI driven by an open model that Vertex AI Model Garden serves as a managed API, such as GLM 5.2. Vertex speaks the OpenAI protocol and authenticates with Google credentials, neither of which the CLI understands, so the adapter starts a local LiteLLM proxy on an ephemeral port: the CLI talks Anthropic to the proxy, the proxy talks Vertex to Google. One proxy serves every session of the process and stops with it. The proxy port is guarded by a random key minted per process, and the CLI’s first-party credentials, update checks and telemetry are kept away from it.pip install 'litellm[proxy]>=1.103' google-cloud-aiplatform in a venv of its own whose bin is on PATH (the proxy and the Vertex SDK its route imports; older LiteLLM releases do not know the Model Garden open models, and Kapso’s own environment pins an older LiteLLM for its utility calls) and a Google credential that google-auth can find: gcloud auth application-default login on a workstation, or the service account of a Compute Engine machine (with the Vertex AI User role). The proxy reads the credential; Kapso never does. A bridge counts as up only after one one-token request has reached the model and come back, so a missing credential, a wrong project or an unknown model fails at start with Vertex’s reason, not mid-session. The same block works for the learning sessions: set learner.ingestor.cli and learner.merger.cli to vertex_claude_code with the model and agent_specific beside them. kapso doctor checks the proxy binary, the credential file and the project before a run starts.
The manifest also sets CLAUDE_CODE_MAX_OUTPUT_TOKENS=64000 in the CLI’s environment (set-if-absent, through env_defaults): open models write big files in one turn and the CLI’s default 32k cap aborts the session; override it in agent_specific.env_defaults if your model’s limit differs.
effort means the same thing here as for the other agents, the session’s reasoning effort, but it is applied differently: the CLI’s --effort flag is an Anthropic-only request field that the proxy would drop, so the adapter sets the value as the open model’s reasoning_effort on the proxy, for every request of the session. Vertex accepts minimal, low, medium, high and max for GLM 5.2 and rejects anything else; xhigh, the shipped default, is sent as max, which is how Z.ai defines it. Omitting the key leaves the model’s own default (max for GLM 5.2); other open models take their own values. The learner’s effort reaches the model the same way when the learner runs on this agent.
OpenAI-compatible API
openai_compatible is an explicit, opt-in adapter for
Chat Completions
endpoints, including compatible hosted providers and local servers. It uses
the existing openai dependency and does not require a CLI login itself.
Provider and model support for individual request fields varies.
Text-only inference
Configure a role whose entire context is supplied in its prompt, such as knowledge-search reranking. Copy the packagedsrc/kapso/config.yaml to
kapso-config.yaml and add this role override under inference. Keep the
other sections, especially modes; an inference-only file is not a complete
configuration for evolve:
Kapso(config_path="kapso-config.yaml") or
kapso evolve --config kapso-config.yaml --goal "...".
kapso research --config ... also accepts a config path, but its research
role must use a web-capable agent. Plain Chat Completions supplies no web
search here; attempting that route fails explicitly before an API request.
Inference returns text without interpreting it as file edits. Nested
agent_specific settings inherit from inference.default and can be
partially overridden per role. Setting the default to openai_compatible
does not replace GENERIC ideation or implementation: those sessions still
use their separately configured Claude Code/Codex backends. Keep roles that
need filesystem or web tools on a capable agent.
Endpoint and request settings
base_url comes only from config. Its default, the official OpenAI endpoint,
is defined in agents.yaml; shell variables cannot override it. Use HTTPS:
HTTP is accepted only for loopback hosts (localhost, 127.0.0.0/8, or ::1).
The KG graph-search embeddings client likewise uses a config-only endpoint;
set knowledge_search.params.embedding_base_url in the active mode when
embeddings need a different provider. That endpoint must support the
configured embedding model.
api_key_env defaults to OPENAI_API_KEY. For an unauthenticated local
server, set base_url: http://localhost:8000/v1 and
allow_missing_api_key: true. Preflight prints the configured endpoint beside
the key it checks. doctor --models currently
live-probes CLI models only; it does not verify this endpoint’s model access.
max_output_tokens is sent as max_tokens by default. For models requiring
max_completion_tokens, set it in request_options; it replaces
max_tokens. Set temperature: null to omit sampling temperature:
request_options.
Session-controlled fields (model, messages, timeout), streaming,
multiple choices, tools, and extra_body cannot be overridden there.
The adapter uses a 600-second request timeout by default, configurable via
agent_specific.timeout; a per-call timeout_seconds takes precedence.
SDK retries are disabled so a failed request does not silently multiply this
request timeout. Token usage is returned in metadata; monetary cost tracking
is unavailable, so do not rely on Kapso’s cost budget to cap provider charges.
The adapter is registered for CliInference with inference_only: true in
agents.yaml. It is excluded from both evolve -a and
deploy --coding-agent choices. It cannot read or write workspace files,
execute commands, use tools, or verify evaluation results; all context must
be supplied in the prompt. Provider and transport errors propagate; empty,
incomplete, or tool-call responses return a failed result.
CodingResult
All agents return a standardized result:What must an agent return?
When used withkapso.evolve(), the coding agent must end its response with XML tags:
score becomes a float; null or an empty value becomes None) and hands them to the feedback generator to validate the evaluation and decide whether to continue. There is no fallback format: output without the tags is a warning and an empty result.
An implementation session may also end without the tags by calling the request_from_user tool when the session needs something only a person can provide. Kapso later resumes that very session with your reply, through claude -p --resume for Claude Code and codex exec resume for Codex, which is why implementation sessions are launched with a session id (--session-id on Claude Code, --json on Codex to capture the thread id). See the inbox.
Example agent output
How does the feedback generator use an agent?
Coding agents also power the feedback generator. The default feedback generator usesclaude_code, but any agent can be used:
CodingAgentConfig
Configuration passed to agents:How do I add my own agent?
agents.yaml are registered on module import; register() is how you add one at runtime.
How is Git handled?
Two ways, and the agent declares which by returning fromsupports_native_git():
False except aider, which auto-commits.
What capabilities does an agent report?
Related
Configuration
Experiment lifecycle
pip install leeroo-kapso · Every page as plain text: llms.txt.