adk-runner
Agent execution runtime for Rust Agent Development Kit (ADK-Rust) agents.
Overview
adk-runner provides the execution runtime for the Rust Agent Development Kit (ADK-Rust):
- Runner - Manages agent execution with full context
- Session Integration - Automatic session creation and state management
- Memory Injection - Retrieves and injects relevant memories
- Artifact Handling - Manages binary artifacts during execution
- Event Streaming - Streams agent events with backpressure
Installation
[]
= "0.1.8"
Or use the meta-crate:
[]
= { = "0.1.8", = ["runner"] }
Quick Start
use ;
use InMemorySessionService;
use InMemoryArtifactService;
use Arc;
// Create services
let sessions = new;
let artifacts = new;
// Configure runner
let config = RunnerConfig ;
// Create runner
let runner = new;
// Run agent
let mut stream = runner.run.await?;
// Process events
while let Some = stream.next.await
Runner vs Direct Agent Execution
| Feature | Direct agent.run() |
Runner |
|---|---|---|
| Session management | Manual | Automatic |
| Memory injection | Manual | Automatic |
| Artifact storage | Manual | Automatic |
| State persistence | Manual | Automatic |
Use Runner for production; direct execution for testing.
Features
- Automatic context creation
- Session restore and persistence
- Configurable memory retrieval
- Event history management
- Concurrent-safe execution
Related Crates
- adk-rust - Meta-crate with all components
- adk-core - Core traits
- adk-session - Session storage
- adk-cli - CLI using runner
License
Apache-2.0
Part of ADK-Rust
This crate is part of the ADK-Rust framework for building AI agents in Rust.