Skip to main content

agents_from_config

Function agents_from_config 

Source
pub fn agents_from_config(
    config: &AgentConfig,
) -> Result<Vec<(String, Arc<dyn Agent>)>, ConfigError>
Expand description

Construct multiple agents from a config with agent instances.

If config.agent.instances is empty, returns a single agent from agent_from_config with the name "default".

Otherwise, builds one agent per instance, resolving agent_profile refs against config.agent.profile.instances. Each instance can override:

  • agent_profile — reference to a named profile instance
  • system_prompt — override the system prompt
  • profile — inline profile overrides