Quickstart
1
Create a listener
2
Import the event and implement the handler
3
Register the event listener
Open
app/Providers/AppServiceProvider.php and register the event with its listener:handle method will be executed.
AgentDTO Structure
Each event that includes
agentDto uses the following Data Transfer Object structure:Available Events
LarAgent provides events across different categories:Agent Events
Lifecycle events for agent initialization, conversation flow, and termination.
Context Events
Events for context storage operations and state changes.
History Events
Events for chat history operations and message handling.
Events vs Agent Hooks
LarAgent provides two ways to customize behavior:Queueable Listeners
For heavy processing, implementShouldQueue to handle events asynchronously:

