docs: Correct the documentation of after_agent_callback

The `after_agent_callback` in plugin works similarly as the `after_agent_callback` in `base_agent.py`, e.g. it only append new content, but cannot modify the previous content.

PiperOrigin-RevId: 807162139
This commit is contained in:
Bastien Jacot-Guillarmod
2025-09-15 03:06:57 -07:00
committed by Copybara-Service
parent 8ec83d6c18
commit b9735b2193
+3 -6
View File
@@ -211,17 +211,14 @@ class BasePlugin(ABC):
) -> Optional[types.Content]:
"""Callback executed after an agent's primary logic has completed.
This callback can be used to inspect, log, or modify the agent's final
result before it is returned.
Args:
agent: The agent that has just run.
callback_context: The context for the agent invocation.
Returns:
An optional `types.Content` object. If a value is returned, it will
replace the agent's original result. Returning `None` uses the original,
unmodified result.
An optional `types.Content` object. The content to return to the user.
When the content is present, the provided content will be used as agent
response and appended to event history as agent response.
"""
pass