# Govern AI agents with the AI Agent Gateway

The AI Agent Gateway sits between your AI assistants and the business systems
they act in, such as Salesforce, Microsoft 365, and Atlassian. Every time an
agent asks to do something, the gateway checks who the person and the agent are,
applies the policies you set, and records the decision. Requests that fail a
check are blocked, and you can see why.

This guide is for tenant administrators. It covers connecting integrations,
setting policy, choosing what the gateway records, receiving alerts, and
reviewing what agents did.

> **note**

The **Runtime AI Gateway** pages and the gateway widgets appear only after Axiad
turns the AI Agent Gateway on for your tenant. Until then you still see
**Alert destinations**, **AI policy**, and **Policy versions**. Contact
Axiad Customer Success to enable it.

## Before you begin

- A Mesh administrator account. Only administrators can open **Settings**, and
  several actions say "Only tenant administrators can…".
- An identity provider configured for sign-in. See
  [Identity providers](/docs/admin-guide/identity-providers).
- Admin access to each system you want agents to reach, so you can approve the
  connection.

## Where the settings are

Open **Settings** from the gear icon. The gateway pages are in the left rail:

| Group | Pages |
| --- | --- |
| **Alert destinations** | Where administrator alerts are sent |
| **AI policy** | **Agent policy** |
| **Runtime AI Gateway** (gateway only) | **Target access**, **Signal bands**, **Integrations**, **Capture settings** |
| **Policy versions** | History and rollback for the agent policy and the target access policy |

## Connect an integration

An integration is a connection that your AI agents act through. Each one has its
own endpoint. A built-in integration starts with every operation enabled. An MCP
server offers no tool to agents until you enable it.

1. Select **Settings**, then **Runtime AI Gateway**, then **Integrations**.
2. Select **Add integration** and choose the system. To connect an MCP server
   instead, select **Add MCP server**.
3. In the **Set up** dialog, follow the steps for that system. For Microsoft 365
   you can **Sign in to provision** or **Download Exchange RBAC script**, and
   **Show setup runbook** opens the full steps.
4. Select **Test connection**. If the test fails, the dialog tells you why:
   the settings are not valid for the target, Mesh could not reach the target,
   the target rejected the credentials, or the credentials work but the target
   did not grant every permission the enabled operations need. For Microsoft
   365, mail and calendar permissions come only from the Exchange RBAC script,
   so run it again after you enable more operations.
5. Select **Activate**. Activate is available after a passing test of the
   current settings.

A passing test also re-enables operations that the gateway turned off. To pause
an integration, use **Suspend**: it keeps the settings and stops agents from
reaching it.

### Choose the operations agents can use

Built-in integrations, such as Salesforce, Microsoft 365, and Atlassian, start
with every operation enabled, including operations that delete or send data. To
narrow them, select **More**, then **Edit** on the integration row, and clear the
operations you do not want under **Enabled operations**. An active integration
needs at least one.

