adk-agent 0.1.8

Agent implementations for Rust Agent Development Kit (ADK-Rust, LLM, Custom, Workflow agents)
Documentation

adk-agent

Agent implementations for Rust Agent Development Kit (ADK-Rust, LLM, Custom, Workflow agents).

Crates.io Documentation License

Overview

adk-agent provides ready-to-use agent implementations for the Rust Agent Development Kit (ADK-Rust):

  • LlmAgent - Core agent powered by LLM reasoning
  • CustomAgent - Define custom logic without LLM
  • SequentialAgent - Execute agents in sequence
  • ParallelAgent - Execute agents concurrently
  • LoopAgent - Iterate until exit condition
  • ConditionalAgent - Branch based on conditions

Installation

[dependencies]
adk-agent = "0.1.8"

Or use the meta-crate:

[dependencies]
adk-rust = { version = "0.1.8", features = ["agents"] }

Quick Start

LLM Agent

use adk_agent::LlmAgentBuilder;
use adk_model::GeminiModel;
use std::sync::Arc;

let model = GeminiModel::new(&api_key, "gemini-2.5-flash")?;

let agent = LlmAgentBuilder::new("assistant")
    .description("Helpful AI assistant")
    .instruction("Be helpful and concise.")
    .model(Arc::new(model))
    .tool(Arc::new(calculator_tool))
    .build()?;

Workflow Agents

use adk_agent::{SequentialAgent, ParallelAgent, LoopAgent};

// Sequential: A -> B -> C
let seq = SequentialAgent::new("pipeline", vec![
    Arc::new(agent_a),
    Arc::new(agent_b),
    Arc::new(agent_c),
]);

// Parallel: A, B, C simultaneously
let par = ParallelAgent::new("team", vec![
    Arc::new(analyst_a),
    Arc::new(analyst_b),
]);

// Loop: repeat until exit
let loop_agent = LoopAgent::new("iterator", Arc::new(worker), 10);

Multi-Agent Systems

// Router with sub-agents
let router = LlmAgentBuilder::new("router")
    .instruction("Route to appropriate specialist")
    .sub_agent(Arc::new(support_agent))
    .sub_agent(Arc::new(sales_agent))
    .build()?;

Features

  • Automatic tool execution loop
  • Agent transfer between sub-agents
  • Streaming event output
  • Callback hooks at every stage
  • Long-running tool support

Related Crates

License

Apache-2.0

Part of ADK-Rust

This crate is part of the ADK-Rust framework for building AI agents in Rust.