# ---- Database ---- APP_ENV=development RATE_LIMIT_FAILURE_MODE=memory ALLOW_EPHEMERAL_SESSIONS=true PG_USER=companion PG_PASSWORD=companion_secret PG_HOST=postgres PG_PORT=5432 PG_DB=companion DATABASE_URL=postgresql+asyncpg://companion:companion_secret@postgres:5432/companion # ---- Redis ---- REDIS_URL=redis://redis:6379/0 CELERY_BROKER_URL=redis://redis:6379/1 # ---- MinIO ---- MINIO_ENDPOINT=minio:9000 MINIO_ACCESS_KEY=minioadmin MINIO_SECRET_KEY=minioadmin_secret MINIO_SECURE=false # ---- Model API Keys ---- QWEN_API_KEY=sk-xxx DEEPSEEK_API_KEY=sk-xxx # OPENAI_API_KEY=sk-xxx # GEMINI_API_KEY=xxx # GOOGLE_API_KEY=xxx # ---- JWT ---- JWT_SECRET=your-jwt-secret-change-in-production JWT_ALGORITHM=HS256 JWT_EXPIRE_MINUTES=1440 # ---- OpenTelemetry ---- OTEL_EXPORTER_OTLP_ENDPOINT=http://jaeger:4317 OTEL_SERVICE_NAME=companion-runtime # ---- Production operations ---- # Production must set these to real values and use infra/docker-compose.production.yml. NOTIFICATION_PROVIDER=unconfigured # NOTIFICATION_OUTBOUND_URL=https://notifications.example.com/outbound # NOTIFICATION_WEBHOOK_SECRET=replace-with-shared-secret # PUBLIC_BASE_URL=https://companion.example.com # PUBLIC_API_URL=https://companion.example.com # PUBLIC_WS_URL=wss://companion.example.com # REQUIRE_TLS=true # EXPECTED_MIGRATION_HEADS=c1d2e3f4a5b6 # BACKUP_BUCKET=companion-prod-backups # BACKUP_KMS_KEY_ID=alias/companion-prod-backups # EVIDENCE_MANIFEST_REQUIRED=true # DEVICE_IDENTITY_REQUIRED=true # CONTROLLED_ELDER_ENROLLMENT=true # PLATFORM_WORKER_HEARTBEAT_KEY=platform:worker:heartbeat # PLATFORM_WORKER_HEARTBEAT_MAX_AGE_SECONDS=120 # ---- Audio HTTP endpoints ---- MAX_ASR_BYTES=2000000 MAX_TTS_CHARS=300 AUDIO_ENDPOINT_AUTH_REQUIRED=true ASR_RATE_LIMIT_PER_MINUTE=20 TTS_RATE_LIMIT_PER_MINUTE=30 # ---- Experimental Pi runtime ---- ENABLE_PI_RUNTIME=0 PI_SIDECAR_URL=http://127.0.0.1:8787 PI_PROVIDER=google PI_MODEL=gemini-flash-latest # Companion API /api base used by pi-sidecar tool bridge (must match the running API port). # Local uvicorn often uses :8001; docker-compose API is :8000. TOOL_BRIDGE_URL=http://127.0.0.1:8001/api # Optional shared secret; leave empty for local open bridge. # In production (APP_ENV=production) or when REQUIRE_TOOL_BRIDGE_TOKEN=1, token is required. # TOOL_BRIDGE_TOKEN= # REQUIRE_TOOL_BRIDGE_TOKEN=0 # ---- Long-term memory engine (optional mem0 OSS) ---- # Default path uses Postgres L3 lifecycle (consent SoT). Enable mem0 for extract/rank engine. # MEM0_ENABLED=0 # MEM0_CONFIG_JSON={"llm":{"provider":"openai","config":{"model":"gpt-4o-mini","api_key":"..."}},"embedder":{"provider":"openai","config":{"model":"text-embedding-3-small","api_key":"..."}},"vector_store":{"provider":"pgvector","config":{"dbname":"companion","user":"companion","password":"...","host":"localhost","port":5432}}} # ---- Frontend ---- # Local uvicorn API is usually :8001; docker-compose API maps to :8000. NEXT_PUBLIC_WS_URL=ws://localhost:8001 NEXT_PUBLIC_API_URL=http://localhost:8001 # local_stack.sh defaults this to pi_experimental when it is unset. NEXT_PUBLIC_AGENT_RUNTIME=harness