Skip to main content
A consumer is the runtime identity of a calling application. It holds credentials and routing configuration. Its slug is the first path segment on the proxy URL shown in the Connect tab. Each consumer belongs to one gateway and has a type:

Consumers list

Open Agent GatewayConsumers.

Create a consumer

  1. Open ConsumersNew Consumer.
  2. Work through the create tabs:
    • GeneralName, Protocol (LLM or MCP), optional initial target registry.
    • Auth — method + entity (see below). Copy API keys when shown (once only).
    • Routing — mode + strategy + registries/models (or MCP target).
    • Policies — optional Add Policy or Clone policies from another consumer.
  3. Save. The success step and the detail Connect tab show ready-to-use snippets.

Detail tabs

Routing mode

Strategies (Static routing)

Load-balancing strategies (including smart routing) are grouped under Load balancing in the Strategy dropdown; Simple routing and Fallback under Direct. MCP consumers always bind registries/tools directly — they do not show the Strategy selector or load-balancing algorithms.

Providers editor

For simple routing and non-smart load balancing, use Add Registry, set optional weight (weighted strategy), choose all models/tools or restrict via the model browser, and set a default model when needed.

Smart routing

Use Complexity tiers (at least two): Simple / Medium / Hard, each with a registry and model. Same registry can appear on multiple tiers with different models. Details: Load balancing, Smart routing, Model resolution, Fallback.

Model policies

For each bound registry you can:
  • Allow all models, or filter to a subset.
  • Set a default model used when the client does not name one.
When the consumer uses load balancing or smart routing, Connect snippets use "model": "auto" so the gateway picks the registry and model. With multiple registries and no load balancing, clients must specify the model themselves.

Connect tab

Open a consumer → Connect for:
  • Gateway host (SaaS or your Private LLM URL)
  • Consumer slug
  • Auth header examples (X-AG-API-Key, and X-AG-Gateway-Slug on Private)
  • Language snippets (cURL, Python, Node, …)
  • Same host and key for embeddings, images, files, rerank, and models
The provider credential remains in TrustGate. Keep the consumer API key secret.

Edit routing later

Open the consumer → Routing to change strategy, registries, smart-routing tiers, fallback chain, or identity-based roles without recreating the consumer.