Skip to content

Commit 2fb17cf

Browse files
authored
Merge branch 'main' into adb-fixes
2 parents 901fc27 + fcea65f commit 2fb17cf

41 files changed

Lines changed: 7324 additions & 6058 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.docs-test.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ versions = ["main", "latest", "2.2.x", "1.0.x"]
4848
hugoWarnings = [
4949
"\\.Site\\.Data was deprecated",
5050
"'items' parameter of the 'tabs' shortcode is deprecated",
51+
# FlexSearch bundle couldn't be fetched from the CDN at build time, so the
52+
# theme fell back to a runtime CDN <script> tag instead of failing the build.
53+
# This is a transient, network-only CI failure we don't control; the fallback
54+
# keeps the site working. The warnf is allowlisted so a blip doesn't turn CI
55+
# red, but it stays in the build log as a trace.
56+
"FlexSearch: could not fetch .* at build time",
5157
]
5258

5359
# NOTE: agw-oss previously allowlisted two Hextra main.min.js null-dereferences

.github/workflows/framework-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,11 @@ jobs:
122122
env:
123123
DOCS_TEST_CONFIG: ${{ github.workspace }}/.docs-test.toml
124124
run: |
125+
# pipefail required: bare `run:` steps run as `bash -e {0}` without
126+
# pipefail here, so `tee`'s exit (0) would mask a failing test suite and
127+
# the step would go green. The `if: always()` summary/upload steps below
128+
# already assume this step can fail.
129+
set -o pipefail
125130
# One invocation runs both projects against the single build above.
126131
npx playwright test --project=static --project=content --reporter=list,html 2>&1 | tee playwright-output.txt
127132

assets/agw-docs/pages/agentgateway/agent/agentcore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ IAM (SigV4) is the default. {{< reuse "agw-docs/snippets/agentgateway.md" >}} si
1616
{{% tab name="JWT authorization" %}}
1717
Amazon Cognito is an example tool to use for JWT authorization. The AgentCore runtime validates an OIDC bearer token on each request. To use this mode, attach a backend authentication policy that sends the token in the `Authorization` header. This overrides the default SigV4 signing. Unlike SigV4 credentials, a JWT expires, so you must refresh the token in the backing Kubernetes Secret before it expires.
1818

19-
This mode works only if the AgentCore runtime was deployed with **Inbound Auth** configured to accept JSON Web Tokens (a `customJWTAuthorizer`). The authorizer's `discoveryUrl` and `allowedClients` list must match the token you send: the token's issuer (`iss`) must match the discovery URL's user pool, and the token's client ID must be in `allowedClients`. If the runtime uses the default IAM authorization instead, it rejects bearer tokens with an authorization-method mismatch. You configure Inbound Auth when you deploy the runtime in AWS, not on the gateway. For more information, see the [AgentCore Identity documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/identity-inbound-auth.html).
19+
This mode works only if the AgentCore runtime was deployed with **Inbound Auth** configured to accept JSON Web Tokens (a `customJWTAuthorizer`). The authorizer's `discoveryUrl` and `allowedClients` list must match the token you send: the token's issuer (`iss`) must match the discovery URL's user pool, and the token's client ID must be in `allowedClients`. If the runtime uses the default IAM authorization instead, it rejects bearer tokens with an authorization-method mismatch. You configure Inbound Auth when you deploy the runtime in AWS, not on the gateway. For more information, see the [AgentCore Identity documentation](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/what-is-bedrock-agentcore.html).
2020
{{% /tab %}}
2121
{{< /tabs >}}
2222

