Documentation

ChatPilot

Environment Variables

Required and optional environment variables for ChatPilot.

| Variable | Required | Description |

|---|---|---|

| DATABASE_URL | Yes | PostgreSQL connection string with pgvector. |

| REDIS_URL | Yes | Redis for cache, sessions, and rate-limit state. |

| META_APP_SECRET | Yes | Webhook signature verification. |

| META_API_VERSION | Yes | Example: v19.0. |

| INNGEST_EVENT_KEY | Yes | Inngest ingest key. |

| INNGEST_SIGNING_KEY | Yes | Inngest signing key. |

| ANTHROPIC_API_KEY | Yes | Claude Haiku classifier. |

| COHERE_API_KEY | Yes | Multilingual embeddings. |

| MPESA_CONSUMER_KEY | No | Daraja app consumer key fallback. |

| MPESA_CONSUMER_SECRET | No | Daraja app consumer secret. |

| MPESA_CALLBACK_URL | Yes | Public URL for Daraja callbacks. |

| PAYHERO_API_USERNAME | Yes | Platform PayHero API username for Basic Auth. |

| PAYHERO_API_PASSWORD | Yes | Platform PayHero API password for Basic Auth. |

| PAYHERO_MASTER_CHANNEL_ID | Yes | Platform PayHero wallet channel ID for B2C withdrawals. |

| WOOCOMMERCE_TIMEOUT | No | Default 10 seconds. |

| JWT_SECRET | Yes | Dashboard auth signing key. |

| CORS_ORIGINS | Yes | Allowed origins for the API. |

| LOG_LEVEL | No | info, debug, or warning. |

| SENTRY_DSN | No | Backend Sentry DSN. Leave empty to disable FastAPI monitoring locally. |

| SENTRY_ENVIRONMENT | No | Backend Sentry environment. Use development, staging, or production. |

| SENTRY_RELEASE | No | Explicit backend release id. If empty, commit SHA environment variables are used. |

| SENTRY_TRACES_SAMPLE_RATE | No | Optional tracing override. Leave empty for environment-aware defaults. |

| SENTRY_PROFILES_SAMPLE_RATE | No | Optional profiling override. Leave empty for environment-aware defaults. |

| SENTRY_ENABLE_LOGS | No | Sends ERROR, CRITICAL, and FATAL backend logs to Sentry when enabled. |