Configuration Reference

The following is a complete reference of the plano_config.yml that controls the behavior of a single instance of the Plano gateway. This where you enable capabilities like routing to upstream LLm providers, defining prompt_targets where prompts get routed to, apply guardrails, and enable critical agent observability features.

  1# Plano Gateway configuration version
  2version: v0.3.0
  3
  4# External HTTP agents - API type is controlled by request path (/v1/responses, /v1/messages, /v1/chat/completions)
  5agents:
  6  - id: weather_agent # Example agent for weather
  7    url: http://localhost:10510
  8
  9  - id: flight_agent # Example agent for flights
 10    url: http://localhost:10520
 11
 12# MCP filters applied to requests/responses (e.g., input validation, query rewriting)
 13filters:
 14  - id: input_guards # Example filter for input validation
 15    url: http://localhost:10500
 16    # type: mcp (default)
 17    # transport: streamable-http (default)
 18    # tool: input_guards (default - same as filter id)
 19
 20# LLM provider configurations with API keys and model routing
 21model_providers:
 22  - model: openai/gpt-4o
 23    access_key: $OPENAI_API_KEY
 24    default: true
 25
 26  - model: openai/gpt-4o-mini
 27    access_key: $OPENAI_API_KEY
 28
 29  - model: anthropic/claude-sonnet-4-0
 30    access_key: $ANTHROPIC_API_KEY
 31
 32  - model: mistral/ministral-3b-latest
 33    access_key: $MISTRAL_API_KEY
 34
 35  # routing_preferences: tags a model with named capabilities so Plano's LLM router
 36  # can select the best model for each request based on intent. Requires the
 37  # Arch-Router model (or equivalent) to be configured in overrides.llm_routing_model.
 38  # Each preference has a name (short label) and a description (used for intent matching).
 39  - model: groq/llama-3.3-70b-versatile
 40    access_key: $GROQ_API_KEY
 41    routing_preferences:
 42      - name: code generation
 43        description: generating new code snippets, functions, or boilerplate based on user prompts or requirements
 44      - name: code review
 45        description: reviewing, analyzing, and suggesting improvements to existing code
 46
 47  # passthrough_auth: forwards the client's Authorization header upstream instead of
 48  # using the configured access_key. Useful for LiteLLM or similar proxy setups.
 49  - model: openai/gpt-4o-litellm
 50    base_url: https://litellm.example.com
 51    passthrough_auth: true
 52
 53  # Custom/self-hosted endpoint with explicit http_host override
 54  - model: openai/llama-3.3-70b
 55    base_url: https://api.custom-provider.com
 56    http_host: api.custom-provider.com
 57    access_key: $CUSTOM_API_KEY
 58
 59# Model aliases - use friendly names instead of full provider model names
 60model_aliases:
 61  fast-llm:
 62    target: gpt-4o-mini
 63
 64  smart-llm:
 65    target: gpt-4o
 66
 67# HTTP listeners - entry points for agent routing, prompt targets, and direct LLM access
 68listeners:
 69  # Agent listener for routing requests to multiple agents
 70  - type: agent
 71    name: travel_booking_service
 72    port: 8001
 73    router: plano_orchestrator_v1
 74    address: 0.0.0.0
 75    agents:
 76      - id: rag_agent
 77        description: virtual assistant for retrieval augmented generation tasks
 78        input_filters:
 79          - input_guards
 80
 81  # Model listener for direct LLM access
 82  - type: model
 83    name: model_1
 84    address: 0.0.0.0
 85    port: 12000
 86    timeout: 30s          # Request timeout (e.g. "30s", "60s")
 87    max_retries: 3        # Number of retries on upstream failure
 88    input_filters:        # Filters applied before forwarding to LLM
 89      - input_guards
 90    output_filters:       # Filters applied to LLM responses before returning to client
 91      - input_guards
 92
 93  # Prompt listener for function calling (for prompt_targets)
 94  - type: prompt
 95    name: prompt_function_listener
 96    address: 0.0.0.0
 97    port: 10000
 98
 99# Reusable service endpoints
