Skip to content
✨ agentgateway has joined the Agentic AI Foundation (AAIF) — Learn more · @agentgateway

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

Debug your setup

Debug your agentgateway environment.

Inspect and troubleshoot agentgateway proxies through the admin endpoints and the agctl command-line tool.

Admin endpoints

Each agentgateway pod runs an admin server on port 15000. The admin server provides the following endpoints for inspection and debugging.

EndpointDescription
/config_dumpReturns the runtime configuration that the proxy has loaded, including binds, listeners, routes, backends, workloads, services, and policies.
/debug/traceStreams a JSON-over-SSE trace of the next request that the proxy handles. The agctl trace command consumes this endpoint.
/loggingGet and set the logging level at runtime.
/memoryDump allocator and process memory statistics.
/debug/pprof/profileBuild a CPU profile by using the pprof profiler. Use ?seconds=N to set the duration (1–300s, default 10s).
/debug/pprof/heapCollect heap profiling data.
/debug/tasksInspect the live tokio task tree.
/quitquitquitTrigger a graceful shutdown of the proxy.

To inspect the configuration that a gateway proxy has loaded and to capture per-request traces, use the agctl command-line tool. agctl resolves the proxy pod for you, opens a port-forward, and renders the admin output in formats that are easier to scan than raw JSON.

Before you begin

Install agctl.

Check the gateway, route, and policy status

Most routing and policy issues surface in the status of the corresponding Kubernetes resource. Check these first.

  1. Verify that the agentgateway control plane and proxy pods are running.

    kubectl get pods -n <namespace>
  2. Verify the Gateway is Accepted and Programmed.

    kubectl get gateway -A
    kubectl get gateway <name> -n <namespace> -o yaml
  3. Check the HTTPRoute for Accepted and ResolvedRefs conditions.

    kubectl get httproute -A
    kubectl get httproute <name> -n <namespace> -o yaml

    Common issues to check for:

    • The wrong backend is selected.
    • The wrong parent Gateway is referenced.
    • Multiple HTTPRoutes conflict by having identical matchers or by having no matchers (and so default to /).

Inspect the loaded configuration

Sometimes a route is Accepted but the proxy still does not behave as expected. To see what the proxy actually loaded, dump its runtime configuration.

  1. Render a summary of the routes, backends, and policies that the gateway has loaded.

    agctl config all gateway/<gateway-name> -n <namespace> -o yaml
  2. Inspect the backends that the gateway is sending traffic to and their endpoint health.

    agctl config backends gateway/<gateway-name> -n <namespace>

    Example output:

    TYPE     NAME       NAMESPACE            ENDPOINT                    HEALTH  REQUESTS  LATENCY
    Backend  openai     agentgateway-system  backend                     1.00    1         4682.37ms
    Service  ext-authz  backend-extauth      ext-authz-7c7596b5f6-tvs28  0.70    4         0.00ms
    Service  httpbin    backend-extauth      httpbin-7dc88b5fbc-zqrfn    1.00    2         3.06ms

For complete steps, see Inspect agentgateway configuration.

Trace requests

To see how a specific request flows through agentgateway, use agctl trace. The trace shows you the route that was selected, the policies that were applied, the backend that was chosen, and the response status. Tracing helps you understand why a request did or did not match a route, why a policy was or was not applied, or why a request returned an unexpected status.

agctl trace gateway/<gateway-name> -n <namespace> --port <listener-port> -- http://<host>/<path>

agctl opens a port-forward to the proxy pod, captures the trace, sends the request, and renders the result in a text-based terminal user interface (TUI). Use --raw to print JSON Lines instead.

For complete steps, see Trace requests with agctl.

Enable debug logs

Agentgateway uses the same level syntax as RUST_LOG: error, warn, info, debug, and trace. You can change the level at runtime through the proxy’s admin endpoint.

  1. Open a port-forward to the proxy.

    kubectl port-forward deploy/<gateway-name> -n <namespace> 15000 &
  2. Set the log level.

    curl -X POST "http://localhost:15000/logging?level=debug"

    Example output:

    current log level is typespec_client_core::http::policies::logging=warn,hickory_server::server::server_future=off,rmcp=warn,debug
  3. Tail the proxy logs.

    kubectl logs -n <namespace> deploy/<gateway-name> -f

You can also set fine-grained levels per module by using the same RUST_LOG filter syntax, such as info,proxy::httpproxy=trace.

Capture profiles

Agentgateway includes pprof endpoints to help you investigate CPU and memory issues.

  1. Optional: If you have not already, download Graphviz to visualize the profiles.

  2. Open a port-forward to the proxy.

    kubectl port-forward deploy/<gateway-name> -n <namespace> 15000 &
  3. Capture a CPU profile. The default duration is 10 seconds; the example uses 30 seconds.

    curl -o cpu.pprof "http://localhost:15000/debug/pprof/profile?seconds=30"
  4. Capture a heap profile.

    curl -o heap.pprof http://localhost:15000/debug/pprof/heap
  5. Inspect the profiles with go tool pprof.

    CPU profile

    go tool pprof -http=: cpu.pprof

    Heap profile

    go tool pprof -http=: heap.pprof

    Graphviz opens on your web browser to a UI on localhost. Example:

    Heap profile graph
    Heap profile graph

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/.