Skip to main content

spawn_agent_runtime

Function spawn_agent_runtime 

Source
pub async fn spawn_agent_runtime(
    cfg: &AgentConfig,
    shared: &SharedRuntimeContext,
) -> Result<SpawnedAgent, SpawnError>
Expand description

Spawn a fresh agent runtime end-to-end from cfg.

Currently todo!() — c2 through c7 of Phase 81.32 will extract the per-agent boot loop’s body into this function one slice at a time. Once those land, both src/main.rs boot path and the ConfigReloadCoordinator hot-spawn branch call this function with the same semantics.

On error: no partial state escapes. Subscribers / tokens / allocated futures drop with the returned future; the caller observes only the typed SpawnError.