google / google/adk-docs

Better document agent control flow patterns for multi-agent

Open
#158 6 comments 0 reactions 1 assignee Claimed by @lavinigam-gcp View on GitHub
agents tools
Dominant language
Shell
Stars
1.5k
Forks
1.3k
Avg merge
7d 1h
Merged PRs (30d)
34

Description

Based on feedback in issues https://github.com/google/adk-python/issues/147 ("Multi-Agent Architecture - Goes into sub-agent and not back up to the root agent") and https://github.com/google/adk-python/issues/371 ("Subsequent queries not routed to root agent in agent team session"), developers are confused about multi-agent control flow.

For both issues, there's an expectation that control automatically returns to the root agent at the beginning of the next user query within the same session - I think that's the [AgentTool](https://google.github.io/adk-docs/tools/function-tools) behavior, instead of the default [AutoFlow](https://google.github.io/adk-docs/agents/multi-agents)

https://github.com/google/adk-python/issues/147:
- Reports the agent system getting "stuck" in a sub-agent and not going "up again to the root," preventing the root from handling subsequent, different tasks. Expresses confusion about the purpose of sub_agents if control doesn't return.
- Explicitly states being "unsure how control can be passed back to the root agent," preferring automatic routing.

https://github.com/google/adk-python/issues/371:
- Clearly describes that after delegation to greeting_agent, the next query ("What is the weather...") goes directly to greeting_agent instead of the root weather_agent_team, causing errors if the active agent lacks the necessary tools for the new query.

We should make sure to document these patterns better with clear & focused examples - it's a bit scattered now and the [multi agent](https://google.github.io/adk-docs/agents/multi-agents) page is very dense.

## Related pages
- https://google.github.io/adk-docs/tutorials/agent-team
- https://google.github.io/adk-docs/agents/multi-agents
- https://google.github.io/adk-docs/tools/function-tools

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.