From 73a6411ed877d29829a0f8388f24cfe6f390de93 Mon Sep 17 00:00:00 2001 From: jaywang172 <38661797jay@gmail.com> Date: Thu, 10 Sep 2026 09:04:48 +0800 Subject: [PATCH] docs(callbacks): align live after-agent callback timing Document that ending an invocation skips after-agent callbacks in both Python execution modes. --- docs/callbacks/types-of-callbacks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/callbacks/types-of-callbacks.md b/docs/callbacks/types-of-callbacks.md index a0fdd7d085..439c9ee78c 100644 --- a/docs/callbacks/types-of-callbacks.md +++ b/docs/callbacks/types-of-callbacks.md @@ -121,7 +121,7 @@ These callbacks are available on *any* agent that inherits from `BaseAgent` (inc ### After Agent Callback -**When:** Called *immediately after* the agent's `_run_async_impl` (or `_run_live_impl`) method successfully completes. It does *not* run if the agent was skipped due to `before_agent_callback` returning content. In Python, setting `end_invocation` during the agent's run also skips it, but only on the `run_async` path; `run_live` does not re-check `end_invocation` after `_run_live_impl` finishes, so the callback still runs there. +**When:** Called *immediately after* the agent's `_run_async_impl` (or `_run_live_impl`) method successfully completes. It does *not* run if the agent was skipped due to `before_agent_callback` returning content. In Python, setting `end_invocation` during the agent's run also skips it on both the `run_async` and `run_live` paths. **Purpose:** Useful for cleanup tasks, post-execution validation, logging the completion of an agent's activity, or modifying final state.