Skip to main content

Module agent

Module agent 

Source
Expand description

Sub-agent configuration, discovery, and invocation. KodaAgent — shared, immutable agent resources.

Holds everything that’s constant across turns within a session: tools, system prompt, project root. Shareable via Arc for parallel sub-agents.

Note: KodaConfig is NOT stored here because the REPL allows switching models and providers mid-session. Config lives on the caller side and is passed to KodaSession per-turn.

§Built-in agents

Koda ships with these built-in agents (see crate::config module):

AgentPurposeWrite access
defaultMain interactive agent with all toolsYes
taskGeneral-purpose worker for delegated tasksYes
exploreRead-only code search specialistNo
planArchitecture and planning specialistNo
verifyCode review and verificationNo

§Custom agents

Define agents as JSON files in agents/ (project) or ~/.config/koda/agents/ (global):

{
  "name": "testgen",
  "system_prompt": "You are a test generation specialist.",
  "model": "gemini-2.5-flash",
  "write_access": true,
  "allowed_tools": ["Read", "Write", "Edit", "Bash", "Grep", "Glob"]
}

See crate::config::AgentConfig for all available fields.

Structs§

KodaAgent
Shared agent resources. Immutable after construction.