Agent DocsDeveloper documentation
Reference

Configuration Reference

Environment variables, Docker, Kubernetes, and feature flags

Configuration Reference

This document covers every configurable knob in the Enterprise Agentic AI Platform: environment variables per service, Docker Compose service topology, Kubernetes Helm values, monorepo tooling, and feature flags.


Table of Contents

  1. Environment Variables
  2. Docker Compose
  3. Kubernetes / Helm
  4. Monorepo Configuration
  5. Feature Flags

Environment Variables

All backend services read configuration from environment variables. In local development, the API Gateway loads a .env file from the monorepo root via dotenv. In Docker Compose, variables are set in the environment: block of each service or loaded from an env_file.

API Gateway

The API Gateway (services/api-gateway) is the central backend process. It connects to every data store, orchestration system, and external service.

Core

VariableDescriptionDefaultRequired
PORTHTTP listen port4000No
NODE_ENVRuntime environment (development / production)developmentNo
CORS_ORIGINSComma-separated allowed CORS originshttp://localhost:3000,http://localhost:3001,http://localhost:3002No
API_PUBLIC_URLPublicly reachable base URL (used in upload links)http://localhost:4000No
NEXTAUTH_SECRETSecret for signing session tokensdev-secretYes (prod)
SECURE_COOKIESForce secure (HTTPS-only) cookies outside productionfalseNo

Data Stores

VariableDescriptionDefaultRequired
DATABASE_URLPostgreSQL connection stringNone (mock fallback)No
REDIS_URLRedis connection string (rate limiting, caching)None (rate limiting disabled)No
QDRANT_URLQdrant vector database URLNone (keyword fallback)No
NEO4J_URINeo4j Bolt protocol URINone (PostgreSQL fallback)No
NEO4J_USERNeo4j usernameneo4jNo
NEO4J_PASSWORDNeo4j passwordneo4j_passwordNo
KAFKA_BROKERSComma-separated Kafka broker addresseslocalhost:9092No

Orchestration

VariableDescriptionDefaultRequired
TEMPORAL_ADDRESSTemporal gRPC endpointNone (sync fallback)No
TEMPORAL_NAMESPACETemporal namespacedefaultNo
N8N_API_URLn8n API base URLhttp://localhost:5678No
N8N_API_KEYn8n API key for authenticated calls""No
N8N_EDITOR_URLPublic n8n editor URL (shown in UI)Same as N8N_API_URLNo
WS_INTERNAL_URLWebSocket server internal push endpointhttp://localhost:4101No

LLM Provider (T-Systems AIFS)

VariableDescriptionDefaultRequired
TSYSTEMS_AIFS_API_KEYAPI key for T-Systems AI Foundation ServicesNone (mock mode)Yes (prod)
TSYSTEMS_AIFS_BASE_URLAIFS base URLhttps://llm-server.llmhub.t-systems.net/v2No
DEFAULT_CHAT_MODELDefault chat/completion modelclaude-sonnet-4No
DEFAULT_EMBEDDING_MODELDefault embedding modeljina-embeddings-v2-base-codeNo
DEFAULT_LLM_MODELDefault model for external agentsgpt-4.1-miniNo
MOCK_MODEForce mock LLM responses even when API key is setfalseNo

Identity & Auth (Keycloak OIDC)

VariableDescriptionDefaultRequired
KEYCLOAK_URLInternal Keycloak base URLNoneYes (prod)
KEYCLOAK_REALMKeycloak realm nameagentic-platformNo
KEYCLOAK_JWKS_URLJWKS endpoint for RS256 JWT validationNoneYes (prod)
KEYCLOAK_ISSUERInternal JWT issuer (used for token validation)NoneYes (prod)
KEYCLOAK_EXTERNAL_ISSUERBrowser-facing issuer (may differ from internal)NoneNo
KEYCLOAK_PORTAL_CLIENT_SECRETPortal OAuth client secretportal-dev-secretNo
KEYCLOAK_STUDIO_CLIENT_SECRETStudio OAuth client secretstudio-dev-secretNo
KEYCLOAK_ADMIN_CLIENT_SECRETAdmin Console OAuth client secretadmin-console-dev-secretNo
AZURE_AD_CLIENT_IDAzure AD client ID (optional federated IdP)NoneNo
AZURE_AD_ISSUERAzure AD issuer URLNoneNo

