Memory and Context
Configure cross-conversation memory graphs, background extraction, and tiered context management for long conversations
Clouisle solves conversation continuity and cost with two layers:
- In-conversation context (message branches + tiered compression): the live history during a conversation. When the assembled request exceeds budget, earlier history is summarized, completed tool results fold into readable references, and tools are discovered on demand, keeping the model window from overflowing.
- Cross-conversation memory graph (Memory Graph): a persistent knowledge network across conversations, capturing user preferences, project background, and core facts as entities and directed relations.
Compression produces a model view, not a replacement for stored history: original messages and tool records remain. Memory itself is an entity/relation graph, not an accumulation of raw conversation text.
Enable Cross-Conversation Memory
- Open the Agent orchestration > Memory.
- Turn on Enable memory (off by default).
- Set the maximum memories per retrieval, range
1-50, default10. - Optionally turn on Automatic memory extraction (on by default).
- Save and publish the Agent. As users talk in different conversations, the Agent recalls previously recorded facts.
| Setting | Default | Range | Description |
|---|---|---|---|
| Max memories per retrieval | 10 | 1-50 | Maximum entities injected into the model per memory retrieval |
| Automatic extraction | On | On/off | Whether memories are extracted and saved from conversations automatically; when off, memory is read-only |
| Importance threshold | Medium | Low / Medium / High | Automatic extraction only saves content meeting this importance |

Memory Graph
Persistent memory is not flat text; it is a directed knowledge network of entities and relations.
Explore and manage it under the personal menu > My memory (/app/memories) or in the admin console (/memories).

Entity types
Ten entity types are predefined to categorize memory content:
| Entity type | Description | Example |
|---|---|---|
| Preference | A personal preference or habit | "Prefers concise code style", "Usually writes TypeScript" |
| Project | A project in progress or joined | "E-commerce rebuild", "Internal knowledge base" |
| Person | A person or role mentioned | "Manager Zhang (product owner)" |
| Organization | A company, department, or team | "R&D department", "Vendor A" |
| Skill | A technology or expertise | "Python", "PostgreSQL performance tuning" |
| Goal | A stage goal or intent | "Ship docs-site i18n this quarter" |
| Fact | An objective fact or specific detail | "Production cluster runs in Tokyo" |
| Concept | A domain concept or term | "RAG hybrid retrieval" |
| Location | A place or physical location | "Shanghai Zhangjiang office" |
| Custom | Anything that does not fit the others | User-defined fact labels |
Relation types
Entities can be linked by nine directed relation types, used to follow related memories:
| Relation type | Meaning |
|---|---|
| Prefers | Prefers something |
| Uses | Uses a tool or technology |
| Works on | Works on or participates in something |
| Works at | Works at an organization |
| Knows | Knows a person or technology |
| Part of | Belongs to a higher-level entity |
| Has goal | Has a certain goal |
| Located in | Is located at a place |
| Related to | Is related to something |
Graph management
- Multiple layouts: grid, hierarchical, and radial layouts, with zoom in, zoom out, and fit view.
- Entity search and filtering: search entity names and descriptions by keyword, or filter by one or more entity types.
- Relation drawer: click an entity to see its outgoing and incoming relations, edit its properties directly, or delete a specific directed relation.
- Bulk and safe deletion: use select mode to delete stale or sensitive entities in bulk; deleting an entity also removes all of its relations.
Memory Retrieval and Recency
When an Agent retrieves memories, it weighs both semantic similarity and recency: semantically close memories that were updated recently rank higher. By default a memory not updated for about 30 days has half the weight; newer memories are more likely to be recalled.
- Filter by time: retrieve only memories created or updated within the last N days — useful for questions like “what did we discuss last week”.
- Expand by relation: after a hit, expand outward 1-3 levels along relations (default 1), starting from at most 5 entities, with direction limited to incoming relations, outgoing relations, or both. Only relations that actually exist are returned; the model does not infer missing links and does not create entities this way.
- Filter by type: retrieve only one kind of entity, such as preferences or projects.
With Automatic memory extraction off, the Agent can only search and read existing memories and never writes new entities or relations.
Background Extraction (Admin)
Administrators configure background memory extraction under Site settings > Memory (/site-settings/memory):
| Setting | Default | Constraint | Description |
|---|---|---|---|
| Background extraction | Off | On/off | Global switch for asynchronous background extraction |
| Extraction model | Empty | An enabled language model | The model that performs extraction; blank uses the default fallback model |
| Cooldown | 180 seconds | 10-3600 seconds | Minimum interval between extractions to avoid repeated triggers in one conversation |
| Pending turn threshold | 6 turns | 1-50 turns | Extraction starts as soon as this many user turns are pending |
The Agent must have both Enable memory and Automatic memory extraction checked in its orchestration, and the site-level background extraction switch must be on, before conversations with that Agent queue background extraction.
How Long Conversations Compress
Context compression is on by default. The goal is not to delete history but to give the model a view that fits the window without losing the task. Original messages, tool calls, and results remain in the conversation; compression only changes what the current request contains.

| Setting | Default | Range | Description |
|---|---|---|---|
| Enable context compression | On | On/off | When off, requests are not trimmed and an over-window request fails |
| Summary token budget | 1000 | 128-8000 | Target size of the history summary; larger keeps more detail but leaves less room for the conversation |
| Show compression progress | On | On/off | Emits compression start/end events to the chat stream; off compresses silently |
Tiered order
- History summary: older turns are summarized into one entry that replaces the original history; the latest turn and unfinished tool calls are never split.
- Active-round compaction: results from repeated tool calls in the same round are folded by group, keeping the tool name, status, and a readable reference.
- Result readback: folded tool results are not deleted. The model can call a read tool to fetch part of the original result instead of loading everything at once.
- On-demand tool discovery: with many tools, only a necessary subset is exposed first; the model can search and load other authorized tools. Unauthorized tools are never discovered or executed.
- Provider overflow retry: when estimates differ from the provider count, a bounded reduction retry happens before streaming starts, and completed side effects are not replayed.
Behavior boundaries
- Original records stay: messages, tool arguments, and results remain in the conversation; refreshing or reviewing history loses nothing.
- Consistent recovery: after a pause (question or tool confirmation) or a worker restart, the same model view is rebuilt without re-running completed calls.
- Explicit failure: if non-compressible content such as user instructions or pending calls still cannot fit, the turn fails with a clear error instead of silently dropping it.
- Branch isolation: editing a message or switching versions compresses only the active branch; older branch records never leak in.
- Visible usage: compression events show before/after token estimates, and persisted records remain visible after history reload.
Compression only affects the current request; it never deletes history. Long-term facts across conversations belong to the memory graph, which is a separate mechanism.
Troubleshooting
- Preferences are not remembered: confirm the Agent has memory enabled, the information meets the importance threshold, and you use the same signed-in user.
- Replies ignore early details: a long conversation may have compressed early history into a summary; restate the key constraints or start a new conversation.
- Compression happens too often: check the model's context window, output reserve, and tool result sizes; large tool outputs fill the budget faster.
- The memory graph contains a wrong fact: go to
/app/memories, search for the entity, click Edit to fix the description, or Delete it. - The same fact is recorded repeatedly: check the site background-extraction switch and the Agent's automatic extraction setting; with extraction off, memory is read-only.
Related: Conversations and chats, Attachments and media, Memories API.
How is this guide?