assets/agw-docs/pages/agentgateway/integrations/llm-clients-k8s/continue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Configure [Continue](https://www.continue.dev/), the open-source AI code assistant for VS Code, to use agentgateway deployed in Kubernetes.
1+
Configure [Continue](https://continue.dev/), the open-source AI code assistant for VS Code, to use agentgateway deployed in Kubernetes.
22

33
## Before you begin
44

assets/agw-docs/pages/agentgateway/integrations/llm-clients/continue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Configure [Continue](https://www.continue.dev/), the open-source AI code assistant for VS Code, to route requests through agentgateway.
1+
Configure [Continue](https://continue.dev/), the open-source AI code assistant for VS Code, to route requests through agentgateway.
22

33
## Before you begin
44

assets/agw-docs/pages/agentgateway/llm/virtual-keys.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ Store your virtual keys in a Kubernetes ConfigMap, with one entry per user. Beca
5858

5959
> [!IMPORTANT]
6060
> ConfigMaps with hashed keys (as opposed to Secrets) are the recommended way to store virtual keys. If you need to use Kubernetes Secrets, refer to the [API key authentication guide]({{< link-hextra path="/security/apikey/" >}}) for an example.
61+
>
62+
> Already storing virtual keys in a Secret? Instead of recreating them by hand, use the [`agctl migrate`]({{< link-hextra path="/reference/agctl/agctl-migrate/" >}}) command to convert your existing Secrets into the recommended ConfigMap format.
6163
6264
1. Generate a `sha256:<hex>` hash for each user's API key. The hash is computed over the exact key bytes, so do not include a trailing newline.
6365

@@ -95,6 +97,9 @@ Store your virtual keys in a Kubernetes ConfigMap, with one entry per user. Beca
9597
EOF
9698
```
9799

100+
> [!TIP]
101+
> If you already store virtual keys in a Kubernetes Secret, you do not have to build this ConfigMap by hand. Use the [`agctl migrate`]({{< link-hextra path="/reference/agctl/agctl-migrate/" >}}) command to generate an equivalent ConfigMap (with hashed keys) from your existing Secrets, for example `agctl migrate --apply virtualkeys-to-configmap -n {{< reuse "agw-docs/snippets/namespace.md" >}} | kubectl apply -f -`.
102+
98103
{{% reuse "agw-docs/snippets/review-table.md" %}}
99104

100105
| Setting | Description |
@@ -777,10 +782,8 @@ For more information on cost tracking, see the [cost tracking guide]({{< link-he
777782

778783
Provide different budget tiers for free, standard, and premium users.
779784

780-
1. Add tier metadata to each API key.
781-
782-
{{< version exclude-if="1.3.x,1.2.x,1.1.x,1.0.x,2.2.x" >}}
783-
Store the keys in a ConfigMap, using the `keyHash` of each key. Generate each hash with `printf '%s' '<key>' | sha256sum | awk '{print "sha256:"$1}'`.
785+
{{< version exclude-if="1.3.x,1.2.x,1.1.x,1.0.x,2.2.x" >}}
786+
1. Add tier metadata to each API key. Store the keys in a ConfigMap, using the `keyHash` of each key. Generate each hash with `printf '%s' '<key>' | sha256sum | awk '{print "sha256:"$1}'`.
784787

785788
```yaml
786789
apiVersion: v1
@@ -808,9 +811,10 @@ Provide different budget tiers for free, standard, and premium users.
808811
}
809812
}
810813
```
811-
{{< /version >}}
814+
{{< /version >}}
815+
{{< version include-if="1.3.x,1.2.x,1.1.x,1.0.x,2.2.x" >}}
816+
1. Add tier metadata to each API key. Store the keys in a Secret, with one entry per user.
812817
813-
{{< version include-if="1.3.x,1.2.x,1.1.x,1.0.x,2.2.x" >}}
814818
```yaml
815819
apiVersion: v1
816820
kind: Secret
@@ -836,7 +840,7 @@ Provide different budget tiers for free, standard, and premium users.
836840
}
837841
}
838842
```
839-
{{< /version >}}
843+
{{< /version >}}
840844
841845
2. Configure rate limiting to use the tier and user_id from API key metadata.
842846
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
**MCP Apps** (the `io.modelcontextprotocol/ui` extension) let MCP tools return interactive user-interface (UI) resources that an MCP host can render, rather than plain text. A tool can return a UI resource identified by a `ui://` URI, and the host displays it to the user. Agentgateway supports MCP Apps automatically, including when you federate multiple MCP servers.
2+
3+
## How agentgateway handles MCP Apps
4+
5+
You do not need to configure anything to use MCP Apps through agentgateway. UI resources pass through the gateway like any other MCP resource, with two behaviors worth knowing about:
6+
7+
- **Multiplexing**: When you federate multiple MCP servers into one endpoint, agentgateway rewrites the `ui://` resource URIs so that they still route to the correct upstream target while remaining valid `ui://` URIs that hosts can render. For more information, see the {{< conditional-text include-if="standalone" >}}[Virtual MCP]({{< link-hextra path="/mcp/connect/virtual" >}}){{< /conditional-text >}}{{< conditional-text include-if="kubernetes" >}}[Virtual MCP]({{< link-hextra path="/mcp/virtual" >}}){{< /conditional-text >}} guide.
8+
- **Authorization**: Any authorization rules that you configure also apply to UI resources. If a rule denies access to a UI resource, agentgateway does not advertise it to the client. For more information, see {{< conditional-text include-if="standalone" >}}[MCP authorization]({{< link-hextra path="/mcp/mcp-authz" >}}){{< /conditional-text >}}{{< conditional-text include-if="kubernetes" >}}[Tool access]({{< link-hextra path="/mcp/tool-access" >}}){{< /conditional-text >}}.
9+
10+
## MCP Apps and tool name prefixing
11+
12+
MCP Apps can call tools from within the rendered UI. By default, agentgateway prefixes tool names with the target name when you federate multiple MCP servers, which can interfere with app-originated tool calls that use the tool's plain name. To expose unprefixed tool names, adjust the tool name prefixing behavior on the MCP backend. For more information, see the {{< conditional-text include-if="standalone" >}}[Virtual MCP]({{< link-hextra path="/mcp/connect/virtual#tool-name-prefixing" >}}){{< /conditional-text >}}{{< conditional-text include-if="kubernetes" >}}[Virtual MCP]({{< link-hextra path="/mcp/virtual" >}}){{< /conditional-text >}} guide.

