How to give an AI agent a memory that survives sessions, conflicts and audits

Louis Poirier
Louis Poirier
November 19, 2026
24
min read

Commercial chat assistants and long-context LLMs lose 30% accuracy when they must memorize information across sustained interactions (LongMemEval, ICLR 2025). Agent memory is the persistent memory layer of an AI agent. It lets coding agents and customer support agents keep conversation history, user preferences and relevant context across tool calls and sessions. This guide covers the types of agent memory and how agent memory works. It also covers the memory architecture, the write path, vector search, a knowledge graph and a memory store.

What agent memory is and which types an agent needs

Agent memory defined: state that outlives one run

To define agent memory: it is information that an agent writes to a memory store outside its context window. A later run can read it. Episodic memory keeps events and semantic memory keeps facts while procedural memory keeps rules. Semantic search and a retrieval pipeline bring the right memories back in real time. Without memories the model forgets everything after a single session. Privacy rules and access control apply to the data from the first write. Teams that build memory into AI agents often start with one thread and add a long-term store later.

An AI agent without memory is stateless. Each session starts from a blank context and the agent repeats the questions it asked yesterday. Persistent memory fixes that by keeping what the agent learns and reading it back when a similar task returns.

Agent memory covers the whole loop: what the agent captures, where its memories live, how it retrieves them and when it forgets them. That loop gives the user a consistent experience from one session to the next. It differs from the internal mechanics of a model, which our guide to AI memory covers. Here the focus stays on the agent systems that you build and operate.

Memory, context window, RAG and state: four things not to confuse

The context window is what the model can see at one call. State is the working record of the current task. RAG (retrieval-augmented generation) reads documents that someone else wrote and never changes them. Agent memory is different because the agent writes it and later reads it again.

Cognee’s guide gives that distinction its own section on RAG versus memory. Keep the four separate in your design. Each one has its own owner and its own lifetime. It also has its own failure mode, which shapes the architecture of agent memory. A team that treats memory as a bigger context window pays for the same tokens on every call and still loses information.

Did you know?

Chroma tested 18 models (among them GPT-4.1, Claude 4 and Gemini 2.5) and reported that performance degrades consistently as input length grows (Context Rot, July 2025). More context is not a substitute for memory.

Working memory: scratchpad, state and tool-call history

Working memory serves the current task and ends with it. It usually holds three things:

  • a scratchpad where the agent writes intermediate reasoning and plans
  • the state of the thread, which a checkpointer persists so that the thread can resume
  • the tool-call history with the arguments and results of each call

LangGraph defines short-term memory in exactly those terms: the state of a thread, saved to a database by a checkpointer (documentation read in November 2026). The conversation history belongs here too. Working memory is cheap and temporary. Do not let it grow into the long-term store by accident.

The agent harness, which is the code that runs the loop around the model, writes this state at each step. Many coding agents also persist it to a file in a local directory so that a crashed run resumes where it stopped. A harness that logs every tool call also gives you the raw material for later memory extraction.

Long-term memory: semantic, episodic and procedural

Long-term memory survives the thread and serves later sessions. Three types cover most needs.

Semantic memory holds facts and concepts, such as the fact that a user prefers train travel. Episodic memory holds past events and actions. Agents often implement it as few-shot examples that show how an earlier task went. Procedural memory holds the rules for doing a task. For an agent that means the system prompt and the code that produce its behavior.

A 47-author survey, Memory in the Age of AI Agents (arXiv 2512.13564, December 2025), groups memory by function. Its categories are factual, experiential and working. The labels differ but the design question stays the same: which type does each piece of information belong to and who may update it?

Agent skills are a practical example of procedural memory. A skill is a reusable instruction file that a coding agent loads on demand. A library of skills lets a team share a learned routine with every agent without retraining any model. Treat each skill file as versioned code that needs review. A skill that encodes a wrong routine repeats the mistake at every run, so keep the skill library small and give each skill an owner.

Where memories live: files, vectors, graphs and key-value stores

