adk-python icon indicating copy to clipboard operation
adk-python copied to clipboard

Hardcoded user id forbids to use `agent_tool.AgentTool` without workarounds

Open msteiner-google opened this issue 1 year ago • 2 comments

Specifically this line which is then used here makes it so that in your wrapped agent you don't have access to the original session/context/artifact/...

Perhaps would be better to forward everything in the invoker context instead.

msteiner-google avatar May 23 '25 12:05 msteiner-google

@msteiner-google thank you for raising the request. Actually it's exactly what agent tool is expected to do. Agent tool means the agent is used as a tool. So the wrapper agent treat it as a tool instead of an agent, the session of the tool agent is implementation details of a tool which wrapper agent should not care about. if you do want to access the agent's session from wrapper agent, you should use it as a sub agent instead of an agent tool.

Feel free to reopen if you don't agree and please provide more justifications why the sub agent feature won't work for your case. thank you!

seanzhou1023 avatar May 27 '25 22:05 seanzhou1023

Thanks for the explanation. I missed that nuance and makes sense!

msteiner-google avatar May 28 '25 06:05 msteiner-google