You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While integrating Agent-as-a-Tool into my parent agent, I noticed that all internal actions executed by the tool are not being stored in the database events.
After checking the source code, it seems that the Agent-as-a-Tool implementation is always using InMemorySessionService, and there’s no option to switch to a persistent session service. Because of this, any actions or interactions handled by the tool are lost after execution.
Actual Behaviour
Internal actions are executed but not saved in the database.
The session is always stored in memory, making the events unavailable for later retrieval or debugging.
Expected Behaviour
I expected the Agent-as-a-Tool to respect the parent agent’s configured session service (e.g., database-backed) so that all actions and events (Maybe in a different branch) are properly persisted.
@dgnk007 Thank you for reporting this. I understand the request is currently under review. Please keep me posted if anything else is needed. Thanks for your patience.
thanks for flagging this, attach the sub-agent with mode='single_turn' in sub_agents instead of AgentTool, and it runs inline so the parent session records the events. direct AgentTool use is discouraged for that reason.
Activity
hangfei commentedon Nov 4, 2025
@dgnk007 thanks for sharing the feedback.
This is a feature request.
klateefa commentedon Nov 25, 2025
@dgnk007 Thank you for reporting this. I understand the request is currently under review. Please keep me posted if anything else is needed. Thanks for your patience.
GWeale commentedon Aug 6, 2026
thanks for flagging this, attach the sub-agent with mode='single_turn' in sub_agents instead of AgentTool, and it runs inline so the parent session records the events. direct AgentTool use is discouraged for that reason.