Skip to main content

Configuration Reference

Configuration Reference

Consolidated environment variables, configuration patterns, and secret management for the LLM Platform ecosystem.

Linkable sections - READMEs can reference specific anchors (e.g., configuration-reference#gitlab-configuration).


Table of Contents

  1. Ecosystem Configuration
  2. Common Environment Variables
  3. Service URLs
  4. Database Configuration
  5. Observability Stack
  6. AI Provider Configuration
  7. GitLab Configuration
  8. GitHub Configuration
  9. Security Configuration
  10. Token Management
  11. Kubernetes Configuration
  12. Docker Compose Patterns
  13. Project-Specific Templates
  14. Environment Hierarchy

Ecosystem Configuration

The ecosystem configuration (~/.env.ecosystem or /Users/flux423/Sites/LLM/.env.ecosystem) provides shared settings across all platform projects.

Loading Ecosystem Config

All projects should source the ecosystem configuration at the start of their .env files:

# Source ecosystem configuration source /Users/flux423/Sites/LLM/.env.ecosystem # Local overrides are automatically loaded from .env.local

Core Ecosystem Variables

VariableDefaultDescription
GITLAB_HOSTgitlab.comGitLab instance hostname
GITLAB_GROUPblueflyio/agent-platformGitLab group path
GITLAB_BASE_URLhttps://${GITLAB_HOST}/${GITLAB_GROUP}Computed base URL
GITLAB_COMPONENTS_REPO${GITLAB_BASE_URL}/gitlab_componentsCI component library
GITLAB_COMPONENTS_VERSIONmainComponent version/ref
NPM_REGISTRYhttps://${GITLAB_HOST}/api/v4/...GitLab NPM registry
NPM_SCOPE@blueflyNPM package scope
DOCKER_REGISTRY${GITLAB_HOST}/${GITLAB_GROUP}Container registry
API_BASE_URLhttps://api.llm-platform.localPlatform API base
MCP_REGISTRY_URLhttps://mcp.llm-platform.localMCP registry endpoint

Common Environment Variables

Variables used across most or all services.

Application Runtime

VariableValuesDefaultDescription
NODE_ENVdevelopment, production, testdevelopmentNode.js environment
PORTinteger3000Service listen port
HOSTIP/hostname0.0.0.0Service bind address
LOG_LEVELdebug, info, warn, errorinfoLogging verbosity
LOG_FORMATjson, prettyjsonLog output format
CORS_ORIGINURL or **Allowed CORS origins

API Configuration

VariableDefaultDescription
API_PREFIX/api/v1API route prefix
RATE_LIMIT_WINDOW_MS900000 (15 min)Rate limit window
RATE_LIMIT_MAX_REQUESTS100Max requests per window
HEALTH_PATH/healthHealth check endpoint
METRICS_PATH/metricsPrometheus metrics endpoint
METRICS_ENABLEDtrueEnable Prometheus metrics

WebSocket Configuration

VariableDefaultDescription
WEBSOCKET_ENABLEDtrueEnable WebSocket support
WEBSOCKET_PATH/wsWebSocket endpoint path
WS_HEARTBEAT_INTERVAL30000Heartbeat interval (ms)
WS_CONNECTION_TIMEOUT60000Connection timeout (ms)

GraphQL Configuration

VariableDefaultDescription
GRAPHQL_ENABLEDtrueEnable GraphQL endpoint
GRAPHQL_PATH/graphqlGraphQL endpoint path
GRAPHQL_PLAYGROUNDtrue (dev only)Enable GraphQL playground
GRAPHQL_INTROSPECTIONtrue (dev only)Enable introspection

Service URLs

Platform service endpoints using domain names.

Agent Services

VariableDefault PortDescription
AGENT_PROTOCOL_URL:3001Agent Protocol API gateway
AGENT_TRACER_URL:3002Observability/tracing service
AGENT_CHAT_URL:3003Chat service
WORKFLOW_ENGINE_URL:3004Workflow orchestration
AGENT_MESH_URL:3005Agent mesh network
AGENT_BRAIN_URL:3006Agent brain/reasoning
AGENT_BUILDKIT_URL:3009BuildKit automation
RFP_AUTOMATION_URL:8500RFP processing service

URL Format Examples

# Development (local domain) AGENT_PROTOCOL_URL=http://api.local.blueflyagents.com:3001 AGENT_TRACER_URL=http://tracer.local.blueflyagents.com:3002 # Production (Kubernetes DNS) AGENT_PROTOCOL_URL=http://agent-protocol.ossa-agents.svc.cluster.local:3001

Database Configuration

PostgreSQL

Multiple PostgreSQL instances for service isolation:

VariablePortDatabaseDescription
POSTGRES_AGENT_CHAT_URL5432agent_chatChat service data
POSTGRES_LLM_URL5433llm_platformPlatform core data
POSTGRES_OSSA_URL5434ossa_agentsAgent registry
POSTGRES_TRACER_URL5435agent_tracerTracing/observability

URL Format:

POSTGRES_<SERVICE>_URL=postgresql://<user>:<password>@<host>:<port>/<database> # Example POSTGRES_LLM_URL=postgresql://postgres:postgres@postgres-llm-platform.local:5433/llm_platform

Individual Variables (alternative):

POSTGRES_HOST=localhost POSTGRES_PORT=5432 POSTGRES_USER=postgres POSTGRES_PASSWORD=secure-password POSTGRES_DB=agent_tracer

Redis

VariablePortDescription
REDIS_AGENT_CHAT_URL6379Chat service cache
REDIS_LLM_URL6380Platform cache
REDIS_TRACER_URL6381Tracer cache

URL Format:

REDIS_<SERVICE>_URL=redis://<host>:<port> # With password REDIS_<SERVICE>_URL=redis://:<password>@<host>:<port>

MongoDB

VariablePortDescription
MONGODB_URL27017Document storage

URL Format:

MONGODB_URL=mongodb://<host>:<port>/<database>

Vector Databases

VariablePortsDescription
QDRANT_URL6333 (HTTP), 6334 (gRPC)Qdrant vector DB
QDRANT_HOST-Qdrant hostname
QDRANT_PORT6333Qdrant HTTP port
QDRANT_COLLECTION-Default collection name

Graph Databases

VariablePortsDescription
NEO4J_URI7687 (Bolt), 7474 (HTTP)Neo4j graph DB
NEO4J_USER-Neo4j username
NEO4J_PASSWORD-Neo4j password

ClickHouse

For high-volume analytics and time-series data:

VariablePortDescription
CLICKHOUSE_HOST-ClickHouse hostname
CLICKHOUSE_PORT8123HTTP interface port
CLICKHOUSE_USER-ClickHouse username
CLICKHOUSE_PASSWORD-ClickHouse password

Observability Stack

OpenTelemetry

VariableDescription
OTEL_SERVICE_NAMEService name for traces
OTEL_EXPORTER_OTLP_ENDPOINTOTLP collector endpoint
OTEL_EXPORTER_OTLP_GRPC_ENDPOINTgRPC collector endpoint

Phoenix AI Observability

VariableDescription
PHOENIX_ENABLEDEnable Phoenix integration
PHOENIX_ENDPOINTPhoenix server URL
PHOENIX_API_KEYPhoenix API key
PHOENIX_PROJECT_NAMEProject name in Phoenix
PHOENIX_EVALUATION_ENABLEDEnable LLM evaluations
PHOENIX_EXPERIMENTS_ENABLEDEnable A/B experiments

Prometheus & Grafana

VariableDefaultDescription
PROMETHEUS_URL:9090Prometheus server URL
GRAFANA_URL:3010Grafana dashboard URL
GF_SECURITY_ADMIN_USERadminGrafana admin username
GF_SECURITY_ADMIN_PASSWORD-Grafana admin password

Additional Observability

VariableDescription
JAEGER_URLJaeger tracing UI (:16686)
LOKI_URLLoki log aggregation (:3100)
TEMPO_URLTempo distributed tracing (:3200)
SIGNOZ_API_KEYSigNoz integration key

RPC Tracing

VariableDefaultDescription
RPC_TRACING_ENABLEDtrueEnable RPC tracing
RPC_LOG_DIR./logs/rpcRPC log directory
RPC_PERFETTO_ENABLEDtrueEnable Perfetto traces
RPC_OTEL_ENABLEDtrueEnable OTEL export

AI Provider Configuration

OpenAI

VariableDescription
OPENAI_API_KEYOpenAI API key
OPENAI_ORG_IDOrganization ID (optional)
OPENAI_ENABLEDEnable OpenAI provider

Anthropic

VariableDescription
ANTHROPIC_API_KEYAnthropic API key
ANTHROPIC_WORKSPACE_IDWorkspace ID (optional)
ANTHROPIC_ENABLEDEnable Anthropic provider
AI_MODELDefault model (e.g., claude-sonnet-4-5-20250929)

Ollama (Local)

VariableDefaultDescription
OLLAMA_BASE_URLhttp://ollama.local:11434Ollama server URL
OLLAMA_ENABLEDfalseEnable Ollama provider

MLflow

VariableDefaultDescription
MLFLOW_TRACKING_URIhttp://localhost:5001MLflow tracking server
MLFLOW_EXPERIMENT_NAME-Default experiment name

Langflow

VariableDefaultDescription
LANGFLOW_URLhttp://localhost:7861Langflow server URL
LANGFLOW_API_KEY-Langflow API key

GitLab Configuration

Core GitLab Settings

VariableDescription
GITLAB_HOSTGitLab hostname (e.g., gitlab.com)
GITLAB_URLFull GitLab URL (e.g., https://gitlab.com)
GITLAB_API_URLAPI endpoint (e.g., https://gitlab.com/api/v4)
GITLAB_GROUPGroup path (e.g., blueflyio/agent-platform)
GITLAB_BASE_GROUPBase group (e.g., blueflyio)
GITLAB_SUBGROUPSubgroup name (e.g., agent-platform)
GITLAB_NAMESPACE_IDNumeric namespace ID

GitLab Tokens

VariableScopeDescription
GITLAB_TOKENFull accessPrimary access token
GITLAB_ACCESS_TOKENAPI accessAPI-only token
GITLAB_NPM_TOKENPackage registryNPM publishing token
CI_JOB_TOKENCI/CDJob-scoped token (auto-set in CI)
CI_DEPLOY_OSSADeployDeployment token
GITLAB_WEBHOOK_SECRETWebhooksWebhook signature verification
GITLAB_RUNNER_REGISTRATION_TOKENRunnersRunner registration

Bot Service Account Tokens

VariableBot AccountPurpose
GITLAB_BOT_TS_TOKENTypeScript botTS package automation
GITLAB_BOT_DRUPAL_TOKENDrupal botDrupal module automation
GITLAB_BOT_OSSA_TOKENOSSA botOSSA manifest operations
GITLAB_BOT_CI_TOKENCI botPipeline automation
GITLAB_BOT_DEV_TOKENDev botDevelopment tasks
GITLAB_BOT_WIKI_AGGREGATORWiki botWiki synchronization
GITLAB_BOT_MR_REVIEWERReview botMR code review
GITLAB_BOT_DUO_CLIDuo CLIGitLab Duo integration
GITLAB_BOT_OSSA_VALIDATORValidator botOSSA schema validation
GITLAB_BOT_AI_DEVAI DeveloperAI-powered development

Kubernetes Agent Tokens

VariableEnvironmentDescription
AGENT_K8_TS_LOCALLocalTypeScript cluster agent
AGENT_K8_DRUPAL_LOCALLocalDrupal cluster agent
AGENT_K8_ML_LOCALLocalML workload agent
AGENT_K8_NATIVE_LOCALLocalNative workload agent
AGENT_K8_TS_PRODProductionTypeScript prod agent
AGENT_K8_INFRA_PRODProductionInfrastructure prod agent
AGENT_K8_ML_PRODProductionML production agent
AGENT_K8_GITLAB_LIB_LOCALLocalGitLab library agent
AGENT_K8_GILTAB_LIB_CICIGitLab library CI agent

GitHub Configuration

For GitHub mirroring and cross-platform operations:

VariableDescription
GITHUB_API_URLGitHub API URL (https://api.github.com)
GITHUB_BASE_URLGitHub base URL (https://api.github.com)
GITHUB_URLGitHub web URL (https://github.com)
GITHUB_GROUPOrganization name (e.g., blueflyio)
GITHUB_TOKENPersonal access token
GITHUB_MIRROR_TOKENMirror sync token

Security Configuration

Authentication

VariableDefaultDescription
API_KEY-Service API key
API_KEY_GATEWAY-Gateway API key
API_KEY_ADMIN-Admin API key
API_KEY_HEADERx-api-keyAPI key header name
JWT_SECRET-JWT signing secret (256-bit)
JWT_MAX_AGE24hJWT expiration

Security Settings

VariableDefaultDescription
SKIP_AUTHfalseSkip authentication (dev only)
ALLOW_ANONYMOUSfalseAllow unauthenticated access
REQUIRE_HTTPStrueRequire HTTPS in production
ALLOWED_ORIGINS-CORS allowed origins (comma-separated)
HELMET_ENABLEDtrueEnable security headers
CORS_CREDENTIALSfalseAllow credentials in CORS

Rate Limiting

VariableDefaultDescription
RATE_LIMIT_WINDOW_MS60000Rate limit window (ms)
RATE_LIMIT_MAX_REQUESTS100Max requests per window
RATE_LIMIT_HEADERStrueInclude rate limit headers
SKIP_RATE_LIMITfalseSkip rate limiting (dev only)

Token Management

Token Storage Location

All tokens are stored in ~/.tokens/ directory:

~/.tokens/
  gitlab            # GitLab personal access token
  gitlab-npm        # GitLab NPM registry token
  openai            # OpenAI API key
  anthropic         # Anthropic API key
  github            # GitHub personal access token
  posthog           # PostHog API key
  signoz            # SigNoz API key

Token Format

Each token file contains only the raw token value (no formatting):

# Read token in scripts export GITLAB_TOKEN=$(cat ~/.tokens/gitlab) export OPENAI_API_KEY=$(cat ~/.tokens/openai)

Token Prefixes

PrefixServiceExample
glpat-GitLab Personal Access Tokenglpat-xxxxxxxxxxxx
glrt-GitLab Runner Registration Tokenglrt-xxxxxxxxxxxx
glagent-GitLab Agent Tokenglagent-xxxxxxxxxxxx
ghp_GitHub Personal Access Tokenghp_xxxxxxxxxxxx
sk-OpenAI API Keysk-xxxxxxxxxxxx
sk-ant-Anthropic API Keysk-ant-xxxxxxxxxxxx

Security Rules

  1. NEVER commit tokens to git repositories
  2. NEVER expose tokens in terminal output or logs
  3. ALWAYS use environment variables or token files
  4. Rotate tokens quarterly or immediately if exposed
  5. Use project access tokens with minimal permissions for automation

Kubernetes Configuration

In-Cluster Service DNS

Format: <service>.<namespace>.svc.cluster.local:<port>

# Observability namespace NEO4J_URI=bolt://neo4j.observability.svc.cluster.local:7687 OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector.observability.svc.cluster.local:4318 # Phoenix namespace PHOENIX_ENDPOINT=http://phoenix.phoenix.svc.cluster.local:6006 PHOENIX_OTLP_GRPC=http://phoenix.phoenix.svc.cluster.local:4317 # OSSA-agents namespace PROMETHEUS_URL=http://prometheus-service.ossa-agents.svc.cluster.local:9090 GRAFANA_URL=http://grafana-service.ossa-agents.svc.cluster.local:3000 QDRANT_URL=http://qdrant-service.ossa-agents.svc.cluster.local:6333

Ingress URLs (Browser Access)

NEO4J_BROWSER_URL=http://neo4j.local.bluefly.io GRAFANA_BROWSER_URL=http://grafana.local.bluefly.io PROMETHEUS_BROWSER_URL=http://prometheus.local.bluefly.io QDRANT_BROWSER_URL=http://qdrant.local.bluefly.io

ConfigMap Pattern

apiVersion: v1 kind: ConfigMap metadata: name: agent-config namespace: ossa-agents data: NODE_ENV: "production" LOG_LEVEL: "info" METRICS_ENABLED: "true" # Database URLs (secrets referenced separately) POSTGRES_HOST: "postgres.ossa-agents.svc.cluster.local" POSTGRES_PORT: "5432" REDIS_HOST: "redis.ossa-agents.svc.cluster.local" REDIS_PORT: "6379"

Secret Reference Pattern

apiVersion: v1 kind: Pod spec: containers: - name: app envFrom: - configMapRef: name: agent-config - secretRef: name: agent-secrets env: - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: postgres-credentials key: password

Docker Compose Patterns

Network Configuration

networks: llm_front: external: true name: llm_front llm_back: external: true name: llm_back internal: driver: bridge

Service with Token Mount

services: api: environment: - NODE_ENV=production - PORT=3003 volumes: - ~/.tokens:/root/.tokens:ro # Mount tokens read-only

Database Connection Pattern

services: app: environment: - POSTGRES_URL=postgresql://user:password@postgres:5432/db - REDIS_URL=redis://redis:6379 - MONGODB_URL=mongodb://mongo:27017/db depends_on: - postgres - redis - mongo

Health Check Pattern

services: api: healthcheck: test: ['CMD', 'wget', '--quiet', '--tries=1', '--spider', 'http://localhost:3000/health'] interval: 30s timeout: 10s retries: 3 start_period: 40s

Project-Specific Templates

Drupal Module Template

Source: .env.example.drupal

# Source ecosystem configuration source /Users/flux423/Sites/LLM/.env.ecosystem # Project Configuration export PROJECT_NAME=my_module export PROJECT_VERSION=11.x-1.0 export PROJECT_TYPE=drupal # GitLab CI Component export GITLAB_CI_COMPONENT="${GITLAB_COMPONENTS_REPO}/drupal/module@${GITLAB_COMPONENTS_VERSION}" # Drupal Configuration export DRUPAL_VERSION="${DRUPAL_VERSION}" # From ecosystem (11.x) export PHP_VERSION="${PHP_VERSION}" # From ecosystem (8.3) # Code Quality export PHPCS_STANDARD=Drupal export ENABLE_PHPSTAN=true # Testing export ENABLE_TESTS=true export ENABLE_COVERAGE=true export COVERAGE_THRESHOLD=70

NPM Package Template

Source: .env.example.npm

# Source ecosystem configuration source /Users/flux423/Sites/LLM/.env.ecosystem # Project Configuration export PROJECT_NAME=agent-brain export PROJECT_VERSION=0.1.0 export PROJECT_TYPE=npm # GitLab CI Component export GITLAB_CI_COMPONENT="${GITLAB_COMPONENTS_REPO}/workflow/golden@${GITLAB_COMPONENTS_VERSION}" # Build Configuration export NODE_VERSION=20 export ENABLE_TESTS=true export ENABLE_COVERAGE=true export COVERAGE_THRESHOLD=70 # NPM Publishing export NPM_PUBLISH_REGISTRY="${NPM_REGISTRY}" export NPM_PACKAGE_SCOPE="${NPM_SCOPE}"

ML Model Template

Source: .env.example.model

# Source ecosystem configuration source /Users/flux423/Sites/LLM/.env.ecosystem # Project Configuration export PROJECT_NAME=llm-platform_model export PROJECT_VERSION=0.1.0 export PROJECT_TYPE=model # Model Registry export MODEL_REGISTRY_URL="${GITLAB_HOST}/${GITLAB_GROUP}" export MODEL_NAME=llm-platform-model export MODEL_VERSION=1.0.0 # ML Configuration export MLFLOW_TRACKING_URI="${MLFLOW_TRACKING_URI}" export MLFLOW_EXPERIMENT_NAME="${PROJECT_NAME}" # Vector Database export QDRANT_HOST="${QDRANT_HOST}" export QDRANT_PORT="${QDRANT_PORT}" export QDRANT_COLLECTION="${PROJECT_NAME}_embeddings" # Training export TRAINING_DATA_PATH="./data" export MODEL_OUTPUT_PATH="./models/trained"

Environment Hierarchy

Configuration sources are loaded in order (later sources override earlier):

1. .env.ecosystem     (shared platform defaults)
2. .env.local         (local overrides, gitignored)
3. .env               (project defaults, committed)
4. .env.production    (production overrides)
5. .env.k8s           (Kubernetes-specific)
6. Environment vars   (runtime overrides)

File Locations

FileLocationGitPurpose
.env.ecosystem/Users/flux423/Sites/LLM/IgnoredPlatform-wide defaults
.env.local/Users/flux423/Sites/LLM/IgnoredLocal secrets/overrides
.envProject rootCommittedProject defaults
.env.exampleProject rootCommittedTemplate for developers
.env.productionProject rootCommittedProduction overrides
.env.k8sProject rootCommittedKubernetes settings

Loading Pattern

#!/bin/bash # Load configuration in correct order # 1. Ecosystem defaults [ -f "/Users/flux423/Sites/LLM/.env.ecosystem" ] && source "/Users/flux423/Sites/LLM/.env.ecosystem" # 2. Local overrides (secrets) [ -f "/Users/flux423/Sites/LLM/.env.local" ] && source "/Users/flux423/Sites/LLM/.env.local" # 3. Project defaults [ -f ".env" ] && source ".env" # 4. Environment-specific [ -f ".env.${NODE_ENV}" ] && source ".env.${NODE_ENV}"

Feature Flags & Thresholds

Observability Features

VariableDefaultDescription
ENABLE_COST_ALERTStrueEnable cost alerting
ENABLE_PERFORMANCE_MONITORINGtrueEnable perf monitoring
ENABLE_SECURITY_SCANNINGtrueEnable security scans

Alert Thresholds

VariableDefaultDescription
HOURLY_COST_THRESHOLD10.0Hourly cost alert ($)
DAILY_COST_THRESHOLD100.0Daily cost alert ($)
ERROR_RATE_THRESHOLD5.0Error rate alert (%)
RESPONSE_TIME_THRESHOLD2000Response time alert (ms)

Data Retention

VariableDefaultDescription
METRICS_RETENTION_DAYS90Metrics retention
LOGS_RETENTION_DAYS30Log retention
TRACES_RETENTION_DAYS7Trace retention

Resource Limits

VariableDefaultDescription
MAX_QUERY_TIMEOUT300Query timeout (seconds)
MAX_CONCURRENT_QUERIES10Concurrent query limit
RATE_LIMIT_PER_MINUTE1000Rate limit per minute

Integration Configuration

Discord

VariableDescription
DISCORD_SERVER_IDDiscord server ID
DISCORD_WEBHOOK_URLWebhook URL for notifications
DISCORD_CHANNEL_URLChannel invite URL

MCP Registry

VariableDefaultDescription
MCP_REGISTRY_URLhttp://localhost:3000Registry API URL
MCP_REGISTRY_SSE_URL${MCP_REGISTRY_URL}/api/mcp-registry/sse/connectionsSSE endpoint
MCP_DATA_DIR/app/mcp/dataMCP data directory
MCP_REGISTRY_DIR~/.mcp/mcp_servers.dLocal MCP server configs

OpenStandardAgents.org

VariableDescription
NEXT_PUBLIC_BASE_URLPublic website URL
NEXT_PUBLIC_REPO_URLGitHub repository URL
OSSA_NPMJSNPM package name
WEBHOOK_PORTWebhook listener port

Tailscale

VariableDescription
TAILSCALE_NODEKEYTailscale node key
TAILSCALE_PUBLIC_KEYTailscale public key
TS_PATTailscale-authenticated GitLab token

Migration Settings

For repository migration operations:

VariableDefaultDescription
MIGRATE_ALL_BRANCHEStrueMigrate all branches
MIGRATE_ISSUEStrueMigrate issues
MIGRATE_MILESTONEStrueMigrate milestones
MIGRATE_LABELStrueMigrate labels
MIGRATE_WIKItrueMigrate wiki
SETUP_MIRROR_SYNCtrueConfigure mirror sync

Advanced Settings

Flash Attention (ML)

VariableDefaultDescription
FLASH_ATTENTION_ENABLEDtrueEnable Flash Attention
FLASH_ATTENTION_FP8trueUse FP8 precision

Tree of Thought / Graph of Thought

VariableDefaultDescription
TOT_MAX_DEPTH5Max thinking depth
GOT_MAX_NODES100Max graph nodes

Worktree Configuration

VariableDescription
WORKINGTREE_DIRBase worktree directory
WORKINGTREE_FOLDERFolder pattern (${DATE}/${REPO_NAME}/${BRANCHNAME})

See Also