Skip to main content
The binds array is the top-level configuration that defines which TCP ports agentgateway listens on. Each bind maps a port number to one or more listeners, which in turn contain routes and backends.
Every valid agentgateway configuration must have at least one bind with at least one listener.

Structure

The hierarchy flows as: bind (port)listenersroutesbackends.

Fields

array
required
Array of bind configurations. Each entry opens a listening TCP socket on the specified port.
number
required
The TCP port to listen on. agentgateway binds to 0.0.0.0 on this port, accepting connections on all available network interfaces.Common values: 3000 (development), 8080 (HTTP proxy), 8443 (HTTPS proxy).
array
required
Array of listener configurations attached to this port. Each listener can match traffic by hostname or protocol and apply a distinct set of routes.See Listeners for the full field reference.

Examples

Single port, single listener

The minimal configuration — one port, one listener, and one route.
basic/config.yaml

Multiple ports

Serve different protocols on separate ports by defining multiple binds.
multi-port

Multiple listeners on one port

Multiple listeners on the same port can route traffic by hostname.
vhost

How binds map to network interfaces

agentgateway listens on all available network interfaces (0.0.0.0) for the configured port. To restrict to a specific interface, use a network policy at the operating system level or deploy agentgateway behind a load balancer that restricts source addresses. Each bind is independent. Opening port 3000 and port 8080 creates two separate TCP listeners. Connections on port 3000 are never mixed with connections on port 8080.
For IPv6 support, set config.enableIpv6: true in the static configuration. When enabled, agentgateway also binds to [::] in addition to 0.0.0.0.