---
schema_version: "1"
id: caf5aec522b150da4885315a306c6bbf15231e30c0fc52401d01fbe35fb899eb
title: Deploying Agent Network Ingress and Egress Managed Flex Gateways
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/1.12/flex-gateway-managed-ingress-egress.md
canonical_url: https://docs.mulesoft.com/gateway/1.12/flex-gateway-managed-ingress-egress
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 8189f0a63ffaaf21b3b9ab0a44bbdd7f209f2ee7aa32f5894dd37d77f8e2af61
description: MuleSoft Documentation Site
release: "1.12"
latest: false
---
---
product: Omni Gateway
version: 1.12
---

# Deploying Agent Network Ingress and Egress Managed Flex Gateways

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Agent Network deployments require both an ingress and egress Flex Gateway. The ingress Flex Gateway
sits in front of broker and API endpoints to manage and enforce policies on traffic entering the
network. The egress Flex Gateway sits on outbound paths from brokers and agents to external agents
and enforces policies, manages connections, and emits telemetry data.

The only functional difference between ingress and egress Flex Gateways, is that the egress Gateway
doesn’t have a public endpoint. Only clients inside the same private space as the egress gateway can
make requests to it. Traffic leaving the private space to external services passes through the
egress gateway.

![Agent Network showing agents and MCP servers defined in YAML and published to Exchange, with traffic through Flex Gateway, governed by API Manager, and observed in Monitoring and Visualizer](/mulesoft/current/en-us/gateway/1.12/_images/agent-fabric-architecture.png)

> [!NOTE] For a more detailed description of this architecture diagram, see
> [Agent Network Architecture](https://docs.mulesoft.com/agent-network/latest/af-agent-networks#agent-network-architecture).

## Deploy Ingress and Egress Managed Flex Gateways

The easiest way to deploy your Agent Network ingress and egress Flex Gateways is by using Anypoint
Code Builder or Anypoint Command Line Interface (CLI):

- [Set Up Agent Network Gateways by Using Anypoint Code Builder](https://docs.mulesoft.com/agent-network/latest/af-get-started#setup-gateways)

- [Set Up Agent Network Gateways by Using Anypoint CLI](https://docs.mulesoft.com/anypoint-cli/latest/agent-fabric#agent-network-setup-gateways)

To manually deploy both ingress and egress managed Flex Gateways using the Runtime Manager UI, see
[Deploy a Managed Flex Gateway](https://docs.mulesoft.com/gateway/1.12/flex-gateway-managed-set-up).

For ingress gateways, configure a **Public endpoint** in the advanced options **Ingress** tab. For
egress gateways, verify that there’s no **Public endpoint** configured. To prevent confusion, give a
descriptive name defining the gateway as either ingress or egress.

## Apply Inbound and Outbound Policies

Inbound policies are policies that are enforced on all traffic accessing an instance’s endpoint.
Outbound policies are policies that are enforced on all traffic accessing a specific URL and are
only applied to that URL. For example, for an agent instance that has multiple upstreams, an inbound
client ID enforcement policy enforces client ID verification for all traffic accessing the agent
instance. However, an outbound policy might be applied to only one of the instance’s upstream.

## Next Steps

- [Requirements and Limits for Flex Gateway](https://docs.mulesoft.com/gateway/1.12/flex-review-prerequisites)

- [Setting Up Self-Managed Flex Gateway](https://docs.mulesoft.com/gateway/1.12/flex-gateway-set-up)
