🚀 Available for Freelance, Remote, and Full-Time Opportunities. Let's build something amazing together.

News
1 min read

Laravel AI: Trace Agent Runs With Lifecycle Events

Hook into agent execution pipelines with real-time lifecycle events in Laravel AI SDK for custom metrics, WebSockets, and audit logging.

A

Author

5 days ago

Real-time Telemetry with Laravel AI Lifecycle Events

As AI agents become core components of enterprise Laravel applications, gaining visibility into every step of an agent's execution loop is crucial. The latest Laravel AI SDK updates introduce fine-grained Lifecycle Events.

Dispatched Lifecycle Events

  • AgentStarting: Fired when an agent run initiates with prompt context.
  • ToolExecuting: Fired immediately before a tool function is invoked.
  • ToolExecuted: Fired after a tool returns execution results.
  • AgentCompleted: Fired when the agent completes its response pipeline.