Token Lifetimes

VariableDescriptionDefaultRequired
TOKEN_TTL_CONSUMERSession TTL for consumer role (seconds)28800 (8h)No
TOKEN_TTL_BUILDERSession TTL for builder role (seconds)14400 (4h)No
TOKEN_TTL_ADMINSession TTL for admin role (seconds)3600 (1h)No

Object Storage (S3 / MinIO)

VariableDescriptionDefaultRequired
S3_ENDPOINTS3-compatible endpoint URLNone (local fallback)No
S3_ACCESS_KEYS3 access keyminioadminNo
S3_SECRET_KEYS3 secret keyminioadminNo
S3_BUCKETS3 bucket nameagentic-uploadsNo
S3_REGIONS3 regionus-east-1No

Secrets Management (Vault)

VariableDescriptionDefaultRequired
VAULT_ADDRHashiCorp Vault URLNone (env fallback)No
VAULT_TOKENVault root/dev tokenNoneNo
VAULT_ROLE_IDVault AppRole role ID (production)NoneNo
VAULT_SECRET_IDVault AppRole secret ID (production)NoneNo
CREDENTIAL_ENCRYPTION_KEYHex-encoded AES key for credential encryptionNoneNo

Observability

VariableDescriptionDefaultRequired
OTEL_ENABLEDEnable OpenTelemetry tracingfalseNo
OTEL_EXPORTER_OTLP_ENDPOINTOTLP HTTP endpointhttp://localhost:4318No
OTEL_SERVICE_NAMEService name in tracesagentic-api-gatewayNo
LANGFUSE_ENABLEDEnable Langfuse LLM observabilityfalseNo
LANGFUSE_SECRET_KEYLangfuse server-side secret keyNoneWhen Langfuse enabled
LANGFUSE_PUBLIC_KEYLangfuse client-side public keyNoneWhen Langfuse enabled
LANGFUSE_HOSTLangfuse server URLhttp://localhost:3200No

Security & Signing

VariableDescriptionDefaultRequired
USER_CONTEXT_HMAC_SECRETHMAC secret for X-User-Context header integrityplatform-hmac-secret-change-in-prodYes (prod)
TOOL_SIGNATURE_ENFORCEMENTTool signature mode: disabled, warn, enforcewarnNo
TOOL_SIGNING_KEYHMAC key for tool signingdev-signing-keyYes (prod)
SIGSTORE_FULCIO_URLFulcio CA URL for Sigstore signingNoneNo
SIGSTORE_REKOR_URLRekor transparency log URLNoneNo
WEBHOOK_SECRETSecret for validating inbound webhooksNoneNo

SPIFFE / SPIRE

VariableDescriptionDefaultRequired
SPIRE_AGENT_SOCKETSPIRE agent workload API socket pathNoneNo
SPIFFE_TRUST_DOMAINSPIFFE trust domainagentic-platformNo
TRUST_AGENT_HEADERSTrust X-Agent-Id headers without SPIFFE prooffalseNo

Code Execution

VariableDescriptionDefaultRequired
CODE_EXEC_MODEExecution backend: local (child_process) or k8slocalNo
CODE_EXEC_MAX_OUTPUTMax stdout bytes from code execution65536 (64KB)No
CODE_EXEC_K8S_NAMESPACEKubernetes namespace for execution podsagents-procodeNo
CODE_EXEC_PYTHON_IMAGEContainer image for Python executionagentic-platform/python-sandbox:latestNo
CODE_EXEC_NODE_IMAGEContainer image for Node.js/TypeScript executionnode:22-slimNo
CODE_EXEC_BASH_IMAGEContainer image for Bash executionbash:5-alpine3.20No
K8S_NAMESPACEGeneral K8s namespace for agent podsagents-procodeNo
K8S_API_HOSTK8s API server host (used from Docker)host.docker.internalNo

External Agent URLs

