---
schema_version: "1"
id: 84ec32d17610489d65b3add437d54c0d135aafa513bbd41902aaf4afd826cac7
title: Agent Connection Telemetry Policy
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/gateway/latest/policies-included-agent-connection-telemetry.md
canonical_url: https://docs.mulesoft.com/gateway/latest/policies-included-agent-connection-telemetry
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 912d17945302c5046d524db3380d4e15eb7fd9524764b5c6d05f436682107e4c
description: MuleSoft Documentation Site
release: "1.14"
latest: true
---
---
product: Omni Gateway
version: 1.14
is-latest-version: true
keywords: api gateway, flex gateway, gateway, policy, agent, telemetry, agent connection, A2A, MCP
---

# Agent Connection Telemetry Policy

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

<table><colgroup><col> <col></colgroup><tbody><tr><td><p><strong>Policy Name</strong></p></td><td><p>Agent Connection Telemetry</p></td></tr><tr><td><p><strong>Summary</strong></p></td><td><p>Tracks the number of requests made to agent or MCP server instances</p></td></tr><tr><td><p><strong>Category</strong></p></td><td><p>A2A and MCP</p></td></tr><tr><td><p><strong>First Omni Gateway version available</strong></p></td><td><p>1.11.0</p></td></tr><tr><td><p><strong>Release Notes</strong></p></td><td><p><a href="https://docs.mulesoft.com/release-notes/gateway/policies/agent-connection-telemetry-release-notes">Agent Connection Telemetry</a></p></td></tr><tr><td><p><strong>Returned Status Codes</strong></p></td><td><p>No return codes exist for this policy.</p></td></tr></tbody></table>

## Summary

The Agent Connection Telemetry policy tracks the number of requests and what source makes the
request to agent or MCP server instance.

To track the source of the request, the policy uses a DataWeave expression to extract an
identification value from a request header. By default, the policy extracts the `X-AGENT-ID` header.
The `X-AGENT-ID` header contains the Mulesoft instance ID.

To track the requests, the policy uses the `mulesoft_agent_connection_count(source, destination)`
metric. Where `source` is the identification value extracted from the request header and
`destination` is the agent or MCP server instance ID. Use Anypoint Monitoring to view the metric.

If the policy can’t extract the identification header, the policy doesn’t block or track the
request.

> [!NOTE] The Agent Connection Telemetry policy is applied by default to all agent and MCP server
> instances created using Agent Fabric.

## Configure Policy Parameters

### Omni Gateway Local Mode

The Agent Connection Telemetry policy isn’t supported in Local Mode.

### Managed Omni Gateway and Omni Gateway Connected Mode

When you apply the policy from the UI, the following parameters are displayed:

<table><colgroup><col> <col></colgroup><thead><tr><th>Element</th><th>Description</th></tr></thead><tbody><tr><td><div><div><p>Source Agent ID</p></div></div></td><td><div><div><p>DataWeave expression to extract the source identification value from the request header. By default, the <code>#[attributes.headers['X-AGENT-ID']]</code> expression extracts the Mulesoft instance ID.</p></div></div></td></tr></tbody></table>