A memory store can take four shapes. Files are readable and editable by a person. Claude’s managed memory mounts them as a directory in the agent’s sandbox. Vector databases return memories by similarity, which suits fuzzy recall through embeddings and semantic search. A knowledge graph stores relations between entities. A key-value store with namespaces, such as the LangGraph store, retrieves a memory by exact key.

Developers reach most of these stores through a Python or TypeScript SDK or through a REST API. Many also expose an MCP server so that any compatible client can read and write memories. Choose the shape from the read query and not from fashion. Preferences fetched by key do not need a graph. Questions about relations between customers and products do. In the Mem0 paper the graph variant scored about 2% higher overall than the base configuration. Your own data may not reproduce that small gain.

Graph memory: relations that vector search misses

Graph memory stores entities and the relations between them. A graph store answers questions that a flat list of vectors answers poorly, such as which customers booked the same trip through the same advisor. The graph links each person to products, events and places. A graph query follows those links and a graph traversal can reach facts that sit three hops away. Cognee’s guide covers graph-based memory as a distinct approach for that reason.

A graph also costs more to build. The extraction step must name entities and relations correctly and a wrong edge spreads a mistake across the whole graph. Start with a graph only when your read queries ask about relations. Many agents work well with a vector index and a few typed fields. Add the graph later and test whether it improves recall on your own questions. A graph database needs its own backup and its own access control.

What memory buys you: continuity, token cost and personalization

Memory brings three distinct benefits. The first is continuity: the agent stops asking again for information the user already gave. The second is token cost. Mem0’s authors report more than 90% token savings and a 91% lower p95 latency against a full-context approach on the LOCOMO benchmark. Databricks reports that memory tripled the agent pass rate on real enterprise tasks with 31% fewer tokens, measured in its own internal benchmarks.

The third benefit is personalization. The advantages of using agent memory show most on long journeys. An agent that remembers user preferences across sessions can tailor each answer to a customer. Treat every figure above as a vendor claim. Both come from the companies that sell the memory they measure.

Expert tip:

Replay twenty real conversations with and without memory before you trust any published gain. Measure answer accuracy and tokens per task on your own data.

The agent memory lifecycle: write path, read path and failure points

The write path: capture and extraction

The write path turns a conversation into candidate memories. It sets the functionality of agent memory that every later stage depends on. The agent or a background process captures messages and tool results. It then extracts the facts, decisions and preferences worth keeping. Mem0 runs messages through a language model that pulls out key facts. Cloudflare describes a parallel design with a full extraction pass and a second pass for precise values such as names, prices and version numbers.

Cloudflare then verifies each extracted memory against eight criteria. It classifies the memory as a fact, an event, an instruction or a task (blog post of April 17, 2026, in private beta when read in November 2026). Extraction is where noise enters the store. A memory that was never worth keeping costs tokens on every later read.

Hot path or background: when to write a memory

Writing during the response is the hot path. Memories update in real time but the write adds latency to the agent. Writing in a separate task is the background option. LangGraph says it removes latency from the main application. In exchange you must decide how often the background task runs. A fresh fact may not be available to the very next turn.

Use the hot path for facts that change the next answer, such as a correction from the user. Use the background for summaries and consolidation. Many teams mix both and log which path wrote each memory.

Consolidation: deduplicate, merge and supersede

Consolidation keeps the store small and consistent. It removes duplicates and merges related memories. It replaces facts that newer evidence contradicts. Cloudflare supersedes facts that share a normalized topic key and links the old version to the new one, then removes the stale vectors. Databricks runs background pipelines that extract durable facts, deduplicate them and replace facts that newer conversations contradict.

Anthropic describes a related step it calls dreaming: Claude reorganizes memory notes between sessions, corrects mistakes and promotes notes up a hierarchy. A store that is never consolidated fills with near-duplicates that crowd out the useful ones at retrieval time.

Did you know?

Cloudflare keeps a version chain when it supersedes a fact. The old memory is not erased but linked to the newer one, which keeps an audit trail.

Storage and indexing

Writing is not enough because the agent must find the memory again. Each memory needs an index that matches the way you read. Cloudflare gives each memory profile its own SQLite-backed Durable Object and its own vector index. It vectorizes in the background after the response returns. Databricks stores sessions and memories in Lakebase, its serverless Postgres, inside the customer’s project.

