Hardcoded user id forbids to use `agent_tool.AgentTool` without workarounds
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 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!
Thanks for the explanation. I missed that nuance and makes sense!