Skip to main content

run_agent_loop

Function run_agent_loop 

Source
pub async fn run_agent_loop(
    config: &AgentConfig,
    initial_messages: Vec<ChatMessage>,
    user_message: &str,
    skills: &[LoadedSkill],
    event_sink: &mut dyn EventSink,
    session_key: Option<&str>,
) -> Result<AgentResult>
Expand description

Run the agent loop.

Dispatches to either the simple loop (Phase 1) or the task-planning loop (Phase 2) based on config.enable_task_planning.