Expand description
ManagedRuntime: unified container orchestrating
AgentRuntime, ComponentRegistry, and
ShutdownToken into a single lifecycle.
The managed runtime is the assembly entry point for operators who want to compose a runtime from pluggable parts. It gives you a dependency-ordered lifecycle, typed component lookup, aggregated health, and hot-reload — the machinery for “this agent is built from these providers, these tools, and these stores.”
If you don’t need the DI container or lifecycle orchestration, you can
use AgentRuntime directly with Extensions and wrap it in
super::invocation::RuntimeInvocation for the emit/on call surface.
ManagedRuntime is for when you do want coordinated startup, teardown,
and the ability to swap components at runtime.
§What it provides
- Coordinated lifecycle:
init_all → start_all → serve → stop_allwith a single root shutdown token. - Dependency ordering: components declare
depends_on; the registry topologically sorts and initializes in order. - Typed component access:
ManagedRuntime::component::<T>downcasts into the underlyingComponentRegistry. - Aggregated health:
ManagedRuntime::healthcollects component-level health probes. - Hot-reload:
ManagedRuntime::reloadreplaces a running component via the drain-aware protocol.
Structs§
- Managed
Runtime - Unified container orchestrating
AgentRuntime,ComponentRegistry, and a rootShutdownToken.
Enums§
- Managed
Error - Errors from
ManagedRuntimeoperations.