Gateways | Solace Agent Mesh
Description: Gateways are a crucial component of the Solace Agent Mesh framework that expose the agent mesh to external systems through various protocols. Built on a common base gateway architecture, they provide the following functions:

Skip to main content

# Gateways

Gateways are a crucial component of the Solace Agent Mesh framework that expose the agent mesh to external systems through various protocols. Built on a common base gateway architecture, they provide the following functions:

- serve as the primary interface between Solace Agent Mesh and the outside world
- manage the flow of information in and out of the system through the A2A protocol
- handle authentication, user enrichment, and message processing
- support multiple interface types including REST, HTTP SSE, webhooks, and event mesh connectivity

In one sentence

Gateways are the external interfaces that connect various systems to the A2A agent mesh through standardized protocols.

## Key Functions​

1. Entry Points: Gateways act as the entry points from the outside world and translate external requests into A2A protocol messages and route them through the Solace event mesh to appropriate agents.

2. Authentication & Authorization: Common authentication and user enrichment flow across all gateway types, with pluggable identity providers.

3. Configurable System Purpose: Each gateway has a configurable system purpose that sets the context for all stimuli entering the Solace Agent Mesh through that gateway. This design allows for tailored processing based on the specific use case or domain.

4. Customizable Output Formatting: Gateways have a configurable output description that controls how stimuli responses are formatted when sent back to the outside world. This configurable output description ensures that the output meets the requirements of the receiving system or user interface.

5. Multiple Interface Types: Gateways can have different interfaces to accommodate various communication protocols and systems. Some examples include REST APIs, event meshes, Slack integrations, browser-based interfaces, and so on.

## How Gateways Work​

The following diagram illustrates the complete flow of information through a gateway in Solace Agent Mesh:

## Available Gateways​

Solace Agent Mesh comes with several built-in gateway types:

### Core Gateways​

1. HTTP SSE Gateway

   - Real-time web interface with streaming responses
   - Server-sent events for live updates
   - Agent discovery API
   - File upload and download handling

2. REST Gateway

   - Task submission with immediate task ID return
   - Polling-based result retrieval
   - Authentication integration

3. Webhook Gateway

   - Handles incoming webhook requests
   - Transforms webhook payloads to A2A messages

### Plugin Gateways​

Additional gateway types are available through the plugin ecosystem:

- Event Mesh Gateway: External event mesh connectivity with message transformation
- Slack Gateway: Slack bot integration for team collaboration
- Custom Gateways: Create your own gateway implementations

For more information about plugins and how to configure them, see Plugins.

One of the official core plugin gateway interfaces is the Solace Event Mesh Gateway, which enables communication with the PubSub+ event broker directly as an input interface.

note

Each gateway type has its own configuration options and specific features. See the individual gateway documentation pages for detailed information on setup and usage.

## Create a Gateway​

To create a gateway, you can either use one of the pre-existing plugins or create yours from scratch.

### Gateway from Scratch​

To create a gateway from scratch, you need to use the CLI `add gateway` command without any interfaces. This command creates a python gateway template file which you can then customize to your needs.

    sam add gateway my-interface

To learn more about creating your own gateway, see Create Custom Gateways.

Share and Reuse

If you would like to share your custom gateway with the community or re-use it within other projects, you can create a plugin for it. For more information, see Create Plugins.