Skip to content

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Page as Markdown

Install agctl

Install the agctl command-line tool for inspecting and debugging agentgateway.

This feature is experimental. Try it out, see how it helps, and provide us feedback in GitHub or Discord. But keep in mind that it is subject to change and not supported for production.

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.

CommandDescription
agctl traceCapture 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 configRetrieve the runtime configuration that an agentgateway proxy has loaded, including binds, listeners, routes, backends, workloads, and services.
agctl completionTurn 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

  1. Clone the agentgateway repository.

    git clone https://github.com/agentgateway/agentgateway.git
    cd agentgateway
  2. Build and install agctl to your GOBIN directory.

    go install ./controller/cmd/agctl

    By default, go install places the binary in $(go env GOBIN), or in $(go env GOPATH)/bin if GOBIN is unset. Make sure that this directory is on your PATH.

    export PATH="$(go env GOPATH)/bin:$PATH"
  3. Verify the install.

    agctl --help

    Example 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/_agctl

Add the directory to $fpath and load completion in your ~/.zshrc.

fpath=(~/.zsh/completions $fpath)
autoload -U compinit && compinit

Upgrade agctl

To upgrade agctl to a newer version, pull the latest changes and rebuild.

cd agentgateway
git pull
go install ./controller/cmd/agctl

Verify the new version.

agctl --help
Use the same agctl 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"
Was this page helpful?
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.