Skip to main content

resolve_agent

Function resolve_agent 

Source
pub fn resolve_agent(cfg: &Config, agent_name: &str) -> Result<ResolvedAgent>
Expand description

Walk cfg.agents -> models -> providers to resolve every knob the agent loop needs. Bails with a descriptive error if a reference is dangling or the api-key env var is unset.

Each lookup is re-checked here – the function does not assume cfg.validate() was called – so errors carry the resolution context (which agent, which model) regardless.