2.0 KiB
2.0 KiB
Testing Guide for Agent Team Collaboration Framework
What to Observe
1. Parallel Execution
- Expected: When master assigns tasks to multiple members, they should appear in the UI simultaneously (not sequentially)
- How to verify: Watch the frontend - you should see streaming output from both 合同律师 and 合规专员 at the same time
2. Shared Blackboard
- Expected: Each member's draft output is added to the board
- How to verify: Check the board context in the master's feedback message
3. Challenge Round
- Expected: After parallel execution, members with
can_challenge: truereview the board - How to verify:
- Look for events with
role: "challenge"in the event stream - Frontend should show challenge phase output
- If a member outputs
CHALLENGE:..., it appears in the board
- Look for events with
4. Master Integration
- Expected: Master receives complete board (drafts + challenges) before making final decision
- How to verify: Master's feedback message includes
<team_board>section with all entries
Test Scenario: Employee Termination
Send a question like:
我们需要辞退一名员工,请帮我们制定一个合法的辞退方案。
Expected flow:
- Master analyzes and assigns tasks to both 合同律师 and 合规专员
- Both members work in parallel (visible in UI)
- Challenge round begins - members review each other's work
- If 合规专员 finds compliance issues in 合同律师's draft, outputs
CHALLENGE:... - Master sees complete board and makes final decision
Key Events to Monitor
EvtAgentMessagewithrole: "member"- parallel executionEvtAgentMessagewithrole: "challenge"- challenge roundEvtRoomStatus- status transitions (thinking → working → thinking → pending)- Board context in master's feedback messages
Code Locations
- Parallel execution:
room.go:runMembersParallel() - Challenge round:
room.go:runChallengeRound() - Main flow:
room.go:HandleUserMessage()(lines 281-362) - SharedBoard:
room.go:SharedBoardtype (lines 90-114)