-
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Response from ADK Answering Agent (experimental, answer may be inaccurate) TLDR: Your Hello! I can help with this. The issue you're encountering is due to how sessions are managed when you invoke an agent from within a tool. The Problem: Separate SessionsWhen your Your The Solution: Use
|
Beta Was this translation helpful? Give feedback.
-
|
While converting to a simpler deterministic FunctionTool works, I wanted to understand how to make something work for a case that involves Custom BaseAgent as one of the worker agents |
Beta Was this translation helpful? Give feedback.


Response from ADK Answering Agent (experimental, answer may be inaccurate)
TLDR: Your
DeduplicationAgent, when called viarun_asyncinside the tool, creates a new, separate session. Changes to itssession.stateare not reflected back to the orchestrator's in-memory session in the same turn. The solution is to move the agent's logic into a regular function that the tool can call directly, using thetool_contextto access and modify the session state. [1]Hello! I can help with this. The issue you're encountering is due to how sessions are managed when you invoke an agent from within a tool.
The Problem: Separate Sessions
When your
dedup_call_functool callsdedup_agent.run_async(session_i…