For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.
Install agctl
Install the agctl command-line tool for inspecting and debugging agentgateway.
Install agctl, the command-line tool that you use to inspect and debug agentgateway.
About
agctl is the agentgateway command-line interface. Use agctl to inspect the configuration that an agentgateway proxy has loaded and to capture detailed traces of requests as the proxy handles them. The CLI works against agentgateway running in Kubernetes or as a standalone binary on your workstation.
agctl includes the following subcommands.
| Command | Description |
|---|---|
agctl trace | Capture a tap-style trace to analyze a copy of the next request that an agentgateway proxy handles. Renders the trace in an interactive, text-based terminal user interface (TUI) by default. Alternatively, you can format the output as JSON for piping to other tools. |
agctl config | Retrieve the runtime configuration that an agentgateway proxy has loaded, including binds, listeners, routes, backends, workloads, and services. |
agctl completion | Turn on autocompletion for your shell in bash, zsh, fish, or powershell. |
For a complete list of subcommands and flags, see the agctl CLI reference.
Before you begin
Build agctl from source. Make sure that you have the following tools installed.
Install agctl
Clone the agentgateway repository.
git clone https://github.com/agentgateway/agentgateway.git cd agentgatewayBuild and install
agctlto yourGOBINdirectory.go install ./controller/cmd/agctlBy default,
go installplaces the binary in$(go env GOBIN), or in$(go env GOPATH)/binifGOBINis unset. Make sure that this directory is on yourPATH.export PATH="$(go env GOPATH)/bin:$PATH"Verify the install.
agctl --helpExample output:
agctl controls and inspects Agentgateway resources Usage: agctl [command] Available Commands: completion Generate the autocompletion script for the specified shell config Retrieve Agentgateway configuration for a resource help Help about any command trace Trace the next request handled by an Agentgateway pod or local instance Flags: -h, --help help for agctl -k, --kubeconfig string kubeconfig
Enable shell completion
agctl ships with an autocompletion script for bash, zsh, fish, and powershell. Source the script for your shell to get tab-completion of subcommands, flags, and resource names.
Add the completion script to a directory on your $fpath. The following example creates one and writes the script to it.
mkdir -p ~/.zsh/completions
agctl completion zsh > ~/.zsh/completions/_agctlAdd the directory to $fpath and load completion in your ~/.zshrc.
fpath=(~/.zsh/completions $fpath)
autoload -U compinit && compinitUpgrade agctl
To upgrade agctl to a newer version, pull the latest changes and rebuild.
cd agentgateway
git pull
go install ./controller/cmd/agctlVerify the new version.
agctl --helpagctl version as the agentgateway version that you run in your cluster. Slight skews within minor versions typically work, but compatibility across major versions is not guaranteed.Uninstall agctl
To uninstall agctl, remove the binary from your GOBIN directory.
rm "$(go env GOPATH)/bin/agctl"