# adk-runner
Agent execution runtime for Rust Agent Development Kit (ADK-Rust) agents.
[](https://crates.io/crates/adk-runner)
[](https://docs.rs/adk-runner)
[](LICENSE)
## Overview
`adk-runner` provides the execution runtime for the Rust Agent Development Kit ([ADK-Rust](https://github.com/zavora-ai/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
```toml
[dependencies]
adk-runner = "0.1.8"
```
Or use the meta-crate:
```toml
[dependencies]
adk-rust = { version = "0.1.8", features = ["runner"] }
```
## Quick Start
```rust
use adk_runner::{Runner, RunnerConfig};
use adk_session::InMemorySessionService;
use adk_artifact::InMemoryArtifactService;
use std::sync::Arc;
// Create services
let sessions = Arc::new(InMemorySessionService::new());
let artifacts = Arc::new(InMemoryArtifactService::new());
// Configure runner
let config = RunnerConfig {
app_name: "my_app".to_string(),
session_service: sessions,
artifact_service: Some(artifacts),
memory_service: None,
};
// Create runner
let runner = Runner::new(config);
// Run agent
let mut stream = runner.run(
agent,
"user_123",
Some("session_456"),
Content::text("Hello!"),
).await?;
// Process events
while let Some(event) = stream.next().await {
// Handle event...
}
```
## Runner vs Direct Agent Execution
| 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](https://crates.io/crates/adk-rust) - Meta-crate with all components
- [adk-core](https://crates.io/crates/adk-core) - Core traits
- [adk-session](https://crates.io/crates/adk-session) - Session storage
- [adk-cli](https://crates.io/crates/adk-cli) - CLI using runner
## License
Apache-2.0
## Part of ADK-Rust
This crate is part of the [ADK-Rust](https://adk-rust.com) framework for building AI agents in Rust.