VariableDescriptionDefaultRequired
RESEARCH_AGENT_URLResearch agent base URLhttp://localhost:8210No
RAW_PYTHON_AGENT_URLRaw Python agent base URLhttp://localhost:8300No
PYDANTIC_AI_AGENT_URLPydantic AI agent base URLhttp://localhost:8301No
CREWAI_AGENT_URLCrewAI agent base URLhttp://localhost:8302No
AUTOGEN_AGENT_URLAutoGen agent base URLhttp://localhost:8303No
DOCKER_HOST_OVERRIDEReplace localhost in URLs when running in DockerNoneNo

Frontend Applications (Portal, Studio, Admin)

All three Next.js apps share the same set of environment variables. Values differ only by OIDC client identity.

VariableDescriptionDefaultRequired
NEXT_PUBLIC_API_URLAPI Gateway URL visible to the browserhttp://localhost:4000No
NEXT_PUBLIC_N8N_EDITOR_URLn8n editor URL (Studio only)http://localhost:5678No
NEXT_PUBLIC_KEYCLOAK_URLKeycloak URL visible to the browserNoneYes (prod)
NEXT_PUBLIC_KEYCLOAK_REALMKeycloak realmNoneYes (prod)
NEXT_PUBLIC_KEYCLOAK_CLIENT_IDOIDC client ID (app-specific)NoneYes (prod)
API_URLServer-side API Gateway URL (SSR)http://api-gateway:4000No
WS_URLWebSocket server URLws://ws-server:4100No
NEXTAUTH_URLNextAuth.js canonical URLhttp://localhost:300xYes
KEYCLOAK_URLKeycloak internal URL (server-side)NoneYes (prod)
KEYCLOAK_REALMKeycloak realm (server-side)agentic-platformNo
KEYCLOAK_CLIENT_IDOIDC client ID (server-side)App-specificYes (prod)
KEYCLOAK_CLIENT_SECRETOIDC client secret (server-side)App-specific dev secretYes (prod)

OIDC Client IDs per app: Portal = portal, Studio = studio, Admin = admin-console.

WebSocket Server

The WebSocket server (services/ws-server) handles real-time push events.

VariableDescriptionDefaultRequired
WS_PORTPublic WebSocket port4100No
WS_INTERNAL_PORTInternal HTTP push port (API Gateway pushes here)4101No
WS_MOCK_EVENTSEmit synthetic demo eventstrueNo

n8n Bridge Sidecars

Four sidecar services form the n8n bridge layer, providing governance, memory, observability, and identity for n8n workflows.

Guardrails Proxy (port 8081)

VariableDescriptionDefaultRequired
PORTListen port8081No
UPSTREAM_LLM_URLUpstream LLM endpoint to proxy throughAIFS base URL or https://api.openai.com/v1No
UPSTREAM_LLM_API_KEYAPI key for upstream LLMFrom TSYSTEMS_AIFS_API_KEYYes

Memory Bridge (port 8082)

VariableDescriptionDefaultRequired
PORTListen port8082No
REDIS_URLRedis for short-term memoryNoneNo
QDRANT_URLQdrant for vector memoryNoneNo
NEO4J_URINeo4j for graph memoryNoneNo
NEO4J_USERNeo4j usernameneo4jNo
NEO4J_PASSWORDNeo4j passwordneo4j_passwordNo

OTel Exporter (port 8083)

VariableDescriptionDefaultRequired
PORTListen port8083No
N8N_API_URLn8n API to poll execution data fromhttp://n8n:5678No
N8N_API_KEYn8n API key""No
OTEL_EXPORTER_OTLP_ENDPOINTOTLP endpoint for traceshttp://jaeger:4318No
POLL_INTERVAL_MSPolling interval in milliseconds30000No

Identity Injector (ports 8084 / 8085)

VariableDescriptionDefaultRequired
PORTHTTP API port8084No
MCP_PROXY_PORTMCP proxy port (n8n MCP Client connects here)8085No
SPIRE_AGENT_SOCKETSPIRE agent socket pathNoneNo
SPIFFE_TRUST_DOMAINSPIFFE trust domainagentic-platformNo
MCP_GATEWAY_URLUpstream MCP Gateway URLhttp://api-gateway:4000/mcpNo
USER_CONTEXT_HMAC_SECRETHMAC secret (must match API Gateway)platform-hmac-secret-change-in-prodYes (prod)
DEV_MODEEnable dev mode bypass for SPIFFEtrueNo

