Skip to content

Configuration Reference ​

All settings can be specified via environment variables or a .env file.

Core Settings ​

VariableTypeDefaultDescription
DATABASE_URLstringpostgres://...Connection URL for PostgreSQL 17 + pgvector
HTTP_PORTint8090HTTP port for REST, Web UI, and MCP endpoints
AUTH_DIRpath/data/authDirectory storing session token JSON files
MEDIA_DIRpath/data/mediaRoot content-addressed store for media attachments
DOSSIER_DIRpath/data/dossiersDirectory where Markdown dossiers are saved

Ingestion & Pipeline Settings ​

VariableTypeDefaultDescription
DEBOUNCER_IDLE_MINUTESint30Idle silence before triggering reconciliation
ENABLE_READ_RECEIPT_HEURISTICbooltrueInferred delivery receipts for SMS threads
PULL_FULL_SIZE_MEDIAboolfalseRequest full-resolution media before OCR
BACKFILL_BATCH_SIZEint100Pagination batch size for historical backfill

Connection Scheduling (SYNC-01) ​

SYNC_MODE selects how the daemon holds the Google Messages session. Real-time ingestion requires a live connection; periodic mode connects only during a short window so the phone is not held "connected" all day.

VariableTypeDefaultDescription
SYNC_MODEstringcontinuouscontinuous (always connected) or periodic (connect per window)
SYNC_INTERVAL_MINUTESint30Minutes between the start of one periodic sync round and the next
SYNC_WINDOW_MINUTESint5Minutes the connection stays open each round before disconnecting
GM_PING_INTERVAL_MINUTESint5Ditto ping interval (libgm accepts 1..240)
GM_ALERT_TIMEOUT_COUNTint2Missed pings before the phone is marked unresponsive

Disconnecting does not clear the session cookie, so the same session.json resumes on the next round. In periodic mode the daemon runs one historical backfill pass at startup and then a forward drain per window.

Model & Vision Settings ​

VariableTypeDefaultDescription
OPENAI_API_KEYstring""API key for OpenAI / OpenRouter endpoints
OPENAI_BASE_URLstringhttps://api.openai.com/v1OpenAI-compatible endpoint URL
VISION_MODELstringgpt-4o-miniVision model used for image OCR and descriptions
EMBEDDING_MODELstringtext-embedding-3-small1536-dimension embedding model for sessions

MCP & Security Settings ​

VariableTypeDefaultDescription
ENABLE_MCP_SEND_MESSAGEboolfalseFail-closed guard: enables outbound send_message tool
NOTIFY_ON_PHONE_DISCONNECTboolfalseSends push alerts on phone disconnect
NOTIFY_PHONE_DISCONNECT_GRACE_MINUTESint15Debounce window before alerting on disconnect

Testing & Live Verification (HARN-03) ​

The default test run is hermetic. The internal/gm package installs a deny-all HTTP transport through the libgm constructor seam, so any accidental outbound request fails the run with a hermetic network guard (HARN-03) error.

CommandPurposeNetwork
make testHermetic unit, boundary, and race suiteBlocked
make test-liveReal Google registration / Gaia pairing smoke testsRequired
make test-live-compileCompile-checks the live-tagged tests without running themNot used

Test-only environment variables (never required at runtime):

  • GM_ALLOW_NETWORK=1 — disables the hermetic guard so live tests can reach the network.
  • LIVE_GM_TEST=1 — explicit opt-in gate for tests tagged //go:build live.
  • SESSION_PATH — session file used by the live pairing test (avoids clobbering the daemon session).

Released under AGPL-3.0 License.