Expand description
Core trait and handle types for the managed agent runtime.
The ManagedAgentRuntime trait defines the full lifecycle interface for
managed agents: create agents from declarative definitions, start sessions,
send/receive events, pause/resume/interrupt, and archive.
§Architecture
The runtime is a library, not a service. The platform hosts it. This trait is provider-agnostic — it behaves identically for Gemini, OpenAI, Anthropic, Ollama, and OpenAI-compatible providers.
§Example
ⓘ
use adk_managed::runtime::{ManagedAgentRuntime, AgentHandle, SessionHandle};
use adk_managed::types::ManagedAgentDef;
async fn example(runtime: &dyn ManagedAgentRuntime) {
let def = ManagedAgentDef::default();
let agent = runtime.create(def).await.unwrap();
let session = runtime.start_session(&agent, None).await.unwrap();
let status = runtime.status(&session).await.unwrap();
println!("Session status: {status:?}");
}Structs§
- Agent
Handle - Opaque agent handle.
- Environment
Config - Optional environment configuration for a session.
- Session
Handle - Opaque session handle.
Traits§
- Managed
Agent Runtime - The central async trait defining the managed agent lifecycle.