BrainX V5 is configured through environment variables.
Recommended workflow:
- keep a local
.envfor development - for production/system services, inject env vars via your process manager (systemd, Railway, Docker, etc.)
Postgres connection string.
Example:
DATABASE_URL=postgresql://brainx:brainx_change_me@127.0.0.1:5432/brainxNote:
- existing deployments may still use a legacy physical database name such as
brainx - that naming drift does not block BrainX V5 itself, but docs and code should not assume a specific DB name unless a migration was actually executed
Used by lib/openai-rag.js to call the OpenAI embeddings endpoint.
Default: text-embedding-3-small
Default: 1536
Must match the schema type:
brainx_memories.embedding vector(1536)
If you change dimensions:
- change schema
- rebuild embeddings for existing rows
Path to a shared env file.
lib/db.js and lib/openai-rag.js both support loading env from BRAINX_ENV if the main variables are missing.
This is useful when multiple agents share one secrets file.
Default: warm_or_hot.
If unset and you don’t pass --tier, the inject command:
- searches
hot - searches
warm - merges results unique by id
Default: 2000.
Default: 80.