graph LR
MCP_Server["MCP Server"]
MCP_Client_Utility["MCP Client/Utility"]
Runner_Orchestrator["Runner/Orchestrator"]
Agent_Core["Agent Core"]
Session_Memory_Management["Session/Memory Management"]
Tracing_Telemetry["Tracing/Telemetry"]
MCP_Server -- "provides services to" --> MCP_Client_Utility
MCP_Server -- "integrates with" --> Session_Memory_Management
Tracing_Telemetry -- "monitors" --> MCP_Server
MCP_Client_Utility -- "depends on" --> MCP_Server
Agent_Core -- "uses" --> MCP_Client_Utility
Tracing_Telemetry -- "monitors" --> MCP_Client_Utility
Runner_Orchestrator -- "sends requests to" --> MCP_Server
The openai-agents-python project is structured around a central Multi-Agent Communication Protocol (MCP) Server, which acts as the core for inter-agent communication and tool management. The MCP Client/Utility provides a simplified interface for various agents and system components to interact with this server, abstracting the underlying communication complexities. The Agent Core leverages this client utility for discovering and utilizing tools, forming the fundamental building block of the agent system. The Runner/Orchestrator component is responsible for executing operations, primarily by sending requests to the MCP Server for tool invocations. Session/Memory Management integrates with the MCP Server to provide context-specific tools and manage session-related data. Finally, the Tracing/Telemetry component provides essential monitoring capabilities, observing the activities of both the MCP Server and Client/Utility to ensure system observability and performance tracking. This architecture promotes modularity and clear separation of concerns, with the MCP Server facilitating centralized tool access and communication.
Acts as the central hub for the Multi-Agent Communication Protocol. It manages the lifecycle of the MCP server, including establishing and cleaning up connections. Its core functionality involves registering and listing available tools, and handling tool invocation requests from various agents or system components. It also incorporates internal logic for filtering tools based on defined criteria.
Related Classes/Methods:
Provides a high-level abstraction layer for agents and other system parts to interact with the MCP Server. It offers helper functions that abstract the direct communication details with the server, facilitating operations like retrieving all available function tools, getting specific function tools, and invoking MCP-managed tools.
Related Classes/Methods:
Responsible for running or orchestrating operations, interacting with the MCP Server for tool invocations.
Related Classes/Methods:
The core component of the agent system, utilizing the MCP Client/Utility for tool discovery and utilization.
Related Classes/Methods:
Responsible for managing sessions and memory, integrating with the MCP Server to provide tools within specific session contexts.
Related Classes/Methods:
Responsible for monitoring and tracing system activities, including the MCP Server and Client/Utility.
Related Classes/Methods: