Expand description
§adk-managed
Managed agent runtime for ADK-Rust — a provider-neutral, durable, resumable agent execution engine.
§Overview
adk-managed provides the ManagedAgentRuntime trait and its default implementation.
It takes a declarative ManagedAgentDef, builds a runnable agent, and operates it as
a durable, resumable, event-streaming background session. The runtime composes existing
shipping components behind a unified lifecycle trait.
§Architecture
The runtime is a library, not a service. The platform hosts it. This means:
- Testable in isolation: Zero HTTP/auth/billing dependencies
- Embeddable: Self-hosted deployments use the same runtime trait directly
- Swappable platform: Different platforms can host the same runtime
- Provider-neutral: Identical event sequences regardless of model provider
§Quick Start
ⓘ
use adk_managed::types::ManagedAgentDef;
// Define an agent declaratively
let def = ManagedAgentDef {
name: "my-agent".to_string(),
model: ModelRef::Shorthand("gemini-2.5-flash".to_string()),
system_prompt: "You are a helpful assistant.".to_string(),
// ...
};Re-exports§
pub use agent_builder::BuildError;pub use agent_builder::ManagedBuiltinTool;pub use agent_builder::ManagedCustomTool;pub use agent_builder::build_agent;pub use checkpoint::CheckpointManager;pub use checkpoint::RunState;pub use default_runtime::DefaultManagedAgentRuntime;pub use event_mapping::RunnerOutput;pub use event_mapping::ToolKind;pub use event_mapping::custom_tool_use_id;pub use event_mapping::map_runner_output;pub use event_mapping::requires_parking;pub use parking::ToolParkingLot;pub use replay::create_event_stream;pub use replay::get_seq;pub use resolver::DefaultModelResolver;pub use resolver::ModelResolver;pub use resolver::ResolverError;pub use resolver::ResolverResult;pub use runtime::AgentHandle;pub use runtime::EnvironmentConfig;pub use runtime::ManagedAgentRuntime;pub use runtime::SessionHandle;pub use schema_normalization::normalize_for_provider;pub use schema_normalization::representative_mcp_schema;pub use sequence::SequenceCounter;pub use session_loop::SessionLoop;pub use testing::ScriptedLlm;pub use testing::ScriptedToolCall;pub use testing::ScriptedTurn;pub use usage::SessionUsageTracker;pub use usage::UsageReport;
Modules§
- agent_
builder - Agent builder — constructs a runnable agent from a
ManagedAgentDef. - checkpoint
- Checkpoint management for durable sessions.
- default_
runtime - Default implementation of the
ManagedAgentRuntimetrait. - event_
mapping - Provider-neutral event mapping from Runner output to SessionEvent.
- parking
- Custom tool parking lot for the managed agent runtime.
- replay
- Event replay for SSE
Last-Event-IDreconnection. - resolver
- Model resolution — maps a
ModelRefto a liveArc<dyn Llm>. - runtime
- Core trait and handle types for the managed agent runtime.
- schema_
normalization - Schema normalization for cross-provider MCP tool compatibility.
- sequence
- session_
loop - Supervised session loop for the managed agent runtime.
- testing
- Testing utilities for the managed agent runtime.
- types
- Wire types for the managed agent runtime.
- usage
- Uniform usage reporting across all providers.