diff --git a/src/google/adk/agents/callback_context.py b/src/google/adk/agents/callback_context.py index f42d344ad5..c64b326a75 100644 --- a/src/google/adk/agents/callback_context.py +++ b/src/google/adk/agents/callback_context.py @@ -53,6 +53,21 @@ def __init__( delta=self._event_actions.state_delta, ) + @property + def invocation_context(self) -> InvocationContext: + """The invocation context for this callback. + + This property provides access to the invocation context for Agent Development + Kit plugins that need to interact with the underlying context. This is + intended for ADK plugin development and not for general user consumption. + + Note: This property attempts to solve the TO DO (weisun) by making the invocation context public for ADK plugin development. + + Returns: + The InvocationContext instance for this callback. + """ + return self._invocation_context + @property @override def state(self) -> State: