Purpose: fast reference for contributors and agents to understand core class hierarchy, discovery, DDS topics, and request–reply paths without re-exploring the repo each time.
- Core library
genesis_lib/genesis_app.pygenesis_lib/agent.pygenesis_lib/monitored_agent.pygenesis_lib/interface.pygenesis_lib/monitored_interface.pygenesis_lib/enhanced_service_base.pygenesis_lib/rpc_service.pygenesis_lib/rpc_client.pygenesis_lib/function_discovery.pygenesis_lib/agent_communication.pygenesis_lib/datamodel.pygenesis_lib/config/datamodel.xml
- Examples
examples/GraphInterface/server.pyexamples/MultiAgent/README.md
- Docs (deep dives)
docs/user-guides/genesis_function_rpc.mddocs/user-guides/function_call_flow.mddocs/reference/RTI_7.3_RPC.mddocs/architecture/monitoring_system.md
- Interfaces
GenesisInterface→MonitoredInterface
- Agents
GenesisAgent→MonitoredAgent→ concrete agents (e.g.,OpenAIGenesisAgent)
- Services (function providers)
GenesisRPCService→EnhancedServiceBase→ concrete services
- Discovery/Execution helpers
FunctionRegistry(advertises/discovers functions via DDS)GenesisRPCClient(generic client for Function RPC)AgentCommunicationMixin(agent-to-agent discovery + RPC, mixed into agents)
genesis_lib/genesis_app.py: shared DDS setup for agents/interfaces; creates participant, registration topic/pubs/subs; constructsFunctionRegistry.genesis_lib/agent.py: agent base. Publishes registration, sets up Interface↔Agent RPC replier usingInterfaceAgentRequest/Replytypes. Optional agent↔agent via mixin.genesis_lib/monitored_agent.py: adds monitoring/graph events and convenience around calls.genesis_lib/interface.py: interface base. Monitors agent registration, creates RPC requester to a discovered agent’s service, and sends requests.genesis_lib/monitored_interface.py: adds monitoring and chain overlays to the interface.genesis_lib/rpc_service.py: base service with DDSrti.rpc.ReplierusingFunctionRequest/Reply. Registers functions and runs the request loop.genesis_lib/enhanced_service_base.py: service with auto function advertisement viaFunctionRegistry, graph events, and wrappers.genesis_lib/function_discovery.py: advertises functions (asFunctionCapability) and discovers them; maintains in-memory catalog; contains execution Requester for function calls if needed.genesis_lib/rpc_client.py: generic RPC client usingrti.rpc.RequesterwithFunctionRequest/Replytypes.genesis_lib/agent_communication.py: agent capability advertisement and discovery; agent↔agent request–reply usingAgentAgentRequest/Reply.
- XML definitions:
genesis_lib/config/datamodel.xml- Registration:
genesis_agent_registration_announceon topicGenesisRegistration - Interface↔Agent RPC:
InterfaceAgentRequest,InterfaceAgentReply - Agent↔Agent RPC:
AgentAgentRequest,AgentAgentReply - Function advertisement:
FunctionCapability - Monitoring/Graph:
MonitoringEvent,ChainEvent,GenesisGraphNode,GenesisGraphEdge
- Registration:
- Python IDL structs (Function RPC):
genesis_lib/datamodel.pyFunction,Tool,FunctionCall,FunctionRequest,FunctionReply
QoS patterns (typical)
- Durability:
TRANSIENT_LOCALon discovery/monitoring topics - Reliability:
RELIABLE - History:
KEEP_LASTwith depth (~256–500) - Liveliness:
AUTOMATIC(lease ~2s)
- Agent presence
- Agents publish to
GenesisRegistration(genesis_agent_registration_announce). Interfaces listen viaRegistrationListenerto detect arrivals/departures and captureservice_name. - Agent capabilities are published on
AgentCapability(rich metadata: capabilities, specializations, tags, model info).AgentCommunicationMixinreads/writes this.
- Agents publish to
- Function capabilities
- Services (via
EnhancedServiceBase→FunctionRegistry) publishFunctionCapabilitywith:name,description,parameter_schema(JSON),provider_id, and cruciallyservice_name(the RPC endpoint to target when calling this function). - Agents and generic clients subscribe to
FunctionCapabilityto build a function catalog.
- Services (via
- Interface → Agent (chat or high-level command)
- Types:
InterfaceAgentRequest/InterfaceAgentReply(XML dynamic data) - Mechanism:
rti.rpc.Requesteron interface,rti.rpc.Replieron agent; interface tracks discovery to pick a service name and then calls.
- Types:
- Agent → Service (function call)
- Types: Python IDL
FunctionRequest/FunctionReply - Mechanism:
GenesisRPCClient/GenesisRPCServiceor directlyrti.rpc.Requester/ReplierinsideEnhancedServiceBase. - Target resolution: obtained from discovered
FunctionCapability.service_name.
- Types: Python IDL
- Agent ↔ Agent (specialization delegation)
- Types:
AgentAgentRequest/AgentAgentReply(XML dynamic data) - Mechanism:
AgentCommunicationMixincreates unique per-agent service names, handles discovery, and routes requests.
- Types:
- Interface → Primary Agent (LLM tools)
- Interface discovers an agent, binds to its service name, and sends
InterfaceAgentRequest. - Agent processes request and may select tools (functions or other agents) based on discovered catalogs.
- Primary Agent → Function Service (via Function RPC)
- Uses discovered
FunctionCapabilityto select function and targetservice_name. - Builds
FunctionRequest(function.name, arguments=json.dumps(args)); awaitsFunctionReply. - Service run loop (
GenesisRPCService.run) parses JSON args, calls the implementation, and replies.
- Primary Agent → Specialist Agent (Agent-as-Tool)
- Uses
AgentCapabilitycatalog; sendsAgentAgentRequestto a unique agent service endpoint. - Specialist may in turn call functions; context IDs can flow across hops.
Monitoring
GraphMonitorpublishes node/edge events for discovery, calls, and results.- Optional
ChainEventoverlays relate multi-hop chains.
- Registration and DDS setup:
genesis_lib/genesis_app.py - Interface side binding + send:
genesis_lib/interface.py,genesis_lib/monitored_interface.py - Agent side receive + process:
genesis_lib/agent.py,genesis_lib/monitored_agent.py - Function service base mechanics:
genesis_lib/rpc_service.py,genesis_lib/enhanced_service_base.py - Function discovery and catalog:
genesis_lib/function_discovery.py - Agent-to-agent capability and RPC:
genesis_lib/agent_communication.py - Function call datatypes (Python IDL):
genesis_lib/datamodel.py - XML type catalog:
genesis_lib/config/datamodel.xml
- New service
- Subclass
EnhancedServiceBase; add functions; call/run. Functions auto-advertise viaFunctionRegistry.
- Subclass
- New interface
- Subclass
MonitoredInterface; useconnect_to_agent(service_name)thensend_request({...}).
- Subclass
- New agent
- Subclass
MonitoredAgent; optionally enableAgentCommunicationMixinfor agent-as-tool flows.
- Subclass
- Classes of interest:
rg -n "class (Genesis|Monitored|Enhanced|FunctionRegistry|OpenAIGenesis)" genesis_lib - DDS topics in XML:
rg -n "<struct name=|<enum name=|Topic\(" genesis_lib/config/datamodel.xml genesis_lib -S - RPC usage sites:
rg -n "rti\.rpc\.(Requester|Replier)" genesis_lib - Function advertisement flow:
rg -n "FunctionCapability|register_function|advertise" genesis_lib
- Full suite orchestrator:
run_scripts/run_all_tests.sh(requires RTI Connext DDS 7.3+ and relevant API keys for LLM tests, e.g.,OPENAI_API_KEY). - Targeted examples:
examples/GraphInterface/server.pyandexamples/MultiAgent/*.
docs/user-guides/genesis_function_rpc.md— complete Function RPC workflow and rationale.docs/user-guides/function_call_flow.md— sequence diagram for agent-as-tool.docs/reference/RTI_7.3_RPC.md—rti.rpcprimitives reference.docs/architecture/AGENT_ARCHITECTURE_QUICK_REFERENCE.md— agent patterns and architecture.
(c) 2025 Copyright, Real-Time Innovations, Inc. (RTI) All rights reserved.
RTI grants Licensee a license to use, modify, compile, and create derivative works of the Software. Licensee has the right to distribute object form only for use with RTI products. The Software is provided "as is", with no warranty of any type, including any warranty for fitness for any purpose. RTI is under no obligation to maintain or support the Software. RTI shall not be liable for any incidental or consequential damages arising out of the use or inability to use the software.