Skip to main content
The gateway pattern allows you to create a single AgentOS instance that aggregates agents, teams, and workflows from multiple remote AgentOS instances. This provides a unified API endpoint for your distributed agentic infrastructure.

Use Cases

  • Unified API: Single endpoint for all your agents across different servers
  • Load distribution: Spread specialized agents across multiple servers
  • Microservices architecture: Each service hosts its own agents
  • Hybrid deployments: Combine local and remote agents in one interface

Basic Gateway Setup

Create a gateway that aggregates remote agents from multiple servers:

Combining Local and Remote

Mix local agents with remote agents in the same gateway:

Complete Gateway Example

Here’s a complete example with agents, teams, workflows, and a local workflow that uses remote agents:
See the full example for more information.

Authentication Considerations

If authorization is enabled on remote servers and all endpoints are protected, not all gateway functions will work correctly. Specifically, the following endpoints need to be unprotected on remote servers for the gateway to work:
  • /config
  • /agents
  • /agents/{agent_id}
  • /teams
  • /teams/{team_id}
  • /workflows
  • /workflows/{workflow_id}