Skip to content

Environment variables

Every PENSIEVE_* variable read by the pensieve engine (pensieve-bin), the local CLI engine (pensieve mcp / pensieve serve), or the node daemon (pensieve worker run). Defaults are the values the binary falls back to when the variable is absent. Areas group related flags so a deploy config stays coherent.

Side legend: S = server / engine only; C = CLI / local engine / node daemon; SC = both.

Catalog

NameSideDefaultPurpose
PENSIEVE_CATALOG_URLSCpostgres://pensieve:pensieve_dev@localhost:5433/pensievePostgres connection URL for the catalog. Used by pensieve-bin and admin subcommands.
PENSIEVE_PG_MAX_CONNSS16Catalog connection-pool size. Raise for many concurrent query/ingest nodes against one catalog.
PENSIEVE_PG_ACQUIRE_TIMEOUT_SECSS10How long a request waits for a free pool connection before erroring.

Roles and scale-out

Knobs for running more than one engine pod against a catalog. By default a node is all_in_one (single-writer); see Deploy with Helm → role split.

NameSideDefaultPurpose
PENSIEVE_ROLESall_in_oneWhich components this node runs. all_in_one (or unset/unknown) = everything; edge/query/ingest = stateless HTTP only (no committer, no background jobs); committer = the commit loop only; worker/compaction = background jobs only.
PENSIEVE_INGEST_MODESsyncSet to staged to stage writes to object storage and ack immediately, leaving the commit to the (possibly separate) committer node. Required for the role split to offload commits.
PENSIEVE_WRITE_FORMATStlmSegment format for newly written extents: tlm (Arrow IPC) or parquet (ZSTD + encodings + blooms). Reads dispatch per-extent, so old extents stay readable after a flip; compaction migrates them.

HTTP server

NameSideDefaultPurpose
PENSIEVE_HTTP_ADDRS0.0.0.0:8080HTTP listen address. Serves query, ingest, agent, etc.
PENSIEVE_LOCAL_HTTP_ADDRC127.0.0.1:7777Listen address for pensieve serve (local single-binary).
PENSIEVE_SCHEMA_CACHE_TTL_SECSS5TTL for the GET /v1/catalog/schema server-side cache.
PENSIEVE_CORS_ALLOWED_ORIGINSSpermissive (dev)Comma-separated allowed origins for CORS. Unset → permissive (dev only); always set in production.

Query limits & admission control

Per-query resource ceilings and node-level backpressure. The budget caps are deployment-wide defaults; per-request headers may lower them further. Admission limits are off by default (unset/0 ⇒ unlimited) — set them to convert overload into a fast 429 Too Many Requests + Retry-After instead of OOM or latency collapse.

NameSideDefaultPurpose
PENSIEVE_QUERY_MEMORY_BYTESS4294967296 (4 GiB)Per-query DataFusion memory pool. Over-budget queries spill instead of OOM-ing.
PENSIEVE_QUERY_WALL_MSS300000 (5 min)Per-query wall-clock deadline (ms).
PENSIEVE_QUERY_OBJECT_STORE_BYTESS10737418240 (10 GiB)Per-query cap on bytes fetched from object storage.
PENSIEVE_QUERY_MAX_CONCURRENTS0 (unlimited)Max in-flight queries on this node. Excess → 429 + Retry-After.
PENSIEVE_QUERY_RETRY_AFTER_SECSS1Retry-After advertised when query admission rejects.
PENSIEVE_QUERY_MAX_CONCURRENT_PER_TENANTS0 (unlimited)Per-tenant in-flight query cap — one tenant saturating its budget can't starve others.
PENSIEVE_AGENT_MAX_CONCURRENTS0 (unlimited)Max concurrent agent runs on this node.
PENSIEVE_AGENT_RETRY_AFTER_SECSS1Retry-After advertised when agent-run admission rejects.
PENSIEVE_AGENT_MAX_CONCURRENT_PER_TENANTS0 (unlimited)Per-tenant concurrent agent-run cap.

gRPC (Arrow Flight)

NameSideDefaultPurpose
PENSIEVE_GRPC_ADDRS0.0.0.0:9090Arrow Flight listen address. Set to off to disable the gRPC server entirely.

OTLP gRPC

NameSideDefaultPurpose
PENSIEVE_OTLP_ADDRSoffOTLP gRPC listen address (conventional 0.0.0.0:4317). off disables the receiver.
PENSIEVE_OTLP_DATABASESdefaultTarget database for OTLP-received logs. Tables auto-created as otel_logs.

Object store

S3-compatible (works with MinIO, AWS S3, R2, GCS via S3 API). When PENSIEVE_LOCAL_MODE=1 or no S3 env vars are set, the local filesystem is used instead (set automatically by pensieve serve).

NameSideDefaultPurpose
PENSIEVE_PATH_PREFIXSpensievePath prefix prepended to every object key.
PENSIEVE_LOCAL_MODESCunset1 forces the local filesystem store (auto-set by pensieve serve).
PENSIEVE_S3_ENDPOINTSunsetS3 endpoint URL (e.g. http://localhost:9000 for MinIO). Empty → AWS S3.
PENSIEVE_S3_REGIONSus-east-1Region passed to the S3 client.
PENSIEVE_S3_BUCKETSpensieveBucket name.
PENSIEVE_S3_ACCESS_KEY_IDSunsetAccess key. Falls back to the AWS credential chain when unset.
PENSIEVE_S3_SECRET_ACCESS_KEYSunsetSecret key. When both key vars are unset, the standard AWS provider chain applies (ECS/Fargate task role, web identity, AWS_* env, IMDS) — keyless IAM-role deployments set only bucket + region.
PENSIEVE_S3_PATH_STYLEStruePath-style addressing (vs. virtual-hosted). Set false for virtual-host style.
PENSIEVE_S3_ALLOW_HTTPStrueAllow plain HTTP (for local MinIO). Set false to require TLS.

Local engine data paths

Read by pensieve mcp, pensieve serve, and pensieve sync. Data lives under ~/.pensieve by default.

NameSideDefaultPurpose
PENSIEVE_HOMEC~/.pensieveRoot data directory for the local engine.
PENSIEVE_LOCAL_DBC$PENSIEVE_HOME/catalog.dbSQLite catalog path (local engine only).
PENSIEVE_LOCAL_DATAC$PENSIEVE_HOME/dataLocal object-store root directory.
PENSIEVE_LOCAL_USERCadminDefault admin username for pensieve serve.
PENSIEVE_LOCAL_PASSWORDCadminDefault admin password for pensieve serve. Override in shared envs.

Auth

NameSideDefaultPurpose
PENSIEVE_AUTH_BACKENDSenvenv = static PENSIEVE_AUTH_TOKENS; session = username/password login backed by the catalog; supabase = Supabase Auth JWTs; oidc = generic OIDC.
PENSIEVE_AUTH_TOKENSSunset(env backend) Comma-separated token:role pairs (e.g. alice-tok:admin,reader-tok:read). Empty / unset disables auth.
PENSIEVE_ADMIN_USERSunset(session backend) Seed an admin user on first boot if no users exist yet. Requires PENSIEVE_ADMIN_PASSWORD.
PENSIEVE_ADMIN_PASSWORDSunsetPassword for the seeded admin user. Only used when no users exist.
PENSIEVE_ACCESS_TTL_SECSS3600Access-token lifetime (1 hour). Applies to the session and supabase backends.
PENSIEVE_REFRESH_TTL_SECSS2592000Refresh-token lifetime (30 days).
PENSIEVE_INTERNAL_BEARERSCautoBearer token used by the local engine to call itself (e.g. dreaming). Auto-derived from PENSIEVE_AUTH_TOKENS; override only when embedding the server.

Roles: readwriteadmin. A higher role grants everything below it.

Supabase Auth (PENSIEVE_AUTH_BACKEND=supabase)

Validates Supabase-issued JWTs (project JWKS by default, with kid-rotation refetch) and JIT-provisions pensieve users from them. Opaque tokens (static keys, pensieve session/API tokens) still authenticate through the session backend, so CLI/MCP/CI clients keep working. Used by the production deployment.

NameSideDefaultPurpose
PENSIEVE_SUPABASE_URLSrequiredProject base URL, e.g. https://<ref>.supabase.co. JWKS is fetched under it.
PENSIEVE_SUPABASE_ANON_KEYSunsetPublishable anon key, served to the web login page via GET /v1/auth/config.
PENSIEVE_SUPABASE_JWT_SECRETSunsetLegacy HS256 shared secret. Unset → asymmetric JWKS validation (preferred).
PENSIEVE_SUPABASE_JWT_AUDSauthenticatedExpected aud claim.
PENSIEVE_SUPABASE_PROVIDERSSunsetOAuth buttons to render on the login page (e.g. google,github); enable them in Supabase too.
PENSIEVE_ADMIN_EMAILSSunsetComma-separated emails granted the pensieve admin role on sign-in.
PENSIEVE_ALLOWED_EMAIL_DOMAINSSunsetWhen set, only these email domains may sign in — guards projects with open signup.
PENSIEVE_SUPABASE_DEFAULT_ROLESreadRole for users matching neither the admin list nor an app_metadata.role claim.
PENSIEVE_SUPABASE_API_BASEChttps://api.supabase.comSupabase Management API base URL. Override in tests or private deployments. Used by pensieve deploy.
PENSIEVE_SUPABASE_OAUTH_CLIENT_IDCunsetOAuth app client id for the pensieve deploy browser OAuth flow against Supabase.
PENSIEVE_SUPABASE_OAUTH_CLIENT_SECRETCunsetOAuth app client secret for the pensieve deploy browser OAuth flow.

OIDC backend (PENSIEVE_AUTH_BACKEND=oidc)

Validates JWTs from any standards-compliant OIDC issuer (Okta, Auth0, Keycloak, etc.) and maps claims to pensieve roles.

NameSideDefaultPurpose
PENSIEVE_OIDC_ISSUERSSunsetComma-separated issuer URLs. Unset / empty disables OIDC.
PENSIEVE_OIDC_AUDIENCESpensieveRequired aud claim value.
PENSIEVE_OIDC_ROLE_CLAIMSpensieve_roleJWT claim to map to the pensieve role.
PENSIEVE_OIDC_SUBJECT_CLAIMSsubJWT claim to use as the pensieve username.
PENSIEVE_OIDC_DATABASES_CLAIMSpensieve_databasesJWT claim containing an allowlist of database names this token may access.

Ingest staging (group commit)

NameSideDefaultPurpose
PENSIEVE_STAGING_DISABLEDSunset (off)Set to 1 or true to disable group-commit. Each ingest request becomes one extent.
PENSIEVE_FLUSH_MAX_ROWSS8000Per-table flush trigger — row count.
PENSIEVE_FLUSH_MAX_BYTESS16777216Per-table flush trigger — bytes (16 MiB).
PENSIEVE_FLUSH_MAX_AGE_MSS50Per-table flush trigger — wall-clock age.
PENSIEVE_COMMIT_WINDOW_MSS5Commit-coordinator window. Flushes within this window land in one snapshot.
PENSIEVE_COMMIT_MAX_EXTENTSS128Maximum extents the coordinator collapses into a single snapshot.

Ingest rate limiting

Per-database token bucket on the ingest path. Off by default — set the rate to turn ingest overload into a 429 + Retry-After instead of unbounded queueing.

NameSideDefaultPurpose
PENSIEVE_INGEST_RATE_RPSS0 (off)Steady-state requests/sec per database. 0 or unset ⇒ unlimited.
PENSIEVE_INGEST_RATE_BURSTS2 × rpsToken-bucket burst cap (min 1). Only meaningful when PENSIEVE_INGEST_RATE_RPS is set.

Compaction, retention, GC

NameSideDefaultPurpose
PENSIEVE_COMPACTION_IDLE_SLEEP_MSSbin defaultSleep between work polls when the compaction queue is empty.
PENSIEVE_COMPACTION_POLL_SECSSbin defaultScheduler poll interval (seconds).
PENSIEVE_COMPACTION_MIN_EXTENTSSbin defaultMinimum extent count per (table, time-bucket) before compaction fires.
PENSIEVE_RETENTION_POLL_SECSSbin defaultRetention sweeper poll interval (seconds).
PENSIEVE_PHYSICAL_GC_POLL_SECSSbin defaultPhysical-delete worker poll interval (seconds).
PENSIEVE_PHYSICAL_GC_GRACE_SECSSbin defaultGrace period between soft-delete and hard-delete (seconds).
PENSIEVE_ARTIFACT_GC_POLL_SECSS300Poll interval for the artifact-retention sweeper + artifact-graph/content-index sync.
PENSIEVE_ARTIFACT_GC_GRACE_SECSSbin defaultGrace period before expired object-store artifacts are physically deleted.

All of these run only on job-running roles (all_in_one / worker); see Roles & scale-out.

File-drop

NameSideDefaultPurpose
PENSIEVE_FILEDROP_ENABLEDSunset1 or true enables the file-drop watcher.
PENSIEVE_FILEDROP_PREFIXESSingestComma-separated object-store prefixes to watch.
PENSIEVE_FILEDROP_PREFIXSunsetLegacy single-prefix form. PENSIEVE_FILEDROP_PREFIXES wins when both are set.
PENSIEVE_FILEDROP_POLL_SECSS5Watcher poll interval.
PENSIEVE_FILEDROP_DELETE_AFTER_INGESTSfalseDelete the source object after it commits. Off by default — replays remain idempotent.
PENSIEVE_FILEDROP_AUTO_CREATEStrueCreate the database + table on first sight.
PENSIEVE_FILEDROP_SCHEMA_EVOLVEStrueAdd new columns mid-batch.

Kafka

NameSideDefaultPurpose
PENSIEVE_KAFKA_ENABLEDSunset1 or true enables the Kafka consumer.
PENSIEVE_KAFKA_BROKERSSlocalhost:9092Comma-separated broker list.
PENSIEVE_KAFKA_GROUPSpensieve-ingestConsumer group id.
PENSIEVE_KAFKA_TOPICSSunsetComma-separated topic:database.table mappings. Required to enable.
PENSIEVE_KAFKA_BATCH_SIZES500Per-batch row count.
PENSIEVE_KAFKA_BATCH_TIMEOUT_MSS500Per-batch wall-clock timeout.

Data sources

NameSideDefaultPurpose
PENSIEVE_DATA_SOURCE_WORKERSS4Number of data-source-runner tasks. Also the fallback for PENSIEVE_FABRIC_WORKERS when unset.
PENSIEVE_DISCOVER_MAX_SOURCESSbin defaultCap on sources returned by the discovery endpoint.
PENSIEVE_GH_PATSunsetGitHub personal-access token injected into git clone credentials for private-repo data sources.

Per-data-source secrets are resolved through the EnvSecretStore — config values written as $env:VAR_NAME resolve to whatever std::env::var("VAR_NAME") returns at fetch time.

Credentials & OAuth

The typed credentials store (PATs, OAuth tokens, connection URLs) is encrypted at rest; the OAuth connect flow needs a public origin and a client app per provider.

NameSideDefaultPurpose
PENSIEVE_SECRET_KEYSunset (required for credentials)AES-256-GCM key for the credentials store. Base64 of 32 random bytes (openssl rand -base64 32); shorter values are SHA-256 stretched (dev only).
PENSIEVE_OAUTH_REDIRECT_BASEShttp://localhost:8080Externally reachable origin. Builds the provider redirect_uri (<base>/v1/oauth/<provider>/callback).
PENSIEVE_OAUTH_UI_RETURN_BASES= redirect baseWhere the callback sends the browser back to (the web UI origin).
PENSIEVE_OAUTH_<PROVIDER>_CLIENT_IDSunsetOperator client id. <PROVIDER>GOOGLE, NOTION, ATLASSIAN, SLACK.
PENSIEVE_OAUTH_<PROVIDER>_CLIENT_SECRETSunsetOperator client secret. A per-tenant bring-your-own app (set in the UI) takes precedence over these.

Worker fabric

The server-side job dispatch layer that routes work to registered worker nodes.

NameSideDefaultPurpose
PENSIEVE_FABRIC_WORKERSS4Goroutine-pool size for the fabric dispatcher. Falls back to PENSIEVE_DATA_SOURCE_WORKERS.
PENSIEVE_FABRIC_LEASE_SECSS300How long a job lease is held before the fabric considers it expired (5 minutes).
PENSIEVE_FABRIC_SWEEP_SECSS30How often the fabric sweeps for expired leases.
PENSIEVE_FABRIC_OFFLINE_SECSS90Seconds without a heartbeat before a node is marked offline.

Node daemon / local sync

Variables read by pensieve worker run (the fabric node daemon) and pensieve sync / pensieve worker install (the CC-memory sync service). These are client-side — the running server reads none of them.

NameSideDefaultPurpose
PENSIEVE_SERVER_URLCrequiredControl-plane URL. Required for pensieve worker run; also overrides the saved client endpoint for all pensieve subcommands.
PENSIEVE_TOKENCunsetBearer token override for all client subcommands (wins over ~/.pensieve/config.json).
PENSIEVE_WORKER_TOKENCrequiredNode authentication token minted by pensieve worker create. Required for pensieve worker run.
PENSIEVE_WORKER_INSECURECunsetSet to 1 to allow HTTP (non-TLS) connections from the node daemon to the server. Tokens ride this channel.
PENSIEVE_CC_SYNC_POLL_SECSC30Poll interval (seconds) for pensieve sync --watch and the background worker service.
PENSIEVE_CC_WATCHC0 (off)Set to 1 to enable the continuous CC-file sync watcher inside pensieve serve.
PENSIEVE_CC_FILE_SYNCC1 (on)Set to 0 to disable the Claude Code file-memory phase of sync entirely.
PENSIEVE_CC_SYNC_ON_MCPC1 (on)Set to 0 to skip the one-shot file sync that fires when the MCP server initialises.
PENSIEVE_CC_HOMEC~/.claudeRoot directory that pensieve treats as the Claude Code home (scans CLAUDE.md, projects/*/memory).
PENSIEVE_CLOUD_URLCunsetURL of the pensieve control plane to push/pull memories to. Unset → local-only sync.
PENSIEVE_CLOUD_TOKENCunsetBearer token for the cloud control plane.
PENSIEVE_SYNC_REALMCunsetMemory realm to sync to/from on the control plane. Unset → server default.
PENSIEVE_NO_UPDATE_CHECKCunsetSet to any value to suppress the background update-available nudge in pensieve status / pensieve version.

CC-memory curation

Knobs for the Claude Code memory curation pass (promotion and LLM-curated deduplication / staleness review).

NameSideDefaultPurpose
PENSIEVE_CC_CURATESC1 (on)Master switch. Set to 0 to disable all curation.
PENSIEVE_CC_PROMOTESC1 (on)Write high-importance memories back as native .md files for Claude Code to load.
PENSIEVE_CC_PROMOTE_MAXSC15Max number of memories promoted to files per project.
PENSIEVE_CC_PROMOTE_MIN_IMPORTANCESC0.6Minimum importance score a memory needs to be eligible for promotion.
PENSIEVE_CC_QUIET_WINDOWSC300Seconds of inactivity before a promotion pass is allowed (prevents churn during edits).
PENSIEVE_CC_LOCK_TTLC300Seconds before a stale curation lock is forcibly released.
PENSIEVE_CC_STALE_DAYSSC90Age in days before a memory is considered stale for LLM review.
PENSIEVE_CC_DUP_COSINESC0.90–0.97 bandCosine-similarity range where duplication is plausible but not certain — the model decides.

Agentic memory

NameSideDefaultPurpose
PENSIEVE_MEMORY_ASYNCSC1 (on)0 makes memory writes synchronous (blocks until the embedding + save complete).
PENSIEVE_MEMORY_QUEUE_DURABLESC0 (local) / 1 (server)1 persists the in-flight memory queue to the catalog so it survives restarts. Defaults on for the server binary, off for local/stdio.
PENSIEVE_MEMORY_CONSOLIDATIONS1 (on)0 disables the background memory-consolidation worker.
PENSIEVE_MEMORY_CONSOLIDATION_POLL_SECSSbin defaultPoll interval for the memory consolidation background task.
PENSIEVE_SESSION_SUMMARY_EVERYS12Refresh the rolling session summary every N turns.
PENSIEVE_CI_CORRELATES1 (on)0 disables the CI failure-correlation pipeline (writes recurring-failure memories).
PENSIEVE_CI_CORRELATE_POLL_SECSSbin defaultPoll interval for the CI-correlation pipeline.
PENSIEVE_FILE_PROMOTES1 (on)0 disables the file-candidate promotion pipeline (stitches contributed File nodes to live repo nodes).
PENSIEVE_FILE_PROMOTE_POLL_SECSSbin defaultPoll interval for the file-promotion pipeline.
PENSIEVE_MEMORY_PPRS0 (off)1/true rescores recall with personalized PageRank over the memory graph (else hop-decay proximity). Capability is shipped; enabling-by-default is gated on benchmark uplift.
PENSIEVE_MEMORY_CLASS_DECAYS0 (off)1/true applies memory-class-aware recency decay (episodic short half-life, semantic invalidation-only). Default keeps the uniform recency term.

The consolidation / CI-correlate / file-promote pipelines run only on job-running roles (all_in_one / worker); see Roles & scale-out.

Agent

NameSideDefaultPurpose
PENSIEVE_AGENT_MCP_URLSauto (derived from HTTP addr)Override the MCP endpoint the agent routes tool calls to. off disables.
PENSIEVE_OLLAMA_HOSTShttp://localhost:11434Ollama host the server-side agent uses.

Embeddings

For dense-vector ingestion + nearest-neighbour scan. Selects the embedding backend at startup.

NameSideDefaultPurpose
PENSIEVE_EMBED_PROVIDERSCfastembedOne of fastembed, ollama, openai-compat, gemini.
PENSIEVE_EMBED_MODEL_IDSCprovider-specific (e.g. bge-small-en-v1.5)Model id passed to the provider.
PENSIEVE_EMBED_BASE_URLSCprovider-specificBase URL for HTTP-based providers (Ollama, OpenAI-compat).
PENSIEVE_EMBED_MODEL_PATHSCunsetLocal model path for fastembed (overrides id).
PENSIEVE_EMBED_API_KEY_ENVSCOPENAI_API_KEYEnv var to read the API key from (for openai-compat).

gemini reads the API key from GOOGLE_API_KEY (fixed).

Cross-encoder reranker

Optional final reranking stage for hybrid search + memory recall. Off unless PENSIEVE_RERANK_MODEL is set; when configured, the top fused results are re-scored by a cross-encoder before returning.

NameSideDefaultPurpose
PENSIEVE_RERANK_MODELSCunsetfastembed reranker model id (e.g. bge-reranker-base). Unset ⇒ no reranking.
PENSIEVE_RERANK_MODEL_PATHSCunsetLocal model path override for the reranker.
PENSIEVE_RERANK_POOL_SIZESC1Number of reranker inference instances (parallel ONNX sessions).
NameSideDefaultPurpose
PENSIEVE_ICON_GALLERYSunsetPath to a JSON file that extends or overrides the built-in icon gallery ({"kinds":{...},"vendors":{...}}).

Debug / verbose flags

These are CLI-side flags that increase output verbosity for specific operations. They are not set in production.

NameSideDefaultPurpose
PENSIEVE_INGEST_VERBOSECunsetPrint per-row ingest detail from pensieve ingest push.
PENSIEVE_DISTILL_VERBOSECunsetPrint distillation progress from pensieve distill.

Logging

tracing-subscriber reads the standard RUST_LOG env var. The default filter is info,sqlx=warn,hyper=warn,h2=warn.

An open-source project · MIT licensed.