Skip to main content

Crate adk_runner

Crate adk_runner 

Source
Expand description

§adk-runner

Agent execution runtime for ADK.

§Overview

This crate provides the execution runtime:

§Quick Start

use adk_runner::{Runner, RunnerConfig};
use std::sync::Arc;

// Configure runner with services
// let config = RunnerConfig {
//     app_name: "my_app".to_string(),
//     session_service: sessions,
//     artifact_service: Some(artifacts),
//     memory_service: None,
// };
//
// let runner = Runner::new(config);

§Features

  • Automatic session management
  • Memory injection
  • Artifact handling
  • Callback hooks at every stage

Structs§

CacheMetrics
Metrics computed from session event history.
CachePerformanceAnalyzer
Utility for computing cache effectiveness metrics from session events.
Callbacks
Collection of all callback types
ContextCacheConfig
Configuration for automatic prompt caching lifecycle management.
EventsCompactionConfig
Configuration for automatic context compaction.
InvocationContext
MutableSession
MutableSession wraps a session with shared mutable state.
RequestContext
Identity and authorization context extracted from an HTTP request.
Runner
RunnerConfig

Traits§

BaseEventsSummarizer
Trait for summarizing events during context compaction.
CacheCapable
Trait for LLM providers that support prompt caching.

Type Aliases§

AfterModelCallback
Callback executed after model response
AfterToolCallback
Callback executed after tool execution
BeforeModelCallback
Callback executed before calling the model
BeforeToolCallback
Callback executed before tool execution