Plan the schema before the volume arrives. Store the source, the date and the scope of each memory next to its text. Those three fields make later retrieval, audit and erasure possible.

A sound agent memory design has three layers: a write layer that extracts, a storage layer that indexes and a read layer that ranks. This agent memory structure keeps each layer testable on its own. You can swap a vector index without touching the extraction logic.

The read path: retrieval and injection under a token budget

The read path brings the right memories into the context. Cloudflare analyzes the query and runs five retrieval channels in parallel. They are full-text search, exact fact-key lookup, raw message search, vector search and a vector search on a hypothetical answer. It merges the results with weighted Reciprocal Rank Fusion. Databricks loads a memory index at session start and searches it with hybrid keyword and semantic search.

Whatever the stack, the read path follows three steps:

  1. Analyze the request and the user scope.
  2. Retrieve candidate memories and rank them.
  3. Inject only what fits the token budget.

A budget forces the ranking to matter. An agent that injects every memory returns to the cost problem that memory was meant to solve.

Forgetting and erasure: retention limits and the right to delete

Once an agent stores facts about an identifiable person, its memory is a processing of personal data under the GDPR. Article 5(1)(c) requires data minimization and Article 5(1)(e) limits the storage period. Article 17 gives the person a right to erasure. A forgetting policy is therefore a legal control as well as an optimization. The European Data Protection Board adopted Opinion 28/2024 on data protection aspects of AI models on December 17, 2024. Read it with your DPO before launch.

Claude’s memory stores show what a technical answer looks like. Every change creates an immutable version for audit. A redact operation scrubs the content of an old version while it keeps the record of who did what and when. A version that is still the head of a live memory cannot be redacted, so you write a new version or delete the memory first.

Expert tip:

Key every memory to one user identifier. Deleting that identifier should remove the memories, their derived summaries and their vectors in one operation.

Memory poisoning: when a wrong fact is remembered

OWASP’s Agentic AI - Threats and Mitigations (version 1.1, December 2025) ranks memory poisoning as the first threat, T1. An attacker or a simple error injects a false fact that later sessions then trust. OWASP’s travel-booking scenario shows the mechanism: repeated false statements about pricing rules lead the agent to book charter flights as free.

Shared memory raises the stakes because one user can influence what the agent tells others. Apply the same access control and privacy rules to memory that you apply to a customer database. Three governance controls limit the damage. Record the provenance of every write. Isolate memory per user or per tenant. Validate a fact before the agent promotes it to long-term memory.

The lifecycle map: failure mode and control at each stage

The working of agent memory is a lifecycle and each stage has its own failure and its own control. The map below walks through capture, extraction, consolidation, storage, retrieval and forgetting. For each stage it shows what the agent does, how that stage fails and which control prevents the failure.

Lifecycle map

Six stages, six failure modes, six controls

For each stage of an agent memory: what the agent does, how that stage fails and which control prevents the failure.

1

Capture

Agent doesRecords messages, tool calls and results as raw observations.

Fails whenA false statement from a user or a document is captured and later trusted (OWASP T1, memory poisoning).

ControlRecord the provenance of every write and keep a link to the source message.

2

Extraction

Agent doesTurns observations into candidate facts, decisions and preferences.

Fails whenThe model extracts a fact that nobody stated or stores noise that costs tokens on every read.

ControlAdd a verification pass before storage, as Cloudflare does with eight criteria.

3

Consolidation

Agent doesDeduplicates and merges memories and replaces facts that newer evidence contradicts.

Fails whenA stale value survives next to a fresh one or the newest source overwrites the most reliable one.

ControlSupersede by topic key with a version chain and apply a written conflict policy.

4

Storage

Agent doesWrites each memory with its index, its source and its date.

Fails whenOne shared store lets a user influence what the agent tells other users.

ControlScope memory per user or per tenant and store the scope next to every record.

5

Retrieval

Agent doesSearches memories, ranks them and injects the best into the context.

Fails whenThe agent injects too much or the wrong memory, so cost rises and answers drift.

ControlSet a token budget, rank by relevance and recency and log what was injected.

6

Forgetting