assets/agw-docs/pages/agentgateway/mcp/multiplex.md

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -155,20 +155,34 @@ EOF
155155
EOF
156156
```
157157

158-
{{< callout type="info" >}}
159-
**Failure mode**: By default, agentgateway uses `FailClosed` behavior, which means that if any MCP target fails to initialize or becomes unavailable during a fanout, the entire session fails. To allow the gateway to skip failed targets and continue serving from the healthy ones, set the `failureMode` field to `FailOpen` on the {{< reuse "agw-docs/snippets/backend.md" >}}:
160-
161-
```yaml
162-
163-
spec:
164-
mcp:
165-
failureMode: FailOpen
166-
targets:
167-
...
168-
```
169-
170-
With `FailOpen`, if one MCP server is down, the gateway still serves tools from the remaining healthy servers. If all targets fail, the gateway returns an error.
171-
{{< /callout >}}
158+
> [!NOTE]
159+
> **Failure mode**: By default, agentgateway uses `FailClosed` behavior, which means that if any MCP target fails to initialize or becomes unavailable during a fanout, the entire session fails. To allow the gateway to skip failed targets and continue serving from the healthy ones, set the `failureMode` field to `FailOpen` on the {{< reuse "agw-docs/snippets/backend.md" >}}:
160+
>
161+
> ```yaml
162+
>
163+
> spec:
164+
> mcp:
165+
> failureMode: FailOpen
166+
> targets:
167+
> ...
168+
> ```
169+
>
170+
> With `FailOpen`, if one MCP server is down, the gateway still serves tools from the remaining healthy servers. If all targets fail, the gateway returns an error.
171+
172+
> [!NOTE]
173+
> **Tool name prefixing**: When multiplexing, agentgateway namespaces tool and prompt names with the target name so that identical names from different servers do not collide. Resource URIs always retain target routing information and are unaffected. Control this behavior with the `prefixMode` field on the {{< reuse "agw-docs/snippets/backend.md" >}}:
174+
>
175+
> * `Conditional` (default): Prefix names only when the backend has more than one target.
176+
> * `Always`: Always prefix names, even with a single target.
177+
> * `Never`: Never prefix names. Calls are routed by looking up which target serves the name, so names must be unique across all targets. Use this mode when clients need plain tool names, such as for [MCP Apps]({{< link-hextra path="/mcp/apps" >}}).
178+
>
179+
> ```yaml
180+
> spec:
181+
> mcp:
182+
> prefixMode: Never
183+
> targets:
184+
> ...
185+
> ```
172186
173187
## Step 2: Route with agentgateway {#agentgateway}
174188
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
Agentgateway supports MCP servers and clients across MCP specification versions and translates between them automatically. In most cases, you do not need to change your existing MCP servers or clients immediately to adopt the newer specification.
2+
3+
## Supported specification versions
4+
5+
Agentgateway supports MCP protocol versions as described in [Version support]({{< link-hextra path="/reference/versions/" >}}). Earlier versions are automatically negotiated as described later and typically work, but are not guaranteed.
6+
7+
### 2026-07-28 support
8+
9+
The `2026-07-28` revision changes how MCP works at its core. MCP becomes stateless and sessionless. Instead of a stateful `initialize` handshake and an `Mcp-Session-Id` for the lifetime of a session, a modern client discovers server capabilities with a `server/discover` request and carries the required context in each request's `_meta`.
10+
11+
The sessionless protocol is the recommended direction for MCP going forward, and agentgateway supports it by default. Older, session-based clients and servers remain supported, so a mix of older and newer clients and servers can coexist behind the same gateway.
12+
13+
## Automatic version negotiation
14+
15+
Agentgateway sits between a downstream client and one or more upstream MCP servers, and negotiates the protocol version for you.
16+
17+
- **Newer client to newer server**: The `server/discover` request is forwarded and answered directly. This is the optimal path, with no fallback requests.
18+
- **Newer client to older server**: The older server rejects the modern request, and the client falls back to the older `initialize` flow. Agentgateway handles the fallback transparently. Make sure that your client can handle the older flow gracefully.
19+
- **Older client to newer server**: The client uses the older `initialize` flow, which agentgateway continues to support.
20+
21+
When you federate multiple MCP servers into one endpoint, agentgateway takes the **intersection** of the protocol versions that the targets support, so the client only negotiates a version that every target can serve. For more information, see the {{< conditional-text include-if="standalone" >}}[Virtual MCP]({{< link-hextra path="/mcp/connect/virtual" >}}){{< /conditional-text >}}{{< conditional-text include-if="kubernetes" >}}[Virtual MCP]({{< link-hextra path="/mcp/virtual" >}}){{< /conditional-text >}} guide.
22+
23+
> [!NOTE]
24+
> Because most environments run a mix of MCP versions for the foreseeable future, this compatibility handling is on by default and requires no configuration. You do not need to upgrade all of your MCP servers to the newer specification at once.
25+
26+
## Response caching
27+
28+
The `2026-07-28` revision adds caching controls to responses such as `server/discover` and `tools/list`. Because agentgateway can apply policies (such as authorization, external authentication, or external processing) that make a response specific to an individual request, it cannot safely tell clients that a proxied response is cacheable. To guarantee correct behavior, agentgateway disables caching on the responses that it proxies.
29+
30+
## What you can still configure
31+
32+
Version negotiation, sessionless protocol support, and [MCP Apps]({{< link-hextra path="/mcp/apps" >}}) all work automatically.
33+
34+
The MCP behavior that you can tune includes:
35+
36+
- {{< conditional-text include-if="standalone" >}}[Session handling]({{< link-hextra path="/mcp/connect/http#stateless-sessions" >}}) (`statefulMode`) for how agentgateway proxies session-based servers.{{< /conditional-text >}}{{< conditional-text include-if="kubernetes" >}}[Session routing]({{< link-hextra path="/mcp/session" >}}) (`sessionRouting`) for how agentgateway proxies session-based servers.{{< /conditional-text >}}
37+
- Tool name prefixing when federating multiple MCP servers: {{< conditional-text include-if="standalone" >}}[Virtual MCP]({{< link-hextra path="/mcp/connect/virtual" >}}).{{< /conditional-text >}}{{< conditional-text include-if="kubernetes" >}}[Virtual MCP]({{< link-hextra path="/mcp/virtual" >}}).{{< /conditional-text >}}

assets/agw-docs/pages/landing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
**New to agentgateway?** Get started in minutes with the [Quickstart guide]({{< link-hextra path="/quickstart/" >}})!
55
{{< /callout >}}
66

7-
{{< reuse-image src="img/architecture.svg" caption="Figure: agentgateway works across compute environments to provide connectivity to various agentic tools, including MCP servers, agents, and OpenAPI endpoints." >}}
7+
{{< reuse-image src="img/architecture.svg" srcDark="img/architecture-dark.svg" caption="Figure: agentgateway works across compute environments to provide connectivity to various agentic tools, including MCP servers, agents, and OpenAPI endpoints." >}}
88

99
## Why agentgateway?
1010

0 commit comments

Comments
 (0)