Skip to main content
Ownership matters: the Auth service owns all database access on behalf of the frontends (which hold no credentials). The worker owns its schema via an idempotent ensure_schema() at boot; Mother AI manages its own tables and id sequences. Schema facts below are the durable vocabulary — table purposes, not full column lists.

Postgres

Identity & authorization (Auth service / Better Auth schema)

Delivery core

Work management & skill acquisition

Slack, knowledge, platform

Two Postgres sequences (cerebrum_workflow_id_seq, cerebrum_prompt_id_seq) allocate the wf-N / pt-N identifiers, self-aligning past the highest id any table has issued — ids live where the rows they name live, not in a counter that can restart. Project slugs are allocated with bounded retry: scan for base and base-% collisions, take the first free -N suffix from -2, insert, and retry on the idx_projects_slug unique-index violation if another worker wins the race (8 attempts). That unique index (and dropping the old name UNIQUE) is an idempotent migration in the worker’s ensure_schema(). The LangGraph checkpointer adds its own checkpoints* tables for interrupt/resume.

Redis

Short-lived and coordination state; nothing here is the durable record.

Qdrant

A collection’s width is permanent — Qdrant cannot resize — so collections are created at the configured embedding width, never at whichever vector arrives first. A width mismatch is logged as an error and left alone; recreating is data loss and an operator’s call. Retrieval failures are classified (missing collection vs query failure), logged, and surfaced as retrieval_degraded / retrieval_failures on the augmented prompt — while zero results are not degradation: an empty rules collection is the normal steady state.