Skip to content

feat(teams): add multi-agent team support with TL, bidding arena, and blackboard - #96

Open
moyunqinghe wants to merge 3 commits into
OpenBMB:mainfrom
momobiubiu:feat/multi-agent-teams
Open

feat(teams): add multi-agent team support with TL, bidding arena, and blackboard#96
moyunqinghe wants to merge 3 commits into
OpenBMB:mainfrom
momobiubiu:feat/multi-agent-teams

Conversation

@moyunqinghe

Copy link
Copy Markdown

Summary

Adds multi-agent team support: teams of digital employees with a Team Lead (TL), task assignment/claiming, a 3-round HP-based bidding arena, a per-team blackboard, and full HITL (human-in-the-loop) controls. Design decisions are documented in design-multi-agent-team-decisions.md.

Backend

  • New app/teams/ module: teams/members CRUD, task lifecycle (pending → bidding → in_progress → review/rework → done/cancelled/escalated), bidding with per-round TL scoring and HP elimination, blackboard ingest pipeline (parse → normalize → structured write → citations), wake events, and audit trail (team_task_events)
  • 7 new tables (SQLite ALTER/CREATE migrations in db/database.py), optimistic locking on task claim/award
  • Team TL chat integrated into the workspace chat: ChatSession.team_id, team-context injection (roster / open tasks / blackboard top-K) and task-dispatch post-processing in /api/chat/turn and /api/chat/stream
  • Channel bindings can target a team; inbound messages to a team-bound channel get TL semantics via service_intake.py (merged with the new inbound attachment support)
  • New blackboard query tool available inside member execution sessions

Frontend

  • New pages: TeamsPage, TeamDetailPage (task board, bidding records, reports, award override), TeamChatPage; BiddingArena and TeamCard components; sidebar navigation entry
  • Agent-scope storage extended with team scope (isTeamScope / readEmployeeScope); chat header/empty-state updated for team sessions
  • Knowledge detail dialog gains a graph view (KnowledgeGraphCanvas) with a graph/cards toggle — this intentionally coexists with the new overview-panel KnowledgeGraphVisualization
  • i18n entries for all new UI text (zh source + en translations)

Explicitly out of scope (v1): pure-agent resident TL loop, unbounded debate, automatic cross-team information flow.

Risk

  • Large surface area (~15.6k insertions), but nearly all additive; existing single-agent paths are untouched. Shared-file changes are limited to scope-storage handling and additive fields (ChatSession.team_id, ChatTurnRequest.interaction_mode)
  • DB migration is SQLite-only, matching the supported production migration path
  • Rebased onto latest main; conflicts resolved in service_intake.py (attachments + team context both preserved), KnowledgePage.tsx (both graph views kept), and en.json (both translation sets kept)

Tests

  • pytest backend/tests: 1478 passed (incl. 7 new team test modules)
  • npm --prefix frontend-enterprise test: 145 passed
  • npm --prefix frontend-enterprise run build: passes
  • ruff check: no new violations beyond patterns already present in the codebase (e.g. FastAPI Depends B008); i18n:check failure count is lower than on main (pre-existing failures unrelated to this PR)

UI validation

Routes verified locally with an admin user: /teams, /teams/:id (board, bidding arena, award override), team TL chat via /workspace/chat/:sessionId, and the knowledge detail graph view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant