Guides
These guides cover every configuration and operational task in the Agent Gateway, organised by the same groups shown in the sidebar.
Agent enablement
An agent surface is the gateway’s primary configuration unit. It combines inbound routing, caller authentication, identity derivation, policy enforcement, and outbound call controls for one managed agent backend. Start with a starter guide to create a working surface for your protocol, then layer on access controls and policies.
| Guide | What you will achieve |
|---|---|
| A2A surface starter | Build and deploy a Vertex A2A example agent, route A2A traffic through an Agent Gateway surface, and validate direct versus gateway-mediated calls. |
| MCP surface starter | Create an MCP surface from a starter template, configure required fields, validate outbound routing, and save reusable templates. |
| Expose a REST API as MCP tools | Configure an MCP proxy that reads an OpenAPI specification and generates one MCP tool per REST endpoint, making any REST API accessible to MCP-compatible agents. |
| Configure per-caller Credential Delegation | Add a Credential Delegation element to a surface, bound to each caller’s Caller Context identity, so the gateway acquires and injects per-user OAuth tokens without exposing App credentials to callers. Works for any surface type and any OAuth 2.0 Authorization Code API; uses GitHub Copilot MCP as the sample target. |
| Carry caller claims through your managed agent | Choose which caller token claims reach your managed agent in the transit token and travel on through a Transit Point to a connected gateway. |
| Enable A2A communication with a Copilot Studio agent | Configure an A2A proxy so A2A callers can communicate with a Microsoft Copilot Studio agent through the gateway, with the gateway handling Direct Line protocol translation. |
| Control which A2A versions and messages a surface accepts | Choose the A2A versions an A2A surface accepts and how strictly the gateway checks each request before it reaches your managed agent. |
Secure access
Control which callers can reach a surface and on what terms. Caller authentication and identity derivation determine who gets in. Field-level reference for Secrets and API Keys is in the Reference section.
| Guide | What you will achieve |
|---|---|
| Restrict surface access with API key authentication | Add a Caller Context element and Rate Limit to a surface so only callers with a valid API key can reach your managed agent. |
| Limit surface access by agent identity | Derive a stable DID for each agent on a surface and gate requests using an OPA policy that checks agent identity. |
| Validate bearer tokens on a surface | Create a JWT verification strategy and attach it to a surface so the gateway validates bearer tokens from callers. |
| Accept JWTs and API keys on one surface | Add an API key method beside JWT Bearer so internal callers with a token from your identity provider and partner agents with an API key both reach the same surface. |
| Enable authorization server discovery for MCP clients | Turn on authorization server discovery for an MCP surface so MCP clients sign users in at your identity provider and call the surface with a token issued for it. |
| Authenticate callers on a Transit Point | Let an agent that can’t carry the transit token, such as a cloud-hosted agent, call a Transit Point with an API key or a JWT of its own. |
| Exchange an agent’s token for scoped downstream access | Register an STS client and exchange a token your agent already holds for a short-lived token scoped to one downstream surface. |
Apply policies
Govern what passes through the surface once a caller is authenticated, and what the managed agent can do when it calls external services. OPA policies apply Rego rules at gateway scope (all surfaces) or surface scope (one surface).
| Guide | What you will achieve |
|---|---|
| Use JWT claims to control access to a surface | Add Policy elements to a surface to control which inbound requests reach your managed agent, based on JWT claims, request attributes, or caller context. |
| Control MCP tool access with per-tool policies | Assign Rego policies to individual MCP tools so only callers whose credentials satisfy the policy can invoke each tool. |
| Apply policy to outbound calls | Route your managed agent’s outbound calls through the gateway to apply OPA policy and trust checks before each request leaves. |
| Apply OPA policies to your gateway and surfaces | Create OPA Rego policy definitions and activate them at gateway scope or surface scope to enforce access control. |
Federated connectivity
Two organisations each operate their own Agent Gateway. A federated connection links them over an encrypted DIDComm tunnel so surfaces on one gateway can route traffic to surfaces on the other, without either side exposing internal endpoints directly.
| Guide | What you will achieve |
|---|---|
| Agent validation via a trust registry | Ask a trust registry about each calling or destination agent, and refuse requests whose checks fail. |
| Verify agents across organisations with a trust registry | Record one organisation’s agents in a shared trust registry and let another organisation accept only those agents. |
| Record your agents in a trust registry | Add a Trust Recorder so the gateway records each managed agent under your Issuer, where partners’ Trust Checks can find it. |
| Troubleshoot Trust Check denials | Find why a Trust Check policy refused a request, and tell a configuration problem from an agent the registry does not trust. |
| Connect two gateways | Establish a DIDComm tunnel between two Agent Gateway instances so surfaces can route traffic between them. |
| Bind caller identity to your agent’s outbound calls | Add a Workload Binding element so the signed presentation your gateway sends carries the caller’s chosen claims, and a connected gateway’s policies can decide based on who the caller is. |
| Configure GW-to-GW authentication and routing | Validate source and target authentication flows across a live GW-to-GW MCP connection using scenario playbooks covering auth enforcement and secret injection. |
| Set up event notifications | Deliver gateway event alerts to email, Slack, a webhook, or a streaming platform. |
| Send audit events to an external system | Choose the governance audit events to keep and deliver them to a SIEM, webhook, stream, email, or Slack through an integration whose event set holds audit events. |
Operations
A running gateway holds every surface, identity, secret, and user account your agents depend on, so moving it to a new release or recovering from a bad change needs a plan. Affinidi Portal upgrades the appliance with one action, and the dashboard backs up and restores the gateway’s data. These guides cover both, including what to check after each.
| Guide | What you will achieve |
|---|---|
| Upgrade an Agent Gateway to the latest release | Check which release your gateway runs, start the upgrade from Affinidi Portal, and review the settings a release flags once it is live. |
| Back up and restore an Agent Gateway | Download an encrypted backup of all gateway data from the dashboard, store it safely, and restore the gateway from it. |
Glad to hear it. Thanks for letting us know.
Sorry to hear that. Thanks for letting us know.
Still stuck? Ask the community on Discord or contact us.