-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Implement mailbox-based multi-agent coordination system in societies #3807
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
18
commits into
master
Choose a base branch
from
copilot/implement-mailbox-agents-system
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,232
−0
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
Co-authored-by: lightaime <[email protected]>
Co-authored-by: lightaime <[email protected]>
Co-authored-by: lightaime <[email protected]>
Copilot
AI
changed the title
[WIP] Research and implement mailbox based multi-agent system
Implement mailbox-based multi-agent system with message-passing coordination
Feb 8, 2026
Co-authored-by: lightaime <[email protected]>
Co-authored-by: lightaime <[email protected]>
Co-authored-by: lightaime <[email protected]>
Copilot
AI
changed the title
Implement mailbox-based multi-agent system with message-passing coordination
Add entry point for MailboxSociety message processing
Feb 8, 2026
Co-authored-by: lightaime <[email protected]>
Co-authored-by: lightaime <[email protected]>
Co-authored-by: lightaime <[email protected]>
Copilot
AI
changed the title
Add entry point for MailboxSociety message processing
Verify and document default handler uses ChatAgent.step for message processing
Feb 8, 2026
Co-authored-by: lightaime <[email protected]>
Co-authored-by: lightaime <[email protected]>
Copilot
AI
changed the title
Verify and document default handler uses ChatAgent.step for message processing
Enable FunctionTool integration for mailbox toolkits and adjust society defaults
Feb 8, 2026
Co-authored-by: lightaime <[email protected]>
Co-authored-by: lightaime <[email protected]>
Copilot
AI
changed the title
Enable FunctionTool integration for mailbox toolkits and adjust society defaults
Add autonomous agent coordination example for MailboxSociety
Feb 8, 2026
Co-authored-by: lightaime <[email protected]>
Co-authored-by: lightaime <[email protected]>
Co-authored-by: lightaime <[email protected]>
Copilot
AI
changed the title
Add autonomous agent coordination example for MailboxSociety
Add initial_messages parameter to MailboxSociety entry points and async coordination example
Feb 8, 2026
Co-authored-by: lightaime <[email protected]>
Copilot
AI
changed the title
Add initial_messages parameter to MailboxSociety entry points and async coordination example
Implement mailbox-based multi-agent coordination system in societies
Feb 8, 2026
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.
Implements a mailbox-based multi-agent system where agents coordinate through asynchronous message passing. Agents discover collaborators, send/receive messages, and process tasks autonomously without direct state access.
Core Components
MailboxSociety - Central coordinator managing agent registry, message routing, and processing loop
run()/run_async()entry points supporting initial messagesMailboxToolkit - Message operations as FunctionTools
send_message(),receive_messages(),check_messages(),peek_messages(),get_available_agents()AgentDiscoveryToolkit - Agent discovery as FunctionTools
list_all_agents(),search_agents_by_capability/tag/description(),get_agent_details(),get_my_info()AgentCard - Agent metadata describing capabilities, tags, description
MailboxMessage - Message envelope with sender/recipient IDs, content, subject, timestamp
Architecture
Key Design Decisions
ChatAgent.step()when no custom handler specifiedExamples
mailbox_society_example.py- Basic toolkit API usagemailbox_coordination_async_example.py- Autonomous multi-agent workflow (recommended)default_handler_example.py- ChatAgent.step() integrationmailbox_society_processing_example.py- Custom message handlersTesting
Comprehensive test coverage (1000+ lines):
Original prompt
societiesbased onChatAgent#3806💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.