BLOG

AI Memory & Agent Engineering — Field Notes from Maximem

Research, product releases, and engineering notes on AI memory, agent context, and production AI infrastructure.

AI Agent Memory

See all 66 →

AI agent memory and context engineering guides

Practical guides, engineering patterns and mental models for building agents that remember, reason and act.

How to Migrate Agent Memory: Import Existing User History Into a New Memory Layer Without a Gap
AI Agent Memory

How to Migrate Agent Memory: Import Existing User History Into a New Memory Layer Without a Gap

How to migrate agent memory to a new memory layer without users noticing: sort history into raw chats, extracted facts and profile records, keep every original timestamp, import oldest first per user and one session per call, make the import idempotent on source ids, filter secrets at the door, then cut over with dual writes, a background backfill, answer comparison on real questions, staged reads and a read-only rollback store. With the export paths Mem0, Zep, Letta and Cognee document as of 18 November 2026, and how to re-index when the embedding model changes.

2026-11-18Read article
Agent Memory Retrieval Ranking: Relevance Is Not Usefulness, and How to Choose What Goes Into a Small Context Budget
AI Agent Memory

Agent Memory Retrieval Ranking: Relevance Is Not Usefulness, and How to Choose What Goes Into a Small Context Budget

How to rank agent memories when the context budget is small: use relevance to collect candidates and rank the final set on what each memory changes in the next decision. In MemCredit's ALFWorld study (arXiv 2611.15600, authors' report) 86.9% of memory interventions changed nothing and relevance correlated at -0.011 with usefulness; ranking by measured usefulness reached 86.57% success at a 500-token budget against 65.67% for BM25. What to rank on besides similarity, how to measure usefulness on your own traces with ablation, budget packing, the limits, and a tested Python build.

2026-11-16Read article
Agent Memory Versioning: How to Roll Back a Bad Memory Write, Restore the Index With It, and Find the Answers That Relied on a Changed Fact
AI Agent Memory

Agent Memory Versioning: How to Roll Back a Bad Memory Write, Restore the Index With It, and Find the Answers That Relied on a Changed Fact

Agent memory versioning keeps every change to what an agent remembers as an immutable revision, so a bad write can be inspected and reverted instead of silently overwriting the truth. What to record per revision, why a rollback has to restore the retrieval index and derived facts along with the stored memory, how Anthropic, Google Vertex AI, Mem0, Letta and Hindsight handle history and rollback as of 13 November 2026, how versioning interacts with GDPR erasure, and how to run provenance backwards to find the answers already sent that relied on a fact that has since changed, plus why a self-improving agent's edit history belongs outside the model. With a tested Python build.

2026-11-13Read article

Context Engineering

See all 26 →
Async Subagents: What the Orchestrator Keeps in Context, What Workers Hand Back, and What Should Outlive the Session
Context Engineering

Async Subagents: What the Orchestrator Keeps in Context, What Workers Hand Back, and What Should Outlive the Session

Async subagents let an orchestrator stay reachable while background workers run long tasks. What the orchestrator must keep about in-flight work so compaction cannot erase it, what a worker should hand back, when a follow-up should interrupt or enqueue, how results reach an orchestrator that is busy, idle or waiting on an approval, and which decisions and preferences should outlive the session, with LangChain Deep Agents, Claude Code and OpenAI behaviour as of 6 November 2026.

2026-11-06Read article
Context Compaction vs Retrieval: When Summarising a Long Agent Session Is Cheap, When Exact Lines Win, and What Neither Does Across Sessions
Context Engineering

Context Compaction vs Retrieval: When Summarising a Long Agent Session Is Cheap, When Exact Lines Win, and What Neither Does Across Sessions

Compacting a 400,000-token Claude Opus 5.5 session costs about $0.08 of input with a warm prompt cache and $1.60 to $2.00 with a cold one, at list prices as of 11 November 2026. Mainplane's measurement, NVIDIA's evidence that agents can compact after every action, what that assumes about state kept outside the window, Claude Code's and OpenAI's compaction docs, and the cross-session problem neither approach solves.

2026-10-30Read article
LLM Context Window Sizes in 2026: Every Model's Limit, the Long-Context Price Cliffs, GPT-4o's 128K, and What Happens When a Chat Runs Out
Context Engineering

LLM Context Window Sizes in 2026: Every Model's Limit, the Long-Context Price Cliffs, GPT-4o's 128K, and What Happens When a Chat Runs Out

Every major LLM's context window and max output as of 28 October 2026, from GPT-6's 1,050,000 tokens to Grok 4.7's 500,000, the long-context price cliffs at 100K (Claude Haiku 5.5), 200K (Gemini 3.1 Pro, Grok 4.7) and 272K (OpenAI), GPT-4o's 128,000-token window and 16,384-token output limit, and what each API and chat app does when you run out.

2026-09-27Read article

LLM Cost & Production

See all 27 →

Build agents that remember.

Add persistent memory and context to your AI agents with Maximem Synap.