For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
Binary
Install and run agentgateway as a standalone binary on your system.
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
Download and install
Download and install the agentgateway binary. Alternatively, you can manually download the binary from the agentgateway releases page.
To install the latest release:
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/v1.5.0/agentgateway-darwin-arm64
Verifying checksum... Done.
Preparing to install agentgateway into /usr/local/bin
Password:
agentgateway installed into /usr/local/bin/agentgateway
Verify the installation
Verify that the agentgateway binary is installed.
agentgateway --versionExample output with the latest release, 1.5.0:
{
"version": "1.5.0",
"git_revision": "90f7b25855fb5f5fbefcc16855206040cba9b77d",
"rust_version": "1.89.0",
"build_profile": "release",
"build_target": "x86_64-unknown-linux-musl"
}Run agentgateway
Run the binary with no arguments to start agentgateway with a generated configuration file.
agentgatewayAgentgateway creates a config.yaml file in your user config directory, which is $XDG_CONFIG_HOME/agentgateway if that variable is set and ~/.config/agentgateway otherwise. The generated file configures a default gateway on port 4000, attaches the UI to that gateway, and points agentgateway at a SQLite database in the same directory. The database powers the Analytics and Logs pages in the UI, and the other features that record data while agentgateway runs. For more information, see Database.
# yaml-language-server: $schema=https://agentgateway.dev/schema/config
config:
database:
url: sqlite:///home/example/.config/agentgateway/data.db
gateways:
default:
port: 4000
ui:
gateways: defaultAgentgateway does not overwrite an existing file, so a later run reuses the configuration from the first one.
To run a configuration file of your own instead, pass it with the -f option. For a runnable starting point, try this example configuration file. Agentgateway watches the file and reloads it when you change it, so you do not need to restart the process to change a route or a policy. For more information, see Update your configuration.
Note that agentgateway does not add a database to a file that you supply. To use the Analytics and Logs pages with your own file, add the config.database field yourself. For more information, see Database.
agentgateway -f config.yamlOpen the UI
The agentgateway UI is a built-in web interface that runs alongside the proxy. Use it to review the configuration that agentgateway loaded and to manage your gateways, routes, LLM providers, and MCP servers without restarting the process.
Where agentgateway serves the UI depends on which of the two previous commands you ran.
- Generated configuration: The generated file attaches the UI to the
defaultgateway, so the UI is served at http://localhost:4000/ui. - Your own configuration file: A file that has no
uisection serves the UI only on the admin interface, which defaults to http://localhost:15000/ui and is reachable only from this host. Add auisection that lists a gateway to serve the UI on a gateway port.
For more information, see Launch the UI.
Next steps
- Set up the UI to open, expose, and secure the web interface.
- Set up a database for the Analytics and Logs pages, and for API key budgets.
- Choose where configuration is stored.
- Update your configuration after agentgateway is running.
- Upgrade agentgateway to a new version.