Skip to main content

Module agent

Module agent 

Source
Expand description

Agent Loop Implementation

The agent loop handles the core conversation cycle:

  1. User sends a prompt
  2. LLM generates a response (possibly with tool calls)
  3. If tool calls present, execute them and send results back
  4. Repeat until LLM returns without tool calls

This implements agentic behavior where the LLM can use tools to accomplish tasks agentically.

Structs§

AgentConfig
Agent configuration
AgentLoop
Agent loop executor
AgentResult
Result of agent execution

Enums§

AgentEvent
Events emitted during agent execution