Memory Configuration
Ce contenu n’est pas encore disponible dans votre langue.
Askimo keeps track of everything you say in a conversation so the AI can answer follow-up questions and recall earlier context. For long sessions this history grows large and eventually uses more tokens than the model can fit in one request. Askimo handles this automatically by summarizing older parts of the conversation — but how aggressively it does so is configurable.
How Conversation Memory Works
Section titled “How Conversation Memory Works”Every chat message is stored in memory and sent to the AI with each new request. When the accumulated history approaches the model’s context-window limit, Askimo:
- Protects the most recent messages so the AI always has full-fidelity context for the current exchange.
- Summarizes a batch of older messages into a compact structured summary (key facts, main topics, recent context).
- Replaces the raw messages with the summary, freeing token budget for new content.
This summarization cycle repeats automatically. The memory mode controls how early and how aggressively each cycle fires.
flowchart TD A([User sends a message]) --> B[Add to conversation history] B --> C{Token count above\nsummarization threshold?} C -- No --> D[Send full history to AI] D --> E([AI responds]) C -- Yes --> F[Protect N most-recent turns\nverbatim] F --> G[Summarize oldest batch\ninto key facts + topics] G --> H[Replace raw messages\nwith structured summary] H --> DMemory Modes
Section titled “Memory Modes”Askimo ships with three presets. Selecting a mode replaces the entire memory configuration with that preset’s values.
There is no universally best mode — every choice involves a trade-off between how much you pay (tokens), how much the AI remembers verbatim, and how long your sessions can run before the context window fills up. The right mode depends on your model, session length, and what kind of accuracy you need.
Compact
Section titled “Compact”Summarization fires early and prunes aggressively. Older messages are compressed quickly, which keeps token usage low and allows very long sessions to continue without hitting context limits. The downside is that nuance and exact wording from earlier in the conversation are lost sooner — the AI works from summaries rather than verbatim history. Good for brainstorming, research, or long-running tasks where the overall direction matters more than recalling specific earlier phrasing.
Balanced
Section titled “Balanced”The default. Summarization fires at a moderate threshold and prunes a reasonable fraction each cycle. You get a meaningful amount of verbatim history at the cost of moderate token usage. This mode works well for most everyday conversations and is the safest starting point if you are unsure which mode to pick.
Detail
Section titled “Detail”Summarization fires late and prunes conservatively. The AI holds more of the conversation verbatim for longer, which improves accuracy on follow-up questions and reduces the chance of the AI misremembering something you said earlier. The trade-off is higher token consumption per request and shorter maximum session length before the context window fills. Best suited for coding sessions, technical deep-dives, or any task where exact recall of earlier messages matters.
| Mode | Token Cost | Context Quality | Best For |
|---|---|---|---|
| Compact | Low | Less detail | Long sessions, cost-sensitive or rate-limited models |
| Balanced | Medium | Good trade-off | General use — the default |
| Detail | High | High fidelity | Short sessions, coding, precise recall |
Preset values
Section titled “Preset values”| Parameter | Compact | Balanced | Detail |
|---|---|---|---|
| Summarization threshold | 25 % | 40 % | 60 % |
| Protected recent turns | 3 | 6 | 10 |
| Summarization prune fraction | 80 % | 65 % | 50 % |
| Max key facts | 15 | 30 | 50 |
| Max main topics | 8 | 15 | 25 |
| Max summary length | 1 000 chars | 2 000 chars | 4 000 chars |
| Memory budget fraction | 30 % | 40 % | 50 % |
Change Memory Mode
Section titled “Change Memory Mode”- Open Settings from the sidebar.
- Select Advanced.
- Find the Memory Mode dropdown.
- Choose Compact, Balanced, or Detail.
- The change takes effect immediately — no session restart required.
Parameter Reference
Section titled “Parameter Reference”Summarization Threshold
Section titled “Summarization Threshold”The fraction of the memory budget at which a summarization cycle is triggered.
- Lower → fires earlier, keeps token usage flat, more frequent AI summarization calls
- Higher → fires later, allows more verbatim history but risks hitting the context limit
Example: 0.40 means summarization starts when the in-memory token count reaches 40 % of the allocated memory budget.
Protected Recent Turns
Section titled “Protected Recent Turns”The number of most-recent message pairs (user + assistant) that are never included in a summarization batch. They are always sent to the AI verbatim, ensuring the current exchange always has full context.
Summarization Prune Fraction
Section titled “Summarization Prune Fraction”The fraction of eligible (non-protected) messages that are compressed and removed in each summarization cycle, oldest first.
- Higher → more messages pruned per cycle, more breathing room before the next trigger
- Lower → lighter pruning, cycles happen more frequently
Max Key Facts
Section titled “Max Key Facts”The maximum number of distinct facts tracked in the structured summary. Facts are stored with LRU-by-relevance eviction: facts that reappear in recent cycles stay; facts not seen recently are dropped when the cap is exceeded.
Max Main Topics
Section titled “Max Main Topics”The maximum number of distinct topic labels tracked across summary merges. The most recently observed topics are kept; older ones that no longer appear are dropped.
Max Summary Length
Section titled “Max Summary Length”Character cap for the fallback extractive summary used when AI summarization is unavailable (network error or no utility model configured). This is plain text and requires no AI call.
Memory Budget Fraction
Section titled “Memory Budget Fraction”The fraction of the model’s total context window reserved for conversation history. The remaining window is split between the live request and the AI response.
Example: 0.40 on a 128 K-token model allocates ≈ 51 200 tokens to history.
Troubleshooting
Section titled “Troubleshooting”The AI forgot something from earlier in the conversation
Section titled “The AI forgot something from earlier in the conversation”This is expected behaviour when the memory is in Compact mode or when a long session has triggered many summarization cycles. Verbatim messages are replaced with structured summaries over time.
To reduce memory loss:
- Switch to Detail mode for sessions that need precise recall.
- Keep sessions shorter and open a new chat for unrelated topics.
Summarization is happening too frequently
Section titled “Summarization is happening too frequently”There are two common causes:
The memory mode is too aggressive for your use case. Try switching to Balanced or Detail mode. Detail raises the summarization threshold and prunes less per cycle, so the AI holds more verbatim history before compressing.
Your local model has a small default context window. Providers like Docker Model Runner and LM Studio often default to a low context window (e.g. 2 048 or 4 096 tokens) even when the underlying model supports much more. Askimo calculates the memory budget from this reported window — if it is small, the threshold is hit quickly and summarization fires constantly.
To fix this, increase the context window in the provider’s settings:
- LM Studio: In the model settings panel, find Context Length and raise it (e.g. to
32768or higher, up to the model’s maximum). - Docker Model Runner: Pass
--context-sizewhen starting the model, or set it in the run configuration. - Ollama: Set
num_ctxin aModelfileor pass it as a parameter when running the model.
After increasing the context window, restart the provider and reload Askimo. Summarization should fire less often.
Summarization never fires even in long sessions
Section titled “Summarization never fires even in long sessions”Check that a Utility Model is configured for your active AI provider (see AI Model Configuration). Askimo uses the utility model to run summarization. If none is set, it falls back to a basic extractive summary capped at the Max Summary Length value.