Skip to main content

Operations

Upgrades​

Breign publishes release notes with each version: the changes, the versions of each component that go together, and the environment variables to add or remove.

To upgrade:

  1. Read the release notes of every version between yours and the target, and update the environment variables.
  2. Back up the database (see Backups).
  3. PostgreSQL: apply the migrations with the new Breign API image (see Initialization). MongoDB: run the index command of the new image.
  4. Deploy Breign API, then Breign Document API and the Scrapping API, then Breign APP.

When it stops, the API finishes its running work for a few seconds only: conversation turns still running can be cut during an upgrade, so prefer quiet hours. Keep the same version for all replicas of a component once the upgrade is done.

Backups​

WhatHowWhy
DatabaseDaily backups with point-in-time recovery if available (managed service, pg_dump, mongodump). The Helm chart's embedded MongoDB includes a daily mongodump job.Everything: users, organizations, agents, conversations, configuration.
Object storageVersioning or replication of the buckets.Knowledge files, attachments, agent workspaces, avatars.
Vector databaseWeaviate or Qdrant backups. Without them, the knowledge bases can be rebuilt by reindexing them, which costs embedding calls and time.Knowledge search.
SecretsStore them in a vault, outside the cluster.Without the same ENCRYPTION__SECRET, the API keys stored in the database can no longer be read.

Test a restore regularly.

Monitoring​

Health checks​

ComponentProbeNotes
Breign APIGET /health → okDoesn't check the database; the answer is cached for 60 seconds.
Breign APPGET /login → 200No dedicated health route.
Breign Document APIGET /healthNo authentication needed.
Breign Scrapping APIGET /
Guards APIGET /
Execution nodebreign-node-healthcheck (in the image)See Node image reference.

Logs​

All components write their logs to the standard output; Breign API writes JSON, one line per event. Collect them with your usual tool (Loki, Elastic, Azure Monitor, Cloud Logging…).

  • Set LOGGER__LEVEL=info in production: at debug level (the image default), logs can contain fragments of conversations.
  • Keep LOGGER__SENSITIVE=false on any environment that processes real data.

See Monitoring for what is logged.

Traces​

Breign API is instrumented with OpenTelemetry and exports its traces in Zipkin format: set OTEL_EXPORTER_ZIPKIN_ENDPOINT to your collector (Zipkin, Jaeger, an OpenTelemetry Collector…).

What to watch​

  • CPU and memory of each container, against the sizing;
  • documents waiting to be parsed, and parsing errors (shown in each knowledge base);
  • errors from AI providers (quotas, 429 answers), visible in the conversations and in Metrics;
  • database connections and disk space, vector database memory.

Security checklist​

Before opening the platform to users:

Secrets

  • Replace every development default of Breign API: AUTHENTICATION__API_KEY, AUTHENTICATION__AUTH_SECRET, AUTHENTICATION__JWT__PRIVATE_KEY / PUBLIC_KEY, ENCRYPTION__SECRET, SERVICES__DOCUMENTS_SERVICE__API_KEY, storage keys. The defaults are public.
  • Set BETTER_AUTH_SECRET on Breign APP, API_KEY on Document API and on the Guards API.
  • Keep BRAIN_API_KEY server-side: never in a NEXT_PUBLIC_* variable.
  • Store secrets in your platform's secret manager (Kubernetes secrets, Key Vault, Secret Manager…), not in images or Git.

Generate them, for example:

# Random secrets (API keys, auth and encryption secrets)
openssl rand -base64 32

# Ed25519 key pair for AUTHENTICATION__JWT__*
openssl genpkey -algorithm ed25519 -out jwt-private.pem
openssl pkey -in jwt-private.pem -pubout -out jwt-public.pem

Network

  • Expose only Breign APP and Breign API (and the storage for browsers). Keep Document API, Scrapping API, Guards API, the database and the vector database on a private network.
  • Serve everything over HTTPS; restrict AUTHENTICATION__TRUSTED_ORIGINS to your app's URL.
  • Decide whether agents may reach your internal network (SERVICES__OPENAPI_TOOLS__ALLOW_PRIVATE_NETWORKS, MCP servers) and filter Breign API's outbound traffic accordingly. See Connect your models, data and tools.

Data

  • Set LOGGER__LEVEL=info and LOGGER__SENSITIVE=false.
  • Enable encryption at rest on the database, the storage and the volumes.
  • Set up and test backups.
  • If you use the Guards API, check whether its use of Google Translate is acceptable for your data.

Accounts

  • Limit the number of superadmins.
  • Give execution nodes an API key of a dedicated account with only the rights they need.