Configuration

Runtime branding, feature flags, agent endpoint, and environment overrides for template-ui without rebuilding.

template-ui supports runtime configuration through config/ui/settings.yaml and environment variables. Most branding and agent-endpoint changes apply without a rebuild.

Configuration sources

SourcePurposePrecedence
config/ui/settings.yamlBranding, features, agent endpoint, security defaultsBase
Environment variablesOverrides for deployment (OpenShift Secrets, .env)Higher
Built-in defaultsUsed when settings.yaml is absentFallback

Agent endpoint resolution:

config/ui/settings.yaml → agent.endpoint
        ↓ (if empty)
AGENT_HOST or AGENT_ENDPOINT env var
        ↓ (if empty)
http://localhost:5002

settings.yaml structure

config/ui/settings.yaml is optional. Copy an example to get started:

# Local development (auth off, debug panel on)
cp config/ui/examples/minimal.yaml config/ui/settings.yaml

# Red Hat branding
cp config/ui/examples/red-hat-branding.yaml config/ui/settings.yaml

# Production-hardened (OPA enabled)
cp config/ui/examples/production.yaml config/ui/settings.yaml

Branding

branding:
  title: "My Custom Agent"
  logo_url: "/custom-logo.svg"
  favicon_url: "/custom-favicon.ico"
  colors:
    light:
      primary: "#0066cc"
      accent: "#a60000"
      background: "#ffffff"
      foreground: "#1a1a1a"
    dark:
      primary: "#4dabf7"
      accent: "#f56e6e"
      background: "#0a1628"
      foreground: "#f0f4f8"

Place custom assets in public/ and reference them by URL path.

Features

features:
  debug_mode_default: false
  auth_enabled: true

Set auth_enabled: false for local development without SSO. Maps to FEATURE_AUTH_ENABLED env override.

Agent connection

agent:
  endpoint: ""
  timeout_ms: 30000
  streaming: true

Leave endpoint empty to use AGENT_HOST from .env (default http://localhost:5002).

Environment variable overrides

Environment variables take precedence over YAML:

BRANDING_TITLE="Production Agent"
BRANDING_LOGO_URL="/prod-logo.svg"
FEATURE_AUTH_ENABLED=true
AGENT_ENDPOINT=https://prod-agent.example.com

Common variables (see env.template for the full list):

VariableDescription
PORTServer port (default 8080)
ENVIRONMENTdevelopment | production | test
AUTH_ENABLEDEnable SSO authentication
AGENT_HOSTtemplate-agent URL
COOKIE_SIGNSession cookie signing secret (32+ chars)
SSO_CLIENT_ID / SSO_CLIENT_SECRETOIDC credentials
SSO_ISSUER_HOSTOIDC issuer URL
SSO_CALLBACK_URLOAuth redirect URI

Hot-reload behavior

CategoryHot-reload?
Branding (title, logo, colors)Yes
agent.endpoint, agent.timeout_msYes
Security (rate_limit, session, helmet)No — requires restart

The config watcher logs which category changed when you edit settings.yaml during development.

Validation

Invalid configuration fails at startup with a clear error:

Config validation error: branding.colors.light.primary must be a valid hex color (got 'not-a-color')

OPA compliance policies

Production deployments can enforce UI compliance rules with Open Policy Agent:

config/compliance/
├── policy.rego    # Deny rules (package compliance.ui)
├── data.json      # Static data for policies
└── README.md      # Policy authoring guide

See the repository’s config/compliance/README.md for built-in rules and testing with opa eval.

BFF proxy behavior

The Fastify server in src/server/router/proxy.router.ts proxies LangGraph SSE from template-agent and translates events for React components:

  • Subagent indicators and task rewriting
  • HITL interrupt banners
  • Todo/task progress and sidebar
  • Artifact viewer payloads
  • MCP connection status
  • Intermediate streaming responses

The frontend does not implement agent logic—it renders events from the BFF.

Next Steps