Skip to content

Agent-as-a-Tool uses InMemorySessionService #2754

@dgnk007

Description

@dgnk007

Description

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.

tools=[AgentTool(agent=summary_agent, skip_summarization=True,persistent=True)]

Questions

  • Is this design intentional (to keep tool sessions lightweight and ephemeral)?
  • If not, would it make sense to allow configuration of the session service, so we can persist tool actions just like normal agent actions?

Metadata

Metadata

Assignees

Labels

bot triaged[Bot] This issue is triaged by ADK botservices[Component] This issue is related to runtime services, e.g. sessions, memory, artifacts, etc

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions