Expand description
The daemon spawner: turns a SpawnArgs request into a live agent in the
shared world - the CLI-side policy the runtime host calls for a Spawn
control op.
It loads the blueprint, resolves each stage’s provider/model (against the
world’s registered providers) and effective tool set, spawns the agent via
leviath_runtime::pipeline::spawn_agent, attaches its run metadata /
token totals / compaction settings, and registers its per-agent tool state
with the CliToolService. The heavy MCP connections are shared (built once
at daemon startup), so this whole path is synchronous - which lets it run
straight from the host’s control loop.
Structs§
- Spawn
Deps - Everything a spawn needs that is not the request itself.
Functions§
- build_
agent - Load the blueprint at
args.blueprint_path, spawn the agent intoworld, register its tool state, and return the new entity. Operates on the raw ECSWorldso it is callable both from the host’s spawner (viaPipelineWorld::world_mut) and from a fan-out world-system. - build_
agent_ for_ reload - Like
build_agent, but skips the required-at-spawn region gate - used by restart recovery, which reloads a run that already passed the gate when first spawned and whose context window is restored from a snapshot after this call.