From 098c6625ed193a9a254c63bf21a7b07965d454d5 Mon Sep 17 00:00:00 2001 From: Juan Castro Piccolo Date: Sat, 18 Oct 2025 13:28:26 -0300 Subject: [PATCH 1/2] Public Invocation Context for Global Instructions Plugin --- src/google/adk/agents/callback_context.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/google/adk/agents/callback_context.py b/src/google/adk/agents/callback_context.py index f42d344ad5..93d5692f17 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: From 59d29a7242b08d929356b393104a03c45a73b794 Mon Sep 17 00:00:00 2001 From: Juan Castro Piccolo Date: Sat, 18 Oct 2025 13:45:18 -0300 Subject: [PATCH 2/2] no changes, retry CLA --- src/google/adk/agents/callback_context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/google/adk/agents/callback_context.py b/src/google/adk/agents/callback_context.py index 93d5692f17..c64b326a75 100644 --- a/src/google/adk/agents/callback_context.py +++ b/src/google/adk/agents/callback_context.py @@ -64,7 +64,7 @@ def invocation_context(self) -> InvocationContext: 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. + The InvocationContext instance for this callback. """ return self._invocation_context