Guides

Step-by-step guides for real configuration and operational tasks in the Agent Gateway.

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.

GuideWhat you will achieve
A2A surface starterBuild and deploy a Vertex A2A example agent, route A2A traffic through an Agent Gateway surface, and validate direct versus gateway-mediated calls.
MCP surface starterCreate an MCP surface from a starter template, configure required fields, validate outbound routing, and save reusable templates.
Expose a REST API as MCP toolsConfigure 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 DelegationAdd 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.

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.

GuideWhat you will achieve
Restrict surface access with API key authenticationAdd 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 identityDerive 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 surfaceCreate a JWT verification strategy and attach it to a surface so the gateway validates bearer tokens from callers.

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).

GuideWhat you will achieve
Use JWT claims to control access to a surfaceAdd 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 policiesAssign Rego policies to individual MCP tools so only callers whose credentials satisfy the policy can invoke each tool.
Apply policy to outbound callsRoute 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 surfacesCreate 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.

GuideWhat you will achieve
Agent validation via a trust registryConfigure Trust Check queries against a trust registry and write OPA policy rules that enforce access decisions based on trust verification outcomes.
Connect two gatewaysEstablish a DIDComm tunnel between two Agent Gateway instances so surfaces can route traffic between them.
Configure GW-to-GW authentication and routingValidate 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 notificationsDeliver gateway event alerts to email, Slack, a webhook, or a streaming platform.