100endpoints:
101  app_server:
102    endpoint: 127.0.0.1:80
103    connect_timeout: 0.005s
104    protocol: http        # http or https
105
106  mistral_local:
107    endpoint: 127.0.0.1:8001
108
109  secure_service:
110    endpoint: api.example.com:443
111    protocol: https
112    http_host: api.example.com  # Override the Host header sent upstream
113
114# Optional top-level system prompt applied to all prompt_targets
115system_prompt: |
116  You are a helpful assistant. Always respond concisely and accurately.
117
118# Prompt targets for function calling and API orchestration
119prompt_targets:
120  - name: get_current_weather
121    description: Get current weather at a location.
122    parameters:
123      - name: location
124        description: The location to get the weather for
125        required: true
126        type: string
127        format: City, State
128      - name: days
129        description: the number of days for the request
130        required: true
131        type: int
132    endpoint:
133      name: app_server
134      path: /weather
135      http_method: POST
136    # Per-target system prompt (overrides top-level system_prompt for this target)
137    system_prompt: You are a weather expert. Provide accurate and concise weather information.
138    # auto_llm_dispatch_on_response: when true, the LLM is called again with the
139    # function response to produce a final natural-language answer for the user
140    auto_llm_dispatch_on_response: true
141
142# Rate limits - control token usage per model and request selector
143ratelimits:
144  - model: openai/gpt-4o
145    selector:
146      key: x-user-id       # HTTP header key used to identify the rate-limit subject
147      value: "*"           # Wildcard matches any value; use a specific string to target one
148    limit:
149      tokens: 100000       # Maximum tokens allowed in the given time unit
150      unit: hour           # Time unit: "minute", "hour", or "day"
151
152  - model: openai/gpt-4o-mini
153    selector:
154      key: x-org-id
155      value: acme-corp
156    limit:
157      tokens: 500000
158      unit: day
159
160# Global behavior overrides
161overrides:
162  # Threshold for routing a request to a prompt_target (0.0–1.0). Lower = more permissive.
163  prompt_target_intent_matching_threshold: 0.7
164  # Trim conversation history to fit within the model's context window
165  optimize_context_window: true
166  # Use Plano's agent orchestrator for multi-agent request routing
167  use_agent_orchestrator: false
168  # Connect timeout for upstream provider clusters (e.g., "5s", "10s"). Default: "5s"
169  upstream_connect_timeout: 10s
170  # Path to the trusted CA bundle for upstream TLS verification
171  upstream_tls_ca_path: /etc/ssl/certs/ca-certificates.crt
172  # Model used for intent-based LLM routing (must be listed in model_providers)
173  llm_routing_model: Arch-Router
174  # Model used for agent orchestration (must be listed in model_providers)
175  agent_orchestration_model: Plano-Orchestrator
176
177# State storage for multi-turn conversation history
178state_storage:
179  type: memory            # "memory" (in-process) or "postgres" (persistent)
180  # connection_string is required when type is postgres.
181  # Supports environment variable substitution: $VAR or ${VAR}
182  # connection_string: postgresql://user:$DB_PASS@localhost:5432/plano
183
184# Input guardrails applied globally to all incoming requests
185prompt_guards:
186  input_guards:
187    jailbreak:
188      on_exception:
189        message: "I'm sorry, I can't help with that request."
190
191# OpenTelemetry tracing configuration
192tracing:
193  # Random sampling percentage (1-100)
194  random_sampling: 100
195  # Include internal Plano spans in traces
196  trace_arch_internal: false
197  # gRPC endpoint for OpenTelemetry collector (e.g., Jaeger, Tempo)
198  opentracing_grpc_endpoint: http://localhost:4317
199  span_attributes:
200    # Propagate request headers whose names start with these prefixes as span attributes
201    header_prefixes:
202      - x-user-
203      - x-org-
204    # Static key/value pairs added to every span
205    static:
206      environment: production
207      service.team: platform