Deploy the binary
To run agentgateway as a standalone binary, follow the steps to download, install, and configure the binary on your local machine or server.
Install the binary
Step 1: Download and install
Download and install the agentgateway binary. Alternatively, you can manually download the binary from the agentgateway releases page.
curl -sL https://agentgateway.dev/install | bashExample output:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8878 100 8878 0 0 68998 0 --:--:-- --:--:-- --:--:-- 69359
Downloading https://github.com/agentgateway/agentgateway/releases/download/v0.4.16/agentgateway-darwin-arm64
Verifying checksum... Done.
Preparing to install agentgateway into /usr/local/bin
Password:
agentgateway installed into /usr/local/bin/agentgatewayStep 2: Verify the installation
Verify that the agentgateway binary is installed.
agentgateway --versionExample output with the latest version, 0.12.0:
{
"version": "0.12.0",
"git_revision": "90f7b25855fb5f5fbefcc16855206040cba9b77d",
"rust_version": "1.89.0",
"build_profile": "release",
"build_target": "x86_64-unknown-linux-musl"
}Step 3: Create a configuration file
Create a configuration file for agentgateway. In this example, config.yaml is used. You might start with this simple example configuration file.
# yaml-language-server: $schema=https://agentgateway.dev/schema/config
binds:
- port: 3000
listeners:
- routes:
- policies:
cors:
allowOrigins:
- "*"
allowHeaders:
- mcp-protocol-version
- content-type
- cache-control
exposeHeaders:
- "Mcp-Session-Id"
backends:
- mcp:
targets:
- name: everything
stdio:
cmd: npx
args: ["@modelcontextprotocol/server-everything"]Step 4: Run agentgateway
agentgateway -f config.yamlExample output:
info state_manager loaded config from File("config.yaml")
info app serving UI at http://localhost:15000/ui
info proxy::gateway started bind bind="bind/3000"