← All patterns
Context & Memory
Deciding what the model sees this turn, and what survives to the next one.
5 patterns
Context Budgeting
Give every component of the prompt an explicit token allocation and enforce it, instead of letting whatever arrives first fill the window.
8 minaka context allocation
Progressive Summarization
Compress the oldest part of a conversation into a structured summary when it crosses a threshold, keeping recent turns verbatim.
9 minaka rolling compaction
Working vs. Durable Memory
Separate the scratch state a task needs right now from the facts that should outlive the session, and store each differently.
9 minaka scratchpad and store
Retrieval-Augmented Memory
When durable facts outgrow the prompt, index them and retrieve only what this turn needs — with recency and importance in the ranking.
9 minaka episodic memory
Context Isolation via Subagents
Send noisy, exploratory work to a subagent with a disposable context and keep only its conclusion in the main thread.
8 minaka context quarantine