Initializes the AgentOSOrchestrator with its configuration and dependencies. This method must be called successfully before orchestrating any turns.
Configuration settings for the orchestrator.
Required services.
A Promise that resolves when initialization is complete.
If any critical dependency is missing or config is invalid.
Orchestrates a full logical turn for a user request. This involves managing GMI interaction, tool calls, and streaming responses. Instead of directly yielding, it uses the StreamingManager to push chunks.
The comprehensive input for the current turn.
The ID of the stream to which responses will be pushed.
If critical initialization or setup fails.
Handles the result of an external tool execution, feeding it back into the relevant GMI instance for continued processing. Uses StreamingManager to push subsequent GMI outputs.
The orchestrator's stream ID for this interaction flow.
The ID of the tool call being responded to.
The name of the tool.
The output from the tool.
Whether the tool execution was successful.
Optional errorMessage: stringError message if not successful.
If stream context is not found or GMI fails to handle result.
AgentOSOrchestrator
Description
The
AgentOSOrchestratoris responsible for unifying the request handling pipeline for AgentOS. It bridges the high-levelAgentOSInputfrom the public API to the internalGMIprocessing logic. It ensures that user requests are routed to the correct GMI, manages the GMI's turn lifecycle, and handles the complex dance of tool calls and streaming responses.