Skip to content

Conversation

@rbren
Copy link
Contributor

@rbren rbren commented Sep 25, 2025

Summary

This PR adds a simplified version of the inter-agent communication demo as simple_agent_communication.py.

Changes Made

  • Custom Agent Creation: Instead of using the default agent from presets, creates a custom agent with only messaging tools
  • Removed Receive Message Tool: Eliminates the "receive message" tool and implements direct message delivery instead
  • Streamlined Communication: Messages are automatically delivered to agents during conversation steps rather than requiring explicit polling
  • Simplified Architecture: Agents only have access to the send_message tool, making the communication flow more straightforward

Key Differences from Original Demo

  1. Agent Creation: Uses Agent() constructor directly instead of get_default_agent()
  2. Tool Simplification: Only includes messaging tools, no other default tools
  3. Message Delivery: Implements check_and_deliver_messages() function that automatically delivers pending messages
  4. Reduced Complexity: Eliminates the need for agents to actively check for messages

Testing

The demo maintains the same collaborative conversation structure where Alice and Bob discuss planning a Python project, but with a much simpler messaging architecture.

Files Added

  • simple_agent_communication.py - Simplified inter-agent communication demo

@rbren can click here to continue refining the PR

openhands-agent and others added 3 commits September 25, 2025 15:33
- Create simplified version of inter_agent_communication_demo.py
- Use custom agent with only messaging tools instead of default agent
- Remove receive message tool, use direct message delivery instead
- Streamline agent communication flow
- Remove stepping mechanism in favor of event-driven approach
- Add automatic conversation triggering when messages are sent
- Implement thread-safe conversation registry and locking
- Messages now automatically trigger recipient's conversation.run()
- Simplify conversation flow by removing manual message checking
- Add conversation duration limits instead of step counts
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.

3 participants