Agent doesExpires, archives or deletes memories on a rule or on request.

Fails whenData outlives its purpose (GDPR Article 5(1)(e)) or an erasure leaves summaries and vectors behind (Article 17).

ControlTie the time to live to your retention period and delete by user identifier in cascade.

Sources: OWASP Agentic AI Threats and Mitigations v1.1 (December 2025), GDPR (EU) 2016/679, Cloudflare Agent Memory blog (April 17, 2026). Review checklist by Kleio.

Use the map as a review checklist. If a stage has no named control in your design, that stage is where the first incident will happen.

Memory patterns that keep an agent reliable: summarization, hierarchy, forgetting and conflicts

Summarization and compaction

Summarization replaces a long history with a short account of it. It frees context but loses detail, so the pattern needs rules. To improve agent memory performance, summarize in the background and never on the user’s critical path. Keep the most recent messages verbatim and summarize the older ones. Store the summary as a memory with a link to its source messages so that a person can audit it.

LangChain’s method for giving an agent memory follows three steps: capture traces, analyze them and update the memory. The open-source agentmemory project adds a design goal worth copying: a memory must survive context compaction. If the summary drops a user correction, the agent will repeat the old mistake.

Hierarchical memory: tiers from context to archive

Hierarchical memory moves information between tiers. The MemGPT paper (Packer et al., UC Berkeley, arXiv 2310.08560, October 2023) borrows an idea from operating systems. The agent pages information in and out of its context window. The project became the company and framework Letta on September 23, 2024. MemGPT now names the pattern and Letta names the framework.

Three tiers cover most designs:

  • an in-context tier that is always visible to the model
  • a recall tier that holds recent history and is searched on demand
  • an archive tier that holds long-term facts and is queried when needed

The agent decides what to promote or demote. Log those decisions because they explain later answers. Teams building production agents go deep on one tier at a time and test it before they add the next.

Forgetting policies: time to live, salience and decay

A forgetting policy decides what leaves the store and when. Three rules work together. A time to live retires a memory after a set date. Mem0 supports an expiration date that hides expired memories from search and from listings, although a fetch by identifier still returns them. Salience ranks memories by how likely they are to matter again. Anthropic reports that Claude has learned to judge what is worth remembering.

The third rule is a capacity limit. Claude’s memory stores cap at 10,000 memories and refuse new writes beyond that limit, which forces a cleanup. Combine the three and tie the time to live to your legal retention period. Forgetting is also the cheapest way to enhance agent memory and boost its efficiency: a smaller store retrieves faster and costs less to run.

Reflection: turning events and mistakes into lessons

Reflection converts raw events into lessons. After a run the agent or a separate reviewer process reads the trace and finds a mistake. It then writes a short lesson as procedural memory. Anthropic’s dreaming includes steps that correct memory and fill in the gaps a session leaves behind.

The signal that triggers a lesson can be an explicit user correction, a failed tool call or a rejected answer. Write each lesson as a rule with its source event and its date. The next time a similar event occurs the agent reads the rule before it acts. This avoids a common mistake in later sessions.

A solution that never reviews its lessons will store a wrong lesson as faithfully as a right one. An email that an agent sent with a wrong discount should create a lesson that a person approves before it becomes a rule.

Why two memories of the same user disagree

Memories disagree because they come from sources of unequal reliability. A user states a preference. A click suggests another. A nightly CRM synchronization writes a third. A model infers a fourth from behavior. Each is a valid observation and they cannot all be true at once.

None of the ten pages that Thot ranks for this query gives contradiction a heading of its own. The agent-memory.dev site only lists a research paper on contradiction resolution in persistent memory, TOKI. In production it is the first incident teams meet: a click overwrites a declared preference and the agent recommends the wrong product.

Three write policies: last write wins, append everything, evidence-weighted

Three write policies cover most systems.

Last write wins keeps the newest value. Cloudflare applies a version of it when a new fact supersedes an older one on the same topic key. It is simple and it fails when the newest source is the least reliable. Append everything keeps every observation. Mem0’s add operation works this way: new memories are added without overwriting or deleting existing ones. It never loses information and it leaves the agent to choose between contradictory entries at read time.

