Skip to main content

Module managed

Module managed 

Source
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_all with 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 underlying ComponentRegistry.
  • Aggregated health: ManagedRuntime::health collects component-level health probes.
  • Hot-reload: ManagedRuntime::reload replaces a running component via the drain-aware protocol.

Structs§

ManagedRuntime
Unified container orchestrating AgentRuntime, ComponentRegistry, and a root ShutdownToken.

Enums§

ManagedError
Errors from ManagedRuntime operations.