Motivation
Hardcoded orchestration logic cannot be modified without deployment. Adding an agent to a squad, changing the execution flow, or swapping an orchestrator should not require code changes.
Configuration-driven loading separates what the system does from how it is assembled. The YAML is the architecture definition. The loader wires it at startup.
Structure
- squads.yaml defines: squad ID, agents list, flow steps with result_key
- AgentRegistry.register(name, factory_fn) maps name to construction lambda
- SquadLoader.load_one(yaml_path, squad_id) reads YAML, resolves agents from registry
- AgentLoader.merge_with_global(agent_name, config) merges agent YAML with global config
- Orchestrator calls _load_squad() — never references agent classes directly