Skip to main content

Overview

Coding agents are responsible for generating and modifying code based on prompts. Kapso supports multiple agents, each with different strengths.

Available Agents

Agent Interface

All agents implement CodingAgentInterface:

Aider (Default)

Git-centric pair programming with diff-based editing.

Features

  • Automatic git commits
  • Diff-based file editing
  • Context-aware code understanding
  • Cost tracking

Configuration

Usage

Claude Code

Anthropic’s Claude Code CLI for complex tasks.

Features

  • Advanced reasoning
  • Complex refactoring
  • MCP tool support
  • Explicit OAuth, Anthropic API-key, and AWS Bedrock authentication

Installation

Configuration

auth_mode accepts four values: The low-level Claude Code adapter defaults to auto. Kapso’s generic search presets continue to default to bedrock, so upgrading does not silently switch an existing AWS experiment to a developer’s local subscription. Explicit modes remove conflicting provider flags and higher-precedence credentials from the Claude subprocess environment. For example, oauth ignores an inherited ANTHROPIC_API_KEY, while api_key ignores an inherited Bedrock flag. The parent process environment is never modified.

OAuth

Authenticate the local Claude CLI, then choose oauth:
For a non-interactive environment, CLAUDE_CODE_OAUTH_TOKEN is also accepted. See Anthropic’s authentication documentation for token setup and the terms that apply to subscription credentials.

Anthropic API key

AWS Bedrock

For AWS Bedrock:
Set one supported AWS credential source and a region:
AWS_BEARER_TOKEN_BEDROCK or AWS_PROFILE can be used instead of access keys.

Compatibility migration

use_bedrock remains supported for one compatibility period and emits a DeprecationWarning:
When both keys are present, auth_mode wins. New configurations should only use auth_mode.

Gemini

Google Gemini SDK for fast generation.

Features

  • Fast response times
  • Good for iterative refinement
  • Cost-effective

Configuration

Set API key:

OpenHands

OpenHands agent with sandboxed execution.
OpenHands has conflicting dependencies with aider-chat. Use a separate conda environment.

Installation

Features

  • Sandboxed execution
  • Docker-based isolation
  • Full system access in sandbox

Configuration

CodingResult

All agents return a standardized result:

Structured JSON Output

When used with kapso.evolve(), the developer agent must return a structured JSON at the end of its response:
This JSON is extracted by the search strategy and used by the feedback generator to validate results and decide whether to continue.

Example Agent Output

CodingAgentConfig

Configuration passed to agents:

Creating Custom Agents

Git Integration

Agents can handle git in two ways:

Native Git (Aider)

Agent commits changes automatically:

Session-Managed Git (Others)

ExperimentSession commits after generation:

Agent Capabilities

Listing Agents

Output: