This example demonstrates the core Genesis framework capabilities using a minimal multi-agent setup. It shows how to build agents that automatically discover each other and call external services.
- PersonalAssistant Agent - OpenAI-powered assistant that can call other services
- Calculator Service - Mathematical computation service (from existing Genesis services)
- CLI Interface - Simple command-line interface for testing
- Launch Script - Automated startup of all components
CLI Interface (MonitoredInterface)
↓ discovers & connects
PersonalAssistant (OpenAIGenesisAgent)
↓ function calls
Calculator Service (via Genesis function discovery)
User: "Tell me a joke"
CLI → PersonalAssistant → OpenAI API → Response
User: "What is 127 + 384?"
CLI → PersonalAssistant → Calculator Service → "511"
PersonalAssistant:
- Inherits from
OpenAIGenesisAgent - Uses
enable_agent_communication=True - Automatically discovers calculator service via Genesis
- Calls
await self.run()to start RPC service
CLI Interface:
- Inherits from
MonitoredInterface - Uses built-in
available_agentsfor discovery - Uses built-in
connect_to_agent()andsend_request() - No custom discovery or connection logic
Calculator Service:
- Uses existing
/services/calculator_service.py - No modifications needed - Genesis handles discovery
examples/MultiAgentV2/
├── agents/
│ └── personal_assistant.py # OpenAIGenesisAgent implementation
├── test_cli.py # MonitoredInterface test client
├── run_multi_agent_demo.sh # Launch script
├── README.md # Usage instructions
├── IMPLEMENTATION_GUIDE.md # Technical patterns
└── IMPLEMENTATION_CHECKLIST.md # Task tracking
- One-Command Launch:
./run_multi_agent_demo.shstarts everything - Automatic Discovery: CLI finds PersonalAssistant without configuration
- LLM Integration: PersonalAssistant responds to conversational queries
- Service Integration: PersonalAssistant calls calculator for math
- Real APIs Only: No mock data or simulated responses
- Start demo script
- CLI discovers PersonalAssistant
- Test: "Tell me a joke" → OpenAI response
- Test: "What is 127 + 384?" → Calculator service → "511"
- All communication automatic (no manual configuration)
- Agent Discovery: Automatic via DDS topics
- Function Discovery: Automatic service detection
- RPC Communication: Built-in request/response
- Monitoring: Comprehensive event tracking
- Error Handling: Built-in timeouts and recovery
- Custom discovery systems
- Connection managers
- Conversation managers
- Mock data or simulation
- Manual DDS topic management
This example teaches:
- Correct Genesis Patterns - How to use the framework properly
- Agent Communication - Real agent-to-agent and agent-to-service calls
- Automatic Discovery - No configuration required
- LLM Integration - OpenAI + function calling
- Service Integration - Using existing Genesis services
- Genesis developers learning the framework
- New users wanting to see Genesis capabilities
- System integrators needing multi-agent examples
- Anyone who wants to see "it just works" without complex setup
Estimated: 2-4 hours total
- PersonalAssistant: 30 minutes (copy existing pattern)
- CLI Interface: 30 minutes (copy existing pattern)
- Launch Script: 15 minutes (standard bash script)
- Testing: 1-2 hours (verify real agent communication)
- Documentation: 30 minutes
This is a simple, working example that demonstrates Genesis capabilities without overengineering.