Example External Agents

All example agents (Research, Raw Python, Pydantic AI, CrewAI, AutoGen) share the same LLM configuration pattern.

VariableDescriptionDefaultRequired
PORTAgent HTTP listen portAgent-specific (8210-8303)No
LLM_API_KEYLLM provider API keyFrom TSYSTEMS_AIFS_API_KEYYes
LLM_BASE_URLLLM provider base URLFrom TSYSTEMS_AIFS_BASE_URLNo
LLM_MODELModel nameFrom DEFAULT_LLM_MODEL or gpt-4.1-miniNo
MAX_ITERATIONSMax reasoning iterations (Research agent only)5No

Docker Compose

The docker-compose.yml at the repository root defines all services for local development. No Docker profiles are used; all services start together.

Service Map

ServiceImagePurpose
postgrespostgres:16-alpinePrimary relational store (shared by platform, n8n, Keycloak, Temporal)
redisredis:7-alpineShort-term memory, rate limiting, caching
qdrantqdrant/qdrant:latestVector database for embeddings and semantic search
neo4jneo4j:5-communityGraph database for entity relationships and graph memory
kafkaapache/kafka:latestDurable event bus (KRaft mode, no Zookeeper)
temporaltemporalio/auto-setup:latestWorkflow orchestration engine
temporal-uitemporalio/ui:latestTemporal web dashboard
n8ndocker.n8n.io/n8nio/n8n:latestLow-code workflow runtime
keycloakquay.io/keycloak/keycloak:26.0Bundled OIDC Identity Provider
jaegerjaegertracing/all-in-one:latestDistributed tracing (OTLP receiver)
vaulthashicorp/vault:1.18Secret management and transit encryption
langfuse-serverlangfuse/langfuse:2LLM observability and cost tracking
miniominio/minio:latestS3-compatible object storage
prometheusprom/prometheus:latestMetrics scraping and storage
alertmanagerprom/alertmanager:latestAlert routing from Prometheus rules
grafanagrafana/grafana:latestDashboard visualization
spire-serverghcr.io/spiffe/spire-server:1.9.6SPIFFE identity management
spire-agentCustom (Alpine + SPIRE)Workload attestation agent
api-gatewayCustom (Dockerfile)Platform backend API
ws-serverCustom (Dockerfile)Real-time WebSocket server
portalCustom (Dockerfile)Agent Portal frontend
studioCustom (Dockerfile)Agent Studio frontend
adminCustom (Dockerfile)Admin Console frontend
docsCustom (Dockerfile)Documentation site
guardrails-proxyCustom (Dockerfile)n8n LLM guardrails sidecar
memory-bridgeCustom (Dockerfile)n8n memory sidecar
otel-exporterCustom (Dockerfile)n8n observability sidecar
identity-injectorCustom (Dockerfile)n8n identity sidecar
python-sandboxCustom (Dockerfile)Pre-built sandbox image for code execution
research-agentCustom (Dockerfile)Example LangGraph research agent
raw-python-agentCustom (Dockerfile)Example raw Python agent
pydantic-ai-agentCustom (Dockerfile)Example Pydantic AI agent
crewai-agentCustom (Dockerfile)Example CrewAI agent
autogen-agentCustom (Dockerfile)Example AutoGen agent

Port Mappings

Host PortContainer PortServiceNotes
30003000PortalAgent Portal UI
30013001StudioAgent Studio UI
30023002AdminAdmin Console UI
30033003DocsDocumentation site
31003000GrafanaRemapped to avoid conflict with Portal
32003000LangfuseRemapped to avoid conflict with Portal/Grafana
40004000API GatewayBackend HTTP API
41004100WS ServerPublic WebSocket
54325432PostgreSQLDatabase
56785678n8nWorkflow editor and API
63336333QdrantHTTP API
63346334QdrantgRPC API
63796379Redis
72337233TemporalgRPC API
74747474Neo4jBrowser UI
76877687Neo4jBolt protocol
80808080Temporal UIWeb dashboard
80818081Guardrails Proxyn8n LLM sidecar
80828082Memory Bridgen8n memory sidecar
80838083OTel Exportern8n observability sidecar
80848084Identity Injectorn8n identity HTTP
80858085Identity InjectorMCP proxy port
81808080KeycloakRemapped to avoid conflict with Temporal UI
81818081SPIRE ServerRemapped to avoid conflict with guardrails-proxy
82008200VaultAPI and UI
82108210Research AgentExample agent
83008300Raw Python AgentExample agent
83018301Pydantic AI AgentExample agent
83028302CrewAI AgentExample agent
83038303AutoGen AgentExample agent
90109000MinIOS3 API (remapped)
90119001MinIOConsole UI (remapped)
90909090PrometheusQuery UI
90939093Alertmanager
1668616686JaegerTracing UI
43184318JaegerOTLP HTTP receiver
2909229092KafkaHost access via HOST listener

