Skip to content

feat(adk): add agent teams middleware with mailbox-based multi-agent coordination#915

Open
fanlv wants to merge 49 commits intoalpha/09from
feat/eager_receive_agent_team2
Open

feat(adk): add agent teams middleware with mailbox-based multi-agent coordination#915
fanlv wants to merge 49 commits intoalpha/09from
feat/eager_receive_agent_team2

Conversation

@fanlv
Copy link
Copy Markdown
Contributor

@fanlv fanlv commented Mar 26, 2026

Summary

  • Add team middleware package implementing mailbox-based multi-agent coordination for ADK
  • Includes file-backed mailbox, message pump, source router, lifecycle management, teammate registry, and team runner
  • Provides tools for team creation/deletion, sending messages, and agent spawning
  • Enhances plantask middleware with task API, task reminder, and improved task management

Test plan

  • Unit tests added for all new team middleware components
  • Unit tests updated for plantask middleware changes

Comment thread adk/middlewares/plantask/backend_test.go
@fanlv fanlv force-pushed the feat/eager_receive_agent_team2 branch 7 times, most recently from 27b39a2 to c4cd61d Compare March 27, 2026 02:06
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 27, 2026

Codecov Report

❌ Patch coverage is 86.60983% with 267 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (alpha/09@fc5c067). Learn more about missing BASE report.

Files with missing lines Patch % Lines
adk/middlewares/plantask/task_update.go 79.76% 17 Missing and 17 partials ⚠️
adk/middlewares/team/team_runner.go 75.00% 21 Missing and 8 partials ⚠️
adk/middlewares/team/message_source.go 76.92% 16 Missing and 11 partials ⚠️
adk/middlewares/team/tool_agent.go 82.35% 13 Missing and 11 partials ⚠️
adk/middlewares/plantask/task_api.go 80.21% 10 Missing and 8 partials ⚠️
adk/middlewares/team/lifecycle.go 85.93% 10 Missing and 8 partials ⚠️
adk/middlewares/team/mailbox_pump.go 83.01% 13 Missing and 5 partials ⚠️
adk/middlewares/team/team_config.go 90.11% 9 Missing and 8 partials ⚠️
adk/middlewares/team/mailbox_file.go 88.96% 7 Missing and 9 partials ⚠️
adk/middlewares/team/tool_send_message.go 90.50% 8 Missing and 7 partials ⚠️
... and 11 more
Additional details and impacted files
@@             Coverage Diff             @@
##             alpha/09     #915   +/-   ##
===========================================
  Coverage            ?   82.08%           
===========================================
  Files               ?      179           
  Lines               ?    20661           
  Branches            ?        0           
===========================================
  Hits                ?    16960           
  Misses              ?     2493           
  Partials            ?     1208           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@fanlv fanlv force-pushed the feat/eager_receive_agent_team2 branch from c4cd61d to c286f1c Compare March 27, 2026 02:23
@shentongmartin shentongmartin added C-feature-request Category: feature request issue. Implementations of feature requests use `C-enhancement` instead. D-adk Domain: this is an issue related to the adk package labels Mar 27, 2026
@fanlv fanlv force-pushed the feat/eager_receive_agent_team2 branch 20 times, most recently from a509494 to 07842eb Compare April 6, 2026 07:38
…coordination

Add a new `team` middleware package that enables multiple agents to collaborate
within a team via file-backed mailbox message passing and shared task lists.

Key components:
- Team lifecycle management (leader/teammate creation, shutdown, registry)
- File-backed mailbox system with per-agent inboxes and poll-based pump
- Source router for dispatching messages to agent TurnLoops
- Protocol layer with structured message types (DM, broadcast, shutdown, idle, plan-approval)
- Team tools: Agent (spawn teammates), SendMessage, TeamCreate, TeamDelete
- Team config store for persistent team/member metadata

Also enhance the `plantask` middleware:
- Add programmatic task API (TaskInput/CreateTask/UpdateTask/ListTasks/GetTask)
- Add task reminder system that injects periodic reminders after N assistant turns
- Refactor task CRUD tools to use shared task API internally
- Expand test coverage for task operations

Change-Id: I41e0dd3be788da2a8a5c4b211106b4a26b0aa2e8
@fanlv fanlv force-pushed the feat/eager_receive_agent_team2 branch from 07842eb to e1df247 Compare April 6, 2026 08:13
@shentongmartin shentongmartin force-pushed the alpha/09 branch 4 times, most recently from 4c6d7e9 to 26b0af2 Compare April 13, 2026 09:59
@shentongmartin shentongmartin force-pushed the alpha/09 branch 3 times, most recently from e925fbc to a4460f3 Compare April 21, 2026 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-feature-request Category: feature request issue. Implementations of feature requests use `C-enhancement` instead. D-adk Domain: this is an issue related to the adk package

Development

Successfully merging this pull request may close these issues.

6 participants