Basic Agent
The simplest agent usesAgentLoop to send a message and get a response.
Hello World
What Happens
AgentLoop::execute()starts the loop- The driver (
ToolCallingDriver) sends messages to the LLM - LLM responds with text (no tool calls)
- The loop detects no tool calls and stops
- Final response is available via
$result->finalResponse()
Customizing the Loop
Usewith() to swap components on the default loop: