feat(teams): add multi-agent team support with TL, bidding arena, and blackboard - #96
Open
moyunqinghe wants to merge 3 commits into
Open
feat(teams): add multi-agent team support with TL, bidding arena, and blackboard#96moyunqinghe wants to merge 3 commits into
moyunqinghe wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
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)db/database.py), optimistic locking on task claim/awardChatSession.team_id, team-context injection (roster / open tasks / blackboard top-K) and task-dispatch post-processing in/api/chat/turnand/api/chat/streamservice_intake.py(merged with the new inbound attachment support)blackboardquery tool available inside member execution sessionsFrontend
TeamsPage,TeamDetailPage(task board, bidding records, reports, award override),TeamChatPage;BiddingArenaandTeamCardcomponents; sidebar navigation entryisTeamScope/readEmployeeScope); chat header/empty-state updated for team sessionsKnowledgeGraphCanvas) with a graph/cards toggle — this intentionally coexists with the new overview-panelKnowledgeGraphVisualizationExplicitly out of scope (v1): pure-agent resident TL loop, unbounded debate, automatic cross-team information flow.
Risk
ChatSession.team_id,ChatTurnRequest.interaction_mode)main; conflicts resolved inservice_intake.py(attachments + team context both preserved),KnowledgePage.tsx(both graph views kept), anden.json(both translation sets kept)Tests
pytest backend/tests: 1478 passed (incl. 7 new team test modules)npm --prefix frontend-enterprise test: 145 passednpm --prefix frontend-enterprise run build: passesruff check: no new violations beyond patterns already present in the codebase (e.g. FastAPIDependsB008);i18n:checkfailure count is lower than onmain(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.