Evidence-weighted resolution scores each source and keeps the value with the most weight but only when the lead is clear. A declaration weighs more than a click. A fresh declaration weighs more than a stale CRM field. When two values are too close the policy reports a conflict.

Try the three policies on one buyer

The simulator below replays four signals about one traveler across three sessions. Change the signals and compare what each policy keeps. The weights are examples that mirror those Kleio publishes for its own Memory Store. They are not a standard.

Interactive simulator

Two memories disagree: which policy decides?

Four signals about one traveler arrive in order. Change them and compare what each write policy keeps and what the agent does next.

Signals about the field "trip style" (oldest first)

1. Buyer said itStated in the chat, weight 0.95
2. BehaviorA click on a listing, weight 0.30
3. Nightly CRM syncSystem record, weight 0.70
4. InferenceGuessed by a model, weight 0.50

Last write wins

Append everything

Evidence-weighted

Simplified model: the scores of the signals add up per value and the contest threshold is a margin of 0.15 between the two top shares. Weights mirror the defaults published on the Kleio Memory Store page (read in November 2026). They are examples, not a standard.

Notice the cases in which the three policies agree. Notice also the cases in which only the weighted policy tells the agent to ask a question.

Act or ask: what an agent does when evidence is close

When the evidence is close, a good agent asks. A wrong recommendation costs more than one short question. The weighted policy needs a threshold under which the value counts as contested. Above it the agent acts. Below it the agent asks the user to confirm.

Kleio’s published demo shows the idea. A beach preference scores 0.537 and a cultural preference scores 0.463. The margin of 0.073 sits under the threshold of 0.15, so the assistant asks instead of guessing. Set the threshold from the cost of an error in your own journey.

Expert tip:

Log every contested decision with the signals behind it. Those logs become your best test set for the next version of the policy.

Agent memory frameworks compared: Mem0, Letta, LangGraph and managed services

Six criteria to compare memory approaches

Compare every option on the same six criteria:

  1. Scope: thread, cross-session or shared across agents.
  2. Data model: files, vectors, graph or key-value documents.
  3. Write mode: hot path, background or agent-edited.
  4. Conflict handling: what happens when two memories disagree.
  5. Audit and versioning: who changed what and when.
  6. Erasure: how a person’s memories are removed.

To implement agent memory with any option, answer the same six questions. The table below applies these criteria to six options. Each cell is written from the primary documentation read in November 2026. Where a page does not document a criterion, the cell says so. Offers change fast, so recheck before you commit.

Mem0: an extraction layer scoped by identifiers

Mem0 extracts memories from messages with a language model that pulls out key facts, decisions and preferences. It scopes memories with identifiers such as user_id, agent_id, app_id and run_id. Its add operation never overwrites existing memories, so conflict handling happens at search time. With inference switched off it stores the payload exactly as given.

The Mem0 paper (arXiv 2504.19413, April 28, 2025) reports a 26% relative gain on the LLM-as-a-Judge metric over OpenAI. It also reports a 91% lower p95 latency than full context on the LOCOMO benchmark. The authors sell the product, so read those numbers as a vendor result.

Letta and MemGPT: memory the agent edits itself

Letta is the framework that grew out of MemGPT. Its memory is organized in blocks of text that sit in the system prompt. The agent edits those blocks through memory tools. A developer can edit them directly through the API. A block can be attached to several agents at once, which gives you shared memory without a separate service.

Letta also persists all state, so messages that leave the context window remain retrievable. This design gives the agent real control over what it remembers. It also makes the agent responsible for conflicts. The documentation read does not describe a built-in policy for them.

LangGraph: checkpointer for threads, store for long-term memory

LangGraph separates two layers. A checkpointer persists the state of a thread so that it can resume. A store holds long-term memories as JSON documents under a namespace and a key, shared across threads. The documentation reuses the semantic, episodic and procedural types and describes both the hot path and background writes.

LangGraph gives you the plumbing and leaves the policy to you. It does not decide what counts as a conflict or when to forget. That is the right trade for a team that wants full control and accepts the work. It is the wrong one for a team that wants those decisions made for it.

Managed memory: Claude Managed Agents, Cloudflare and Databricks

