Skip to main content
Vizra ADK is in maintenance mode. It continues to work and receives compatibility fixes, but no new features are planned. For evaluating AI agents — now built on the official Laravel AI SDK — check out Vizra Evals, its successor for the evaluation use-case. Coming from ADK? See the migration guide.

Event Overview

All class-based events are in the Vizra\VizraADK\Events namespace and use Laravel’s event system.

Agent Execution Events

Fired when an agent begins execution.
Properties:
Fired when an agent completes execution.
Properties:
Fired when an agent generates its final response.
Properties:

LLM Interaction Events

Fired before making a call to the LLM.
Properties:
Fired after receiving a response from the LLM.
Properties:
Fired when an LLM API call fails.
Properties:

Tool Execution Events

Fired before executing a tool.
Properties:
Fired after a tool completes execution.
Properties:
Fired when a tool call encounters an error.
Properties:

State Management Events

Fired when agent state is updated.
Properties:
Fired when agent memory is updated.
Properties:Update Types:

Multi-Agent Events

Fired when an agent delegates a task to a sub-agent.
Properties:

Media Generation Events

These are string-based events fired by MediaGenerationJob when processing queued media generation tasks (images, audio, etc.).
Fired when any media generation job completes successfully.
Payload:Example:
Fired when a specific agent’s media job completes. The event name includes the agent’s name (e.g., media.image_agent.completed).
Payload:Example:
Fired when a media generation job fails after all retry attempts.
Payload:Example:

Usage Examples

Monitoring Agent Performance

Debugging Tool Calls

Memory Tracking

Event Best Practices:
  • Use event listeners for cross-cutting concerns like logging and monitoring
  • Keep event handlers lightweight to avoid impacting agent performance
  • Use queued listeners for heavy processing tasks
  • Events are synchronous by default - be mindful of execution time
  • All class-based events include the AgentContext for accessing session state
  • Tool results are JSON strings - decode them for processing
  • Media events are string-based and receive array payloads

Next Steps

Agent Lifecycle

Learn about the agent execution flow

API Reference

View all API references