Enabled operations are not yet allowed. Until a policy is enabled in
[Target access](#control-what-agents-may-do-on-each-integration), the gateway
denies every agent action.

### Choose the tools of an MCP server

For an MCP server integration, select **Tools** on its row. No tool is available
to agents until you enable it here.

- Use **Filter tools**, **Enable all**, and **Disable all** to manage the list.
- Set each tool's **Data tier**: **Public**, **Internal**, **Confidential**, or
  **Restricted**. This is the most sensitive class of data the tool may handle,
  and agent policies compare it with their own data tier limit.
- Review the **Behavior hints**, **Reversibility**, and **Output** columns, and
  any **Argument restrictions** (**One of (enum)**, **Allow list**, or
  **Pattern**).
- Select **Save tool settings**. Changes apply to agents after you save.

### Offer several integrations on one endpoint

By default one endpoint exposes the tools of every integration. In the
**Bundles** card, select **Add bundle** to give agents one endpoint for only some
integrations. Enter an **Endpoint name** (1 to 48 lowercase letters, digits, or
hyphens, starting and ending with a letter or digit), a **Display name**, and the
**Integrations in this bundle**, then select **Save bundle**. The endpoint name
cannot be edited later, so agents that are already connected keep working.

## Set the agent policy

The agent policy decides how Mesh classifies AI tools and what happens when one
is seen. One policy applies everywhere Mesh observes AI use: it is enforced
inline for requests that pass through the gateway, and it is used to classify AI
tools that Mesh discovers on endpoints, in connected cloud environments, and
through identity provider sign-ins.

The labels in the [Agentic AI inventory](/docs/user-guide/agentic-ai-inventory)
use only each tool family's status and the **Default for uncatalogued tools**.
Custom tools and exceptions do not change those labels. A tool family whose
status is limited to groups is shown there as **Shadow AI** or
**Suspected shadow AI**, whatever that status is.

Open **Settings**, then **AI policy**, then **Agent policy**. The policy has
three steps.

### Step 1: Tool statuses

Decide which AI tools are **Sanctioned**, **Monitored**, or **Unsanctioned**.

- **Default for uncatalogued tools** applies to a tool that is neither in the
  catalog nor declared as a custom tool. Choose **Monitored** or
  **Unsanctioned**.
- On **Catalog tools**, select **Add tool family** to set a status for a family.
  You can limit a tool to certain identity provider groups and to a highest
  **Data tier** that may be sent to it.
- On **Custom tools**, declare tools specific to your organization, in addition
  to the catalog.

### Step 2: Responses

- **When a new AI tool is discovered:** turn on **Raise an alert** to send an
  alert to your alert destinations the first time a tool is seen, and choose its
  **Alert severity** (**Low**, **Medium**, **High**, or **Critical**).
- **When a request reaches the gateway:** for **Sanctioned tools**,
  **Monitored tools**, and **Unsanctioned tools**, choose **Allow**, **Notify**,
  or **Deny**. Allow passes the request, Notify passes it and raises an alert,
  and Deny blocks it.

### Step 3: Exceptions

Give a person or group a different tool status for a limited time. Every
exception has an end date and holds through that day (UTC). Select
**Add exception** and enter the subject, the tool family, a justification, an
approver, and the end date.

### Save, enable, and roll back

Changes are a draft until you enable them.

1. Select **Save draft**. The draft is not live until you enable it.
2. Select **Enable** and confirm. The new version takes effect for the gateway
   right away and replaces the current one.

If someone else changed the draft, select **Reload policy** to see their version.
Until a policy is enabled, the gateway treats every AI tool as monitored.

## Control what agents may do on each integration

**Target access** sets what agents may do on each connected integration when a
call goes through the gateway. Until a policy is enabled here, the gateway denies
every agent action.

1. Select **Settings**, then **Runtime AI Gateway**, then **Target access**.
2. Select **Add integration**. If the integration lists its operations, include
   the ones agents may use, or select **Select all**. Each included operation
   starts as **Deny**: select it and set **Effect** to **Allow**. For an
   integration without an operation list, select **Add rule** and enter the
   **Operation id**.
3. Select **Save draft**, then **Enable**.

For each operation you can set:

| Field | What it does |
| --- | --- |
| **Operation id** | The operation the rule applies to, as the integration names it. |
| **Effect** | **Allow** or **Deny**. New rules start as **Deny**. An omitted effect means deny. |
| **Limit to groups** | Applies the rule only to members of the listed identity provider groups. The default is **Everyone**. |
| **Customer** | Narrows the rule to one customer of the integration. |
| **Rate limit** | A maximum number of requests within a window, in seconds. |

Under **Signals**, set conditions on the identity's risk signals: the action for
an exposure signal, whether the operation **Needs signal**, and an action per
risk band (**High**, **Medium**, **Low**, and **Unknown**), each **Allow**,
**Notify**, or **Deny**. **Signal defaults** apply tenant-wide: the **Cache TTL
(seconds)** (5 to 3600), the **Failure action** when signals are unavailable, and
the **Unknown action** when an identity has no signal.

### Signal bands

**Signal bands** sets the cutoffs for the medium and high bands that Target
access rules act on. Enter **Medium band from** and **High band from** (the high
cutoff must be above the medium cutoff), then select **Save cutoffs**. A signal at
or above a cutoff falls in that band, and anything below the medium cutoff is
low. New cutoffs apply as the gateway fetches signals again, within the
**Cache TTL (seconds)** set under **Signal defaults**. They are tenant preferences
and are not versioned, so there is no draft and no earlier version to return to.

## Choose what the gateway records

Open **Settings**, then **Runtime AI Gateway**, then **Capture settings**.

- **Session idle timeout** (10 to 600 seconds): calls from the same agent are
  grouped into one session until it stays quiet for this long.
- **Decision retention** (1 to 90 days): how long the gateway keeps its record of
  each call and what it did with it: allowed, allowed with a notification,
  denied, or throttled. Decisions older than this are deleted within a day.
- **Full payload capture**: stores an encrypted copy of each agent call's
  payload, kept for the shorter of the retention period and 7 days.

> **caution**

When you turn on **Full payload capture**, every agent call's full request and
result is stored encrypted, so it can include sensitive data. Captured payloads
are kept at most 7 days, and only Mesh administrators can view them. Turning it
on asks you to confirm. The change applies when you save the settings.

Select **Save settings** to apply, or **Discard changes** to cancel.

## Receive alerts

Open **Settings**, then **Alert destinations**. Every active destination receives
each administrator alert from your AI agents. Repeats of the same alert within the
grouping window are sent as one summary.

1. Select **Add destination** and choose a type. If you choose Slack and no Slack
   bot is connected yet, connect one in **Outreach channels** first.
2. Set the **Grouping window (seconds)**, from 60 to 86400, and select
   **Save window**. The first alert is sent at once, and repeats are counted and
   sent as one summary.
3. Select **Send test alert** on a row. The result is **Delivered** or
   **Failed** with a reason, such as the destination could not be reached or
   rejected the alert. You can send one test alert to a destination every 30
   seconds.

Use the row toggle to turn a destination on or off. To delete one, select
**Remove**: its stored address or secrets are deleted permanently and alerts stop
going to it right away.

## Review what agents did

When the gateway is on, the workspace dashboard offers an **AI Gateway** starter
view and gateway widgets in **Add widget**.

- **Gateway summary:** **Sessions analysed**, calls **Blocked by policy**, agents
  active, the most used target system, and the most active person, for the last
  hour, 24 hours, 7 days, or 31 days.
- **Outcome trend** and **Policy checks:** which checks shaped decisions, with
  reasons such as "Rate limit reached" or "Access policy denies this operation".
- **Activity:** every call agents made through the gateway and the access
  decision for it. Filter by time window, outcome, or agent, and select
  **Details** on a row.
- **Agents:** command-line agents wait in **Pending** until an administrator
  selects **Approve**. Browser-based agents are active as soon as the person
  signs in, and the agent policy and Target access govern what they may do. A
  revoked agent is denied on its next call. Use **Set family** if
  an agent needs a tool family.
- **Call detail:** the **Decision** tab explains why a call was allowed or denied.
  The **Payload** tab shows a redacted copy of the call when one was stored.
  Every view of a payload, redacted or
  decrypted, is recorded in the Mesh audit log.

The outcomes you see are **Allowed**, **Allowed, notified**, **Denied**, and
**Throttled**.

## Policy versions

**Policy versions** lists every version of the agent policy and the target access
policy. View any version, or enable an earlier **Superseded** version to roll
back. A rollback creates a new version, and enabling content that is already live
has no effect. Signal bands are not versioned.

## Related guides

- [Agentic AI inventory](/docs/user-guide/agentic-ai-inventory): see the AI tools
  and agents Mesh has found, and who uses them.
- [External MCP servers](/docs/admin-guide/external-mcp-servers): connect an
  external server for the Mesh assistant.
