Context Memory
6 min read
This feature is currently in BETA with release 2026.32. It may change significantly before general availability. Documentation may lag behind feature updates. Use in production environments at your own discretion. Context Memory requires activation via feature flag (see Feature Flags below).
For the end-user explanation of context memory and its behavior in chat, see Context Memory in Unique AI Chat.
Functionality
Context Memory gives every user a single, persistent memory profile shared across all chats and all Unique AI spaces where the feature is enabled. The profile is a compact, structured Markdown file that captures durable user context: identity, communication preferences, work context, skills, recent topics, and open follow-ups.
The Unique AI orchestrator loads the profile before a turn and maintains it after the answer:
Load. A Loading context memory step is opened in the chat, and the orchestrator resolves the user's private memory folder and downloads
memory.mdif present. A profile already within the configured token budget is used unchanged; an oversized profile is first condensed by a language-model call and only hard-truncated if it is still too large. If the folder or file cannot be resolved, the turn continues without memory. If the load fails outright, the step is closed as failed and the turn still continues without memory.Inject. Non-empty memory is injected verbatim into the system prompt under “What I know about you”. If no profile exists yet, this section is omitted.
Answer. The assistant can use the profile to adapt tone, examples, and depth. It cannot update memory during the answer.
Memory Update. When an update of the user memory is required, a postprocessor starts and sends the existing profile and latest user/assistant exchange to the effective memory model, which returns an updated rewritten profile.
Storage Model and Access Control
Memory profiles are stored in the company Knowledge Base as Markdown:
user-memory/ ← company-wide root folder (auto-provisioned)
<userId>/ ← private per-user folder (created on first use)
memory.md ← the user's single memory profileLevel | Access |
|---|---|
| Created automatically when a space admin enables context memory. The company Root Group is granted READ and WRITE, but not MANAGE, so users can create private child folders. |
| Created on demand with access inheritance disabled. The owning user receives access; Root Group access on the parent does not flow into the child. Other users cannot read the profile. |
| Uploaded with |
Because there is exactly one memory file per user, every enabled space loads the same profile. Memory belongs to the user, not to a space or chat.
Memory Profile Format
The profile has YAML frontmatter followed by six fixed Markdown sections in the order below. Empty sections use _(empty)_.
Example memory.md
---
user_id: user_123
schema_version: 1
last_updated: 2026-06-17T12:00:00+00:00
turn_count: 12
---
# User Memory
## Identity
- Works as a credit risk analyst at a Swiss private bank, based in Zurich (CET).
- Native German speaker; communicates with the assistant in English.
## Communication Preferences
- Prefers concise answers with concrete examples.
- Wants tables for numeric comparisons instead of prose.
## Work Context
- Preparing the quarterly IFRS 9 impairment report.
- Migrating team reporting from Excel to a Python-based pipeline.
## Skills & Expertise
_(empty)_
## Recent Topics
- 2026-06-17 11:40 UTC: Discussed expected-credit-loss staging rules.
## Follow-ups
- Wants to revisit the scenario-weighting approach next week.
Frontmatter Fields
Field | Meaning |
|---|---|
| The owning user's ID. Preserved across automatic rewrites and hidden from the in-product editor. |
| Profile schema version, currently |
| UTC timestamp of the last automatic consolidation that changed the profile. |
| Incremented by one on each automatic rewrite. |
Sections and Their Meaning
Section | What it captures |
|---|---|
| Stable facts such as name, role, employer, team, timezone, and language. |
| Preferred style, formatting, depth, tone, language, and examples. |
| Current focus areas, active projects, multi-week goals, and deadlines. |
| Competences, tools, languages, and proficiency levels. |
| Recently discussed subjects, dated with |
| Explicit hand-offs and topics the user wants to revisit. |
Configure Context Memory for a Space
Context memory is configured per space and applies to Unique AI spaces.
Enable the feature flag.
FEATURE_FLAG_ENABLE_CONTEXT_MEMORY_UN_22033must be enabled for the company.Open the Space configuration and go to the Configuration step, where the Context memory switch sits alongside the other general space settings. The switch is hidden entirely while the feature flag is off.
Toggle “Context memory”. Newly created spaces start with the switch on while the feature flag is enabled. For every space the setting is opt-in at runtime: an absent key means memory stays off until the space is saved with the switch on.
Save the space. When memory is effectively enabled, the admin app ensures the company-wide
user-memoryroot exists.
Interaction with Web Search
Context memory and Web Search are mutually exclusive by default. If Web Search is enabled for the space, the Context memory switch is disabled with this tooltip:
Context memory is unavailable while web search is enabled, to keep user data out of external search queries.
Operators can lift the restriction per company with ALLOW_CONTEXT_MEMORY_WITH_WEB_SEARCH_UN_22591. This is an operator environment setting, not a configuration-backend registry flag, and must be set consistently on node-chat and admin-app.
User-Level Opt-Out
Each user controls context memory in Settings → Context Memory. Disabling it sets the user's allowUserMemory preference to false, so memory is neither loaded nor updated in any space for that user.
Current behavior: disabling does not delete the stored memory.md. Re-enabling makes the existing profile available again. The current settings copy that promises permanent deletion does not match the implementation.
Viewing and Editing a Profile
When enabled, Settings → Context Memory loads the authenticated user's existing memory.md. When no profile exists yet, opening the page seeds an empty one, creating the private user folder and an empty memory.md, as long as the company user-memory root can be resolved or the caller is a chat admin who can provision it. If the root is missing and the caller is not a chat admin, nothing is created and the page shows the empty state.
Effective Enablement
Context memory is active for a turn only when every applicable condition below holds:
Condition | Level | Default |
|---|---|---|
| Operator | Off |
Space | Space admin | On for newly created spaces while the feature flag is on; an absent key means off |
Web Search disabled, or | Space admin / operator | Web Search blocks memory |
User | End user | Enabled |
Advanced Configuration
Consolidation is configured per space under Unique AI Services → Context Memory in the assistant's advanced module configuration.
Setting | Default | What it controls |
|---|---|---|
Use Orchestrator Language Model |
| Uses the orchestrator model for the gate, consolidation, condensation, and matching tokenization. When false, the configured Language Model is used. |
Language Model |
| Used when Use Orchestrator Language Model is false. |
Max Tokens |
| Maximum runtime profile size. Oversized profiles are condensed and then hard-truncated if necessary. |
Consolidation Gate Enabled |
| Runs a cheap |
Token Usage and Analytics
Every language-model call the feature makes is attributed to its own invocation source, so memory cost can be separated from the cost of the answer itself:
Invocation source | When it runs |
|---|---|
| The |
| The full profile rewrite. |
| Condensing a stored profile that is already over budget when it is loaded. |
| Condensing a freshly rewritten profile that came back over budget. |
Each turn also records a context_memory_updated analytics flag: unset when the postprocessor did not run, false when it ran without writing, and true when a changed profile was uploaded.
Limitations
One memory per user, company-wide. There is no per-space or per-chat profile.
Not editable during a response. Automatic updates occur after the final answer. Users can separately edit and save the profile in Settings.
Web Search exclusivity. The features are mutually exclusive by default.
Token budget. Older or low-signal material can be compacted or dropped.
Opt-out is not deletion. The current implementation retains the file when the user disables memory.
Feature Flags and Company Settings
Name | Default | Effect |
|---|---|---|
|
| Per-company master switch from the feature-flag registry. It enables the space toggle, user Settings tab, and |
|
| Operator environment override that allows memory and Web Search together. Accepts |