Volume Mounts

Named volumes persist data across container restarts:

VolumeMount PointService
postgres_data/var/lib/postgresql/dataPostgreSQL
qdrant_data/qdrant/storageQdrant
neo4j_data/dataNeo4j
kafka_data/var/kafka-dataKafka
n8n_data/home/node/.n8nn8n
keycloak_data/opt/keycloak/dataKeycloak
spire_data/opt/spire/dataSPIRE Server
spire_agent_socket/run/spire/socketsSPIRE Agent (shared with API Gateway)
spire_server_socket/tmp/spire-server/privateSPIRE Server (shared with Agent)
minio_data/dataMinIO
prometheus_data/prometheusPrometheus
grafana_data/var/lib/grafanaGrafana
vault_data/vault/dataVault

Host bind mounts (read-only):

  • ./infra/keycloak/agentic-platform-realm.json into Keycloak for realm import
  • ./infra/prometheus/prometheus.yml and alert-rules.yml into Prometheus
  • ./infra/grafana/provisioning and dashboards into Grafana
  • ./infra/spire/server.conf and agent.conf into SPIRE
  • /var/run/docker.sock into API Gateway (infrastructure metrics)
  • $HOME/.kube into API Gateway (Kubernetes API access for code execution)

Kubernetes / Helm

The Helm chart lives at infra/helm/agentic-platform/. The values.yaml file provides all defaults for a development deployment.

Namespace Layout

The platform uses four Kubernetes namespaces for isolation:

NamespacePurpose
platform-coreAPI Gateway, WS Server, Temporal, Keycloak, frontends
agents-procodePro-Code agent execution pods, sandbox containers
agents-n8nn8n runtime and its four sidecars
dataPostgreSQL, Redis, Qdrant, Neo4j, Kafka, MinIO

Resource Limits

Platform Services

ServiceCPU RequestCPU LimitMemory RequestMemory LimitHPA
API Gateway250m1512Mi1Gi1-10 replicas, 70% CPU
WS Server100m500m256Mi512Mi1-5 replicas, 70% CPU
Portal100m500m256Mi512Mi--
Studio100m500m256Mi512Mi--
Admin100m500m256Mi512Mi--
Temporal250m1512Mi1Gi--
Keycloak250m1512Mi1Gi--
n8n250m1512Mi1Gi--

n8n Sidecars

All four sidecars share the same resource profile: CPU 100m-500m, Memory 128Mi-256Mi.

Data Services

ServiceStorage
PostgreSQL10Gi
Redis2Gi
Qdrant10Gi
Neo4j5Gi
Kafka5Gi
Prometheus10Gi
Grafana2Gi

Ingress

SettingDefault
ingress.enabledtrue
ingress.classNamenginx
ingress.hostagentic.local
ingress.tls.enabledfalse
ingress.tls.secretNameagentic-tls
networkPolicies.enabledtrue

Sandbox Isolation

The platform supports gVisor-based container isolation for agent workloads. Resource limits are tiered by agent autonomy level:

Autonomy LevelCPU RequestCPU LimitMemory RequestMemory Limit
Assistive0.250.5256Mi512Mi
Semi-Autonomous0.51512Mi1Gi
Autonomous121Gi2Gi

gVisor settings:

  • sandbox.gvisor.enabled: true
  • sandbox.gvisor.runtimeClassName: gvisor
  • sandbox.gvisor.handler: runsc
  • sandbox.gvisor.overhead: memory 64Mi, CPU 50m
  • sandbox.gvisor.nodeSelector: sandbox.gvisor.io/enabled: "true"

Code execution settings:

  • sandbox.codeExecution.defaultTimeoutSeconds: 30
  • sandbox.codeExecution.maxTimeoutSeconds: 120
  • sandbox.codeExecution.maxCodeSizeBytes: 102400 (100KB)
  • sandbox.codeExecution.maxOutputSizeBytes: 65536 (64KB)
  • sandbox.codeExecution.localMode: true (child_process in dev, K8s pods in production)

Monorepo Configuration

Workspace Structure

Defined in pnpm-workspace.yaml:

packages:
  - 'apps/*'       # portal, studio, admin, docs
  - 'packages/*'   # ui, api-client, auth, types, config
  - 'services/*'   # api-gateway, ws-server

Package manager: pnpm with workspaces. All dependencies are hoisted to the root node_modules where possible, with per-package overrides managed by pnpm.

Turborepo Tasks

Defined in turbo.json:

TaskDependenciesCachingOutputsPersistent
buildDepends on upstream ^buildYes.next/**, dist/**No
devNoneNo--Yes
lintNoneYes--No
testNoneYes--No
test:unitNoneNo--No
test:e2eDepends on buildNo--No

Global dependencies: **/.env.*local (any change to local env files invalidates all caches).

Common commands:

pnpm install                    # Install all dependencies
pnpm dev                        # Start all apps in dev mode
pnpm dev --filter=portal        # Start only the Portal
pnpm dev --filter=studio        # Start only the Studio
pnpm dev --filter=admin         # Start only the Admin Console
pnpm build                      # Build all apps
pnpm lint                       # Lint all packages
pnpm test                       # Run all tests

Feature Flags

The platform uses environment variables as feature flags. No external feature flag service is required.

FlagValuesDefaultEffect
MOCK_MODEtrue / falsefalse (auto-enabled when TSYSTEMS_AIFS_API_KEY is unset)Forces mock LLM responses. Useful for frontend development without an LLM provider.
OTEL_ENABLEDtrue / falsefalseEnables OpenTelemetry distributed tracing to the configured OTLP endpoint.
LANGFUSE_ENABLEDtrue / falsefalseEnables Langfuse LLM observability (requires LANGFUSE_SECRET_KEY and LANGFUSE_PUBLIC_KEY).
WS_MOCK_EVENTStrue / falsetrueWebSocket server emits synthetic demo events for UI development.
TOOL_SIGNATURE_ENFORCEMENTdisabled / warn / enforcewarnControls tool supply-chain verification. disabled skips all checks, warn logs violations, enforce rejects unsigned tools.
CODE_EXEC_MODElocal / k8slocalCode execution backend. local uses child_process (dev only). k8s provisions Kubernetes pods with gVisor isolation.
TRUST_AGENT_HEADERStrue / falsefalseTrusts X-Agent-Id headers without SPIFFE proof. Only enable in development.
SECURE_COOKIEStrue / falsefalse (auto-enabled when NODE_ENV=production)Forces HTTPS-only cookies for session tokens.
DEV_MODEtrue / falsetrue (identity-injector sidecar)Bypasses SPIFFE validation in the n8n identity injector.

Implicit Feature Detection

Several features are automatically enabled when their backing service is reachable:

FeatureEnabled WhenFallback
PostgreSQL persistenceDATABASE_URL is set and connectableIn-memory mock store
Redis rate limitingREDIS_URL is set and connectableRate limiting disabled
Vector searchQDRANT_URL is set and connectableKeyword-based search
Graph memoryNEO4J_URI is set and connectablePostgreSQL-based fallback
Kafka event busKAFKA_BROKERS is set and connectableDirect WebSocket push
Temporal workflowsTEMPORAL_ADDRESS is set and connectableSynchronous execution
n8n integrationN8N_API_URL is set and connectableDatabase-only mode
Vault secretsVAULT_ADDR is set and connectableEnvironment variable fallback
S3 storageS3_ENDPOINT is set and connectableLocal filesystem fallback
LLM callsTSYSTEMS_AIFS_API_KEY is setMock LLM responses