Gateway#

The Gateway provides the single entry point for all message processing in the Osprey Framework. All interfaces (CLI, OpenWebUI, etc.) should call Gateway.process_message().

Note

The Gateway operates external to the compiled graph by design, enabling it to perform meta-operations such as approval response processing, state lifecycle management, and interrupt detection. This centralized approach simplifies interface implementation by removing the need for interfaces to handle complex state management, slash commands, or approval workflow logic directly.

Gateway Class#

Gateway Result#

Registration & Configuration#

Gateway is not registered in the framework registry as it serves as the entry point that interfaces call directly. It operates independently of the node execution system and manages state transitions for the framework.

Gateway uses LLM-powered approval detection through the configured approval model for robust natural language understanding of user approval responses. All other operations are deterministic.

Architecture Overview#

The Gateway handles:

  • State reset for new conversation turns

  • Slash command parsing and application

  • Approval response detection and resume commands

  • Message preprocessing and state updates

Key Principles:

  • Gateway is the only component that creates state updates

  • Interfaces handle presentation only

  • Clean separation of concerns with single responsibility

See also

AgentState

Core state management system used by Gateway

StateManager

Factory functions for creating fresh state instances