graph LR
Standard_Orchestrator["Standard Orchestrator"]
Real_time_Orchestrator_Entry["Real-time Orchestrator Entry"]
Real_time_Session_Manager["Real-time Session Manager"]
Single_Turn_Executor["Single Turn Executor"]
Action_Dispatcher["Action Dispatcher"]
Guardrail_System["Guardrail System"]
Handoff_Mechanism["Handoff Mechanism"]
Standard_Orchestrator -- "delegates to" --> Single_Turn_Executor
Standard_Orchestrator -- "interacts with" --> Guardrail_System
Standard_Orchestrator -- "initiates handoffs via" --> Handoff_Mechanism
Real_time_Orchestrator_Entry -- "delegates to" --> Real_time_Session_Manager
Real_time_Session_Manager -- "dispatches actions via" --> Action_Dispatcher
Real_time_Session_Manager -- "enqueues tasks for" --> Guardrail_System
Single_Turn_Executor -- "calls" --> Action_Dispatcher
Action_Dispatcher -- "executes handoff logic by interacting with" --> Handoff_Mechanism
click Guardrail_System href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/openai-agents-python/Guardrail_System.md" "Details"
click Handoff_Mechanism href "https://github.com/CodeBoarding/GeneratedOnBoardings/blob/main/openai-agents-python/Handoff_Mechanism.md" "Details"
The agent orchestration subsystem is designed to manage both synchronous and asynchronous agent interactions. The Standard Orchestrator handles turn-based execution, processing inputs, applying Guardrail System checks, and executing individual turns via the Single Turn Executor. For real-time scenarios, the Real-time Orchestrator Entry initiates a Real-time Session Manager, which oversees the asynchronous event loop, dispatches actions through the Action Dispatcher, and integrates with the Guardrail System. Both orchestration paths can leverage the Handoff Mechanism to transfer control or tasks, enabling complex multi-agent workflows. The Action Dispatcher serves as a central hub for processing various agent outputs, including tool calls and handoffs, ensuring flexible and extensible agent behavior.
Manages the overall flow for standard, turn-based agent execution. This includes input preparation, applying guardrails, executing single turns, and saving results. It acts as the primary orchestrator for synchronous agent interactions.
Related Classes/Methods:
Serves as the initial entry point for real-time agent execution. Its main role is to initialize and delegate control to a Real-time Session Manager, setting up the asynchronous environment.
Related Classes/Methods:
Manages the asynchronous event loop and state for a real-time agent conversation. It handles incoming events, dispatches tool calls, and updates model settings, central to event-driven, asynchronous orchestration.
Related Classes/Methods:
Executes a single turn of the agent's interaction. This involves obtaining a response from the LLM and processing the resulting actions. It's a key part of the agent's internal pipeline for a single step within the orchestration flow.
Related Classes/Methods:
A central component for processing various actions (e.g., tool calls, handoffs, computer actions, final outputs) that result from a model's response. It dispatches to different handlers based on the action type, supporting extensibility in agent behavior.
Related Classes/Methods:
Guardrail System [Expand]
Handles input/output validation and applies predefined guardrails to ensure agent responses and actions adhere to specified constraints and safety policies.
Related Classes/Methods:
Handoff Mechanism [Expand]
Manages the process of handing off control or tasks between agents or to external systems, facilitating complex multi-agent workflows and integrations.
Related Classes/Methods: