pub fn agent_from_config(
config: &AgentConfig,
) -> Result<Arc<dyn Agent>, ConfigError>Expand description
Construct an agent from a parsed config.
Returns Arc<dyn Agent> — internally builds a BasicAgent (the reference
implementation), wraps it in Arc for shared ownership across async tasks.
§Notes
- Tools are not instantiated. Config specifies tool names via
tools.enabled; the caller must register tool instances via.set_tools()on the returned agent. Useagent_from_config_with_registryto resolve tools automatically (G10). - Callbacks/hooks are Phase 2. Config stores callback/hook strings but the builder ignores them in Phase 1. WASM plugin loading will activate them in Phase 2.