Three platforms now sell managed agent memory. All three were in beta when we read them. Claude Managed Agents offers memory stores: workspace-scoped collections of text documents mounted as a directory in the session sandbox. The agent reads and writes them with its file tools in a folder-like directory. Every change creates an immutable version. The feature is not eligible for zero data retention.

Cloudflare Agent Memory is a managed service in private beta with ingestion and retrieval pipelines and one store per memory profile. Databricks Agent Memory keeps sessions and memories in the customer’s Lakebase project, scoped to each user. Developers can read, export and delete the entries kept about each user. These services save you from running pipelines and they tie you to a platform.

Comparison table: scope, data model, writes, conflicts, audit and erasure

The table summarizes the six options as documented in November 2026. "Not documented" means the page read does not cover the criterion.

ApproachScopeData modelWritesConflictsAudit and erasure
Mem0user_id, agent_id, app_id, run_idExtracted facts, decisions, preferencesLLM extraction on addAdd-only, nothing overwrittenExpiration date hides memories from search; delete not documented
LettaPer agent, blocks shareable across agentsText memory blocks plus persisted messagesAgent edits via tools or developer via APINot documentedNot documented
LangGraphThread (checkpointer), cross-thread (store)JSON documents by namespace and keyHot path or backgroundLeft to your codeNot documented on the page read
Claude Managed AgentsWorkspace store mounted per sessionText documents as filesAgent file tools or APINot documentedImmutable versions, redact; 10,000-memory cap; beta
Cloudflare Agent MemoryPer memory profileSQLite store plus vector indexExtraction pipeline, background vectorizationSame topic key supersedes, version chainEvery memory exportable; private beta
Databricks Agent MemoryPer user, in the customer’s LakebaseManaged sessions plus managed memoryBackground pipelinesContradicted facts replacedRead, export and delete per user; beta

Sources: LangGraph and Mem0 documentation, Letta documentation and blog, Claude Platform documentation, Cloudflare blog (April 17, 2026) and Databricks blog (October 20, 2026), all read in November 2026.

Build or buy: how to choose

Three rules cover most decisions:

  • A library such as Mem0 or LangGraph suits a team that must control the write policy or keep data inside its own boundary.
  • Choose a managed service when your team does not want to run extraction and indexing pipelines and accepts a beta feature and platform ties.
  • Choose neither alone for contradictions. None of the six options documented here ships a business-level policy for conflicting sources.

To integrate memory in AI agents without a rewrite, put one interface between your agent code and the store. Your engineering team can then replace the provider later. Avoid a specific vendor feature that has no export. Prefer existing open standards such as MCP, which a large community maintains. To compare layers beyond memory, read our guide to an AI agent platform. Keep an exit plan whichever route you take, including an export of every memory in a documented format. Prefer a store that exports its memories in a documented format so that a later migration does not lose them.

Measuring agent memory: LongMemEval, LOCOMO and your own test set

Two public benchmarks anchor the field. LongMemEval (Wu et al., ICLR 2025) tests chat assistants on long-term interactive memory and found a 30% accuracy drop on sustained interactions. LOCOMO tests memory across long conversations and is the benchmark the Mem0 paper uses. Both give you vocabulary and a baseline.

Generated test conversations are a common shortcut. Prefer real transcripts with consent and manage them under your retention rules. Neither replaces a test set built from your own conversations. Write twenty to fifty scenarios that cover a contradiction, a stale preference, an erasure request and a cross-session recall. Run them on every change to the extraction prompt or the write policy. A regression in memory is silent until a customer notices.

Did you know?

The numbers published for memory systems come mostly from the vendors that built them. A neutral, shared evaluation for agent memory does not yet exist.

Where Kleio fits: evidence-weighted memory for high-consideration purchases

One of three purpose-built stores in the Knowledge Engine

Kleio applies agent memory to complex, high-value sales such as travel, real estate and automotive retail. Our overview of agentic AI places memory inside the wider strategy. In those journeys the buyer rarely knows what to ask and the decision spans several sessions. The Kleio Knowledge Engine spreads data across three purpose-built stores for product, document and memory content, with a separate layer for configuration and governance.

The Memory Store is the third of those stores. It keeps what the buyer said, did and chose, so that the next agent in the journey does not start from zero. See the Kleio Memory Store for the full description and the Kleio platform for the surrounding stack.

Observation, claim, belief: how the Memory Store settles a conflict

The Memory Store answers the contradiction problem described above. Every message, click, filter and CRM record is an observation. Each observation produces claims about a field such as trip style. The store then aggregates the claims into one belief per field, together with its evidence.

The weighting is evidence-weighted and configurable per deployment. By default the buyer’s own statement weighs 0.95 and an interface choice 0.90. A CRM or system record weighs 0.70 and an inference 0.50. Behavior weighs 0.30 and a default 0.10. The resolution is deterministic, with no language model in the loop. The product page puts the consequence plainly:

"A nightly CRM sync cannot overwrite what the buyer said this afternoon."

When the margin between two values falls under the threshold, the field becomes contested and the assistant asks the buyer.

Scoped, explainable and deletable in one operation

Memory is anonymous by default and tied to a browser identity, with no cross-matching of people and devices. It is scoped per deployment and per brand, so one brand’s memory does not leak into another’s. Any belief can be explained on request, which also serves transparency duties under the EU AI Act.

Deleting a conversation deletes its memory in a single operation, which supports an erasure request under GDPR Article 17. A REST API reads typed values for a field. They can be passed as filters to search and MCP calls. For the coordination of several agents around the same state, read our guide to AI agent orchestration.

When Kleio is not the right fit

Kleio is not an open-source memory library and not a general-purpose store for any agent. It is not a self-service tool and it has no free tier. Kleio targets large enterprises with complex, high-value sales and deploys with the Kleio team.

If your agent is a coding assistant that remembers repository conventions, a library or a managed store will serve you better. If your agents must keep a buyer’s evolving preferences across a long purchase journey, Kleio fits. If they must also resolve conflicts between sources, bring one real journey to a first demo.

Test agent memory on your own journey

Bring one real purchase journey to a Kleio demo.

See how the Memory Store settles contradicting signals, asks when evidence is close and deletes a buyer's memory in one operation.

FAQ

What is the role of memory in an agent AI system?

Memory lets an agent keep context between steps and sessions. Working memory serves the current task while long-term memory stores facts, events and rules for later. Without it each run starts blank and the agent repeats earlier questions.

What are the types of agent memory?

Agents use working memory for the current task and long-term memory for later sessions. Long-term memory splits into semantic memory for facts, episodic memory for past events and procedural memory for rules. Storage can be files, vectors, graphs or key-value.

How does agent memory work?

An agent captures messages and tool results, extracts facts, consolidates them and stores them with an index. On the next task it retrieves the relevant memories under a token budget. A forgetting policy removes what is stale or must be erased.

How to build memory into AI agents?

Start with working state and a checkpointer, then add a long-term store and a write policy. Choose a library or a managed service for extraction. Kleio’s Knowledge Engine adds a dedicated memory store beside its product and document stores.

What are the benefits of agent memory?

Memory brings continuity across sessions, lower token cost and personalization. Vendor benchmarks report large savings, so test your own data. Kleio’s Memory Store weights each source, so a buyer’s own statement outranks a CRM field.

How to improve agent memory performance?

Consolidate duplicates, rank retrieval and inject only what fits the budget. Define a write policy for conflicts and test it on your own scenarios. Kleio’s Memory Store uses a versioned policy and a contested threshold that triggers a question.

Is ChatGPT an agent or LLM?

ChatGPT is a product built on large language models. A language model becomes an agent when it runs a loop with tools and keeps state between steps. Memory is what lets that agent improve across sessions.

How do you stop an AI agent from remembering something wrong?

Record the source of every write, isolate memory per user and validate facts before long-term storage. Kleio’s Memory Store weights evidence by source and deletes a conversation’s memory in one operation.

What happens when two memories of the same user disagree?

Most stores either keep the newest value or keep everything and leave the choice to read time. An evidence-weighted policy scores each source instead. Kleio’s Memory Store marks a field contested when the margin is too close and has the assistant ask the buyer.

Test