<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/laravel-ai-trace-agent-runs-with-lifecycle-events-k7bbbwg9b" -->

---
title: Laravel AI: Trace Agent Runs With Lifecycle Events
description: Laravel AI v0.11.0 adds per-step and per-tool lifecycle events to agent runs, replacing the previous start/end-only reporting. Every run now gets a single...
canonical: https://daily.dev/posts/laravel-ai-trace-agent-runs-with-lifecycle-events-k7bbbwg9b
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Laravel AI: Trace Agent Runs With Lifecycle Events | daily.dev
og:description: Laravel AI v0.11.0 adds per-step and per-tool lifecycle events to agent runs, replacing the previous start/end-only reporting. Every run now gets a single...
og:url: https://daily.dev/posts/laravel-ai-trace-agent-runs-with-lifecycle-events-k7bbbwg9b
og:image: https://api.daily.dev/og/posts/k7BbBWG9b.png
og:image:alt: Laravel AI: Trace Agent Runs With Lifecycle Events
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Laravel AI: Trace Agent Runs With Lifecycle Events

**[Laravel News](https://daily.dev/sources/ln)** · 6 min read · 2 upvotes · 0 comments

## Summary

Laravel AI v0.11.0 adds per-step and per-tool lifecycle events to agent runs, replacing the previous start/end-only reporting. Every run now gets a single invocation ID shared across provider failovers, StartingStep/StepCompleted/StepFailed fire around each provider round-trip with wall timings, and InvokingTool/ToolInvoked/ToolFailed now use per-invocation IDs that survive nesting. A new AgentFailed event reports run failures that previously went unreported, and sub-agents invoked as tools now carry parentInvocationId/parentToolInvocationId linking them to their parent run. Several event constructors gained required new arguments, requiring updates to any code that constructs them manually.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://laravel-news.com/laravel-ai-agent-run-events>

## Questions this post answers

### What new events does Laravel AI 0.11 add for tracing agent runs?

Laravel AI 0.11.0 adds StartingStep, StepCompleted, and StepFailed events around every provider round-trip, plus a new ToolFailed event and an AgentFailed event that reports run failures. Every run now shares one invocation ID across streaming and synchronous prompts, and StepCompleted and ToolInvoked carry wall-clock timings in milliseconds so each round-trip's cost and duration can be logged as it happens.

_Developers instrumenting AI agent pipelines can track framework changes like this via daily.dev._

### Does upgrading to Laravel AI 0.11 break any existing event listener code?

Yes, several constructor signatures changed: AgentFailedOver now requires a string invocationId as its first argument, and ToolInvoked now requires a float time argument. Any code that manually constructs these events needs updating, though listeners that simply read event properties are unaffected by the change.

_Teams planning a Laravel AI upgrade can flag breaking changes like this ahead of time via daily.dev._

### How can I correlate a sub-agent invoked as a tool with its parent agent run in Laravel AI?

An agent prompted from within a tool call receives parentInvocationId and parentToolInvocationId properties on its prompt, linking it to the parent run and tool invocation, as of Laravel AI 0.11.0. This works for any hand-written tool that prompts an agent, not just the built-in AgentTool, but the link breaks if the prompt is dispatched to a queue via promptOnQueue().

_Building nested AI agent workflows in Laravel gets easier to trace when you follow updates like this on daily.dev_

## Similar posts on daily.dev

- [Agent Run Observability in Laravel AI SDK 0.11](https://daily.dev/posts/agent-run-observability-in-laravel-ai-sdk-0-11-2ws8tt7cm) · Laravel News · 0 upvotes · 0 comments
- [Building Sentry's Laravel AI Integration](https://daily.dev/posts/building-sentry-s-laravel-ai-integration-oetm1u9w3) · Sentry Engineering · 0 upvotes · 0 comments
- [Sentry AI Tracing with Laravel's AI SDK](https://daily.dev/posts/sentry-ai-tracing-with-laravel-s-ai-sdk-ge6abhixu) · Josh Hornby · 0 upvotes · 0 comments
- [Laravel's AI SDK adds sub-agents](https://daily.dev/posts/laravel-s-ai-sdk-adds-sub-agents-0wunpifv2) · Laravel News · 21 upvotes · 1 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#architecture](https://daily.dev/tags/architecture), [#php](https://daily.dev/tags/php), [#laravel](https://daily.dev/tags/laravel), [#observability](https://daily.dev/tags/observability)

[View this post on daily.dev](https://daily.dev/posts/laravel-ai-trace-agent-runs-with-lifecycle-events-k7bbbwg9b)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Laravel AI: Trace Agent Runs With Lifecycle Events","url":"https://daily.dev/posts/laravel-ai-trace-agent-runs-with-lifecycle-events-k7bbbwg9b","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/laravel-ai-trace-agent-runs-with-lifecycle-events-k7bbbwg9b"},"datePublished":"2026-08-24T13:45:00.822Z","dateModified":"2026-09-13T19:58:37.175Z","description":"Laravel AI v0.11.0 adds per-step and per-tool lifecycle events to agent runs, replacing the previous start/end-only reporting. Every run now gets a single...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/57abd5f042e13bdc653409794829f68b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/57abd5f042e13bdc653409794829f68b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Laravel News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Laravel News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/ln","url":"https://daily.dev/sources/ln"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/laravel-ai-trace-agent-runs-with-lifecycle-events-k7bbbwg9b","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,architecture,php,laravel,observability","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Laravel News","item":"https://daily.dev/sources/ln"},{"@type":"ListItem","position":3,"name":"Laravel AI: Trace Agent Runs With Lifecycle Events"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/laravel-ai-trace-agent-runs-with-lifecycle-events-k7bbbwg9b#faq","mainEntity":[{"@type":"Question","name":"What new events does Laravel AI 0.11 add for tracing agent runs?","acceptedAnswer":{"@type":"Answer","text":"Laravel AI 0.11.0 adds StartingStep, StepCompleted, and StepFailed events around every provider round-trip, plus a new ToolFailed event and an AgentFailed event that reports run failures. Every run now shares one invocation ID across streaming and synchronous prompts, and StepCompleted and ToolInvoked carry wall-clock timings in milliseconds so each round-trip's cost and duration can be logged as it happens. Developers instrumenting AI agent pipelines can track framework changes like this via daily.dev."}},{"@type":"Question","name":"Does upgrading to Laravel AI 0.11 break any existing event listener code?","acceptedAnswer":{"@type":"Answer","text":"Yes, several constructor signatures changed: AgentFailedOver now requires a string invocationId as its first argument, and ToolInvoked now requires a float time argument. Any code that manually constructs these events needs updating, though listeners that simply read event properties are unaffected by the change. Teams planning a Laravel AI upgrade can flag breaking changes like this ahead of time via daily.dev."}},{"@type":"Question","name":"How can I correlate a sub-agent invoked as a tool with its parent agent run in Laravel AI?","acceptedAnswer":{"@type":"Answer","text":"An agent prompted from within a tool call receives parentInvocationId and parentToolInvocationId properties on its prompt, linking it to the parent run and tool invocation, as of Laravel AI 0.11.0. This works for any hand-written tool that prompts an agent, not just the built-in AgentTool, but the link breaks if the prompt is dispatched to a queue via promptOnQueue(). Building nested AI agent workflows in Laravel gets easier to trace when you follow updates like this on daily.dev"}}]}
```

