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
ToolCommand
Adapter that implements SessionCommand for tool execution via the queue.

Enums§

AgentEvent
Events emitted during agent execution

Functions§

partition_by_lane
Partition tool calls into Query-lane (parallelizable) and sequential tools.