Coding Agent

Build agents that work on a codebase: read and edit files, run commands and tests in a sandbox, plan multi-step work, iterate toward a goal autonomously, and orchestrate parallel reviewers — all native to ADK-Rust, on any model provider.

This is assembled from a few focused pieces rather than a monolithic framework:

PieceWhat it gives youPage
adk-devtoolsThe inner-loop tools — read_file, write_file, edit_file, glob, grep, bash — scoped to a workspace directoryDev tools
CodingAgent (in adk-agent, feature coding)A one-call harness wiring those tools + a planning write_todos tool + a minimal prompt onto an LlmAgentHarness
CLI (adk-rust code / goal / ultracode)Native commands: one-shot tasks, autonomous goal mode, and parallel ultra-reviewCLI
Graph workflows (adk-graph)Fan out to parallel specialist agents and synthesize — the "ultra" patternWorkflows
ExamplesThree runnable example cratesExamples

New to ADK-Rust? Read the Introduction and Quickstart first. This section builds on agents, tools, sessions, and (optionally) memory and graphs.

What you can build

  • A one-shot coding task — "make the failing test pass", "add a /health route". The agent explores, edits, runs tests, and reports.
  • Autonomous goal mode — give a goal + a verifiable success condition (a command that must exit 0); the agent loops plan → act → verify, self-correcting until it passes or a budget runs out. Durable and resumable. (Codex/Hermes /goal style.)
  • Ultra-review workflows — implement, then fan out to parallel correctness/edge-case/style reviewers, synthesize their verdicts, and revise until they approve. (Claude Code ultracode/ultrareview style.)

Install

# The harness (pulls in the dev tools) + a model provider
adk-agent = { version = "2.0.0", features = ["coding"] }
adk-devtools = "2.0.0"
adk-model = { version = "2.0.0", features = ["gemini"] }
adk-runner = "2.0.0"
adk-session = "2.0.0"

The dev tools are sandbox-first and have no heavy dependencies, so the footprint stays small; adk-graph is only needed for the parallel workflows.

60-second quick start

use adk_agent::coding::CodingAgent;
use adk_devtools::Workspace;
use adk_runner::Runner;
use adk_session::{CreateRequest, InMemorySessionService, SessionService};
use adk_core::{Content, SessionId, UserId};
use std::sync::Arc;

# async fn run(model: std::sync::Arc<dyn adk_core::Llm>) -> anyhow::Result<()> {
// One call builds a coding agent over a confined workspace.
let coding = CodingAgent::builder()
    .model(model)
    .workspace(Workspace::new("./my-repo"))
    .build()?;

let sessions: Arc<dyn SessionService> = Arc::new(InMemorySessionService::new());
sessions.create(CreateRequest {
    app_name: "demo".into(), user_id: "u".into(),
    session_id: Some("s".into()), state: Default::default(),
}).await?;

let runner = Runner::builder()
    .app_name("demo")
    .agent(coding.agent())          // -> Arc<dyn Agent>
    .session_service(sessions)
    .build()?;

let mut events = runner
    .run(UserId::new("u")?, SessionId::new("s")?,
         Content::new("user").with_text("Add a function add(a,b) to add.py and run it."))
    .await?;
// stream `events`: FunctionCall / FunctionResponse / Text …
# Ok(()) }

Prefer the terminal? adk-rust code "make the failing test pass" does the same — see the CLI.

Where to go next

  1. Dev tools — the toolset and the sandboxed Workspace.
  2. HarnessCodingAgent, the plan loop, permission modes.
  3. CLIcode, goal (durable/resumable), ultracode.
  4. Workflows — parallel ultra-review on adk-graph.
  5. Examples — three runnable example crates.

See also the full design rationale in docs/design/coding-agent.md.