Context Platform
Documentation

Version Latest

Context settings reference

Every environment variable of the Context Platform, with defaults, bounds and what happens when a value is invalid.

The Context Platform is configured on the Govern server with environment variables. All are optional. A configuration error never stops the server: retrieval answers 503 context.misconfigured, or only the affected feature's routes answer 503, as noted below. GET /api/v1/context/status (organisation administrators) shows configurationValid.

No embeddings endpoint is configured by default: search is full-text only.

VariableDefaultMeaning
KEYSTONE_CONTEXT_EMBEDDINGS_URLunsetOpenAI-compatible base URL (.../v1); unset means full-text only
KEYSTONE_CONTEXT_EMBEDDINGS_MODELnoneModel name; required with the URL
KEYSTONE_CONTEXT_EMBEDDINGS_DIMENSIONSnoneVector size, 1 to 65536; required with the URL; every response is checked
KEYSTONE_CONTEXT_EMBEDDINGS_API_KEYunsetBearer key
KEYSTONE_CONTEXT_EMBEDDINGS_SEND_DIMENSIONStrue sends dimensions in the request
KEYSTONE_CONTEXT_EMBEDDINGS_EXTERNALautomatictrue: the endpoint is outside the deployment; false: inside. Unset: external unless the host is loopback or in the internal hosts list
KEYSTONE_CONTEXT_EMBEDDINGS_INTERNAL_HOSTSemptyHosts that count as inside the deployment: names, *.suffix, IPs or CIDRs, comma-separated
KEYSTONE_CONTEXT_EMBEDDINGS_BATCH_SIZE64Inputs per request, 1 to 2048
KEYSTONE_CONTEXT_EMBEDDINGS_MAX_RETRIES4Retries after 429, 5xx or a transport error, 0 to 10
KEYSTONE_CONTEXT_SEARCH_BACKENDsqlsql (exact cosine in SQL) or pgvector (needs the extension; missing, retrieval fails closed)
KEYSTONE_CONTEXT_IVFFLAT_PROBES10Probes of the pgvector backend, 1 to 100
KEYSTONE_CONTEXT_LEVEL_WEIGHTSbuilt-inDefault level weights, level=weight,... (subproject, project, team, department, bu, org, group, user)

Confidential and restricted content is never sent to an external endpoint, whatever these settings say. See Retrieval.

Indexing and GitHub

VariableDefaultMeaning
KEYSTONE_CONTEXT_CHUNK_MAX_TOKENS400Chunk size; 0 turns the indexer off (adding or re-indexing content then answers 503 context.indexer.not_configured)
KEYSTONE_CONTEXT_DEFAULT_EXCLUDESbuilt-in listPath patterns excluded from every codebase source; replaces the default list; none for no default exclusions
KEYSTONE_CONTEXT_GITHUB_HOSTSgithub.comAllowed GitHub hosts, comma-separated; add your GitHub Enterprise host
KEYSTONE_CONTEXT_GITHUB_APP_SECRET_PATHsecret/data/keystone/context/github-appKeystone Vault KV version 2 path of the organisation's GitHub App secret

Collaboration

VariableDefaultMeaning
KEYSTONE_CONTEXT_LENSES_PER_OWNER500Live lenses one person owns (1 to 100,000)
KEYSTONE_CONTEXT_LENSES_PER_ORG20,000Live lenses of one organisation, system lenses excluded (1 to 1,000,000)
KEYSTONE_CONTEXT_SNAPSHOTS_PER_HOUR200Snapshots one person creates per hour (1 to 10,000)
KEYSTONE_CONTEXT_PENDING_SHARE_TTL14 daysLifetime of a share waiting for approval, 1 hour to 30 days; a malformed value turns pending shares off
KEYSTONE_CONTEXT_TARGETS_PER_MINUTE30Share target lookups per person
KEYSTONE_CONTEXT_PROJECT_LOOKUPS_PER_MINUTE60Project lookups per person (1 to 600); a malformed value keeps the default

Team memory

VariableDefault
KEYSTONE_CONTEXT_MEMORY_MAX_UPDATE_BYTES65536
KEYSTONE_CONTEXT_MEMORY_MAX_TEXT_BYTES65536
KEYSTONE_CONTEXT_MEMORY_MAX_UNITS262144
KEYSTONE_CONTEXT_MEMORY_MAX_UPDATES_PER_ENTRY50000
KEYSTONE_CONTEXT_MEMORY_UPDATES_PER_MINUTE240
KEYSTONE_CONTEXT_MEMORY_ENTRIES_PER_SPACE5000
KEYSTONE_CONTEXT_MEMORY_COMPACT_AFTER256

Meanings are on Team memory.

Real-time feed

A malformed value turns only the feed and presence routes into 503 context.events.unavailable. Durations use Go syntax (30s, 15m).

VariableDefaultMeaning
KEYSTONE_CONTEXT_EVENTS_MAX_CONNS_PER_USER5Open streams per user and replica
KEYSTONE_CONTEXT_EVENTS_MAX_CONNS_PER_ORG200Open streams per organisation and replica
KEYSTONE_CONTEXT_EVENTS_BACKLOG_MAX1000Most events a resume replays
KEYSTONE_CONTEXT_EVENTS_RETENTION24hHow long events stay replayable (1m to 720h)
KEYSTONE_CONTEXT_EVENTS_KEEPALIVE10sKeep-alive comment interval
KEYSTONE_CONTEXT_EVENTS_HEARTBEAT30sHeartbeat event interval
KEYSTONE_CONTEXT_EVENTS_REFRESH10sAuthorisation re-check interval (the revocation bound)
KEYSTONE_CONTEXT_EVENTS_BUFFER1024Events queued per stream before a slow client is dropped
KEYSTONE_CONTEXT_EVENTS_WRITE_TIMEOUT10sLongest a write to a client may block
KEYSTONE_CONTEXT_EVENTS_MAX_AGE15mLifetime of one stream
KEYSTONE_CONTEXT_EVENTS_POLL2sFallback poll interval
KEYSTONE_CONTEXT_PRESENCE_TTL30sLifetime of a presence entry between heartbeats

Work registry

A malformed value turns only the registry's routes into 503 context.work.unavailable.

VariableDefault
KEYSTONE_CONTEXT_WORK_TTL15m
KEYSTONE_CONTEXT_WORK_PAUSED_TTL24h
KEYSTONE_CONTEXT_WORK_MAX_ITEMS_PER_USER25
KEYSTONE_CONTEXT_WORK_MAX_ITEMS_PER_ORG5000
KEYSTONE_CONTEXT_WORK_MAX_AREAS200
KEYSTONE_CONTEXT_WORK_CHECKS_PER_MINUTE60
KEYSTONE_CONTEXT_WORK_RETENTION_DAYS400
KEYSTONE_CONTEXT_WORK_RECONCILE@every 1m (off disables the abandonment job)
VariableMeaning
NI_OBSERVABILITY_SIGNING_KEYKeys the HMAC evidence chain that holds retrieval attributions. Required; keep it stable
KEYSTONE_MODELS_CONTEXT_LINK_WAIT_MSHow long the model gateway waits for a retrieval's attribution record before answering not_found (default 750, 0 to 10000)

Last reviewed 17 October 2026View as Markdown

Context settings reference · Docs · Neural Inverse