惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
阮一峰的网络日志
阮一峰的网络日志
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
博客园 - 司徒正美
Last Week in AI
Last Week in AI
爱范儿
爱范儿
罗磊的独立博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
雷峰网
雷峰网
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
WordPress大学
WordPress大学
Jina AI
Jina AI
人人都是产品经理
人人都是产品经理
量子位
V
V2EX
博客园 - 叶小钗
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
AI Agent Memory Is Not Chat History
Glendel Joubert Fyne Acosta · 2026-06-11 · via DEV Community

Most AI agent systems start with a simple idea:

"Let's give the Agent Memory".

At first, this usually means saving previous messages, retrieving similar chunks, and injecting them back into the prompt.

That works for demos.

It does not work reliably for real organizational workflows.

  • Because chat history is not memory.
  • A vector database is not memory.
  • A bigger context window is not memory.

Those are storage and retrieval mechanisms. Useful, yes. But memory in an AI Agent System is not just about remembering more information.

It is about deciding what should influence future behavior.

And that is a much harder problem.


The Simple Version

When people say "Agent Memory", they often mix together very different things:

  • Conversation history
  • User preferences
  • Workflow state
  • Previous tool results
  • Retrieved documents
  • Task summaries
  • Business rules
  • Approved policies
  • Model-generated assumptions
  • Evidence of completed actions

But these should not all be treated the same way.

  • A user saying "I usually prefer short answers" is not the same kind of memory as "invoice #123 was paid".
  • A model saying "the client is probably interested" is not the same as a CRM record.
  • A previous chat message is not the same as a runtime audit log.
  • An approved company policy is not the same as a generated summary.

When all of these are thrown into the same context window, the agent may look smarter for a while.

Then it slowly becomes unreliable.


More Context Can Make Agents Worse

A common instinct is to give the agent more context.

  • More history.
  • More documents.
  • More summaries.
  • More retrieved chunks.
  • More memory.

But more context does not automatically mean better reasoning.

  • Sometimes it means more noise.
  • Sometimes it means stale information.
  • Sometimes it means private information leaking into the wrong task.
  • Sometimes it means the model starts treating old assumptions as current facts.
  • Sometimes it means low-authority memory overrides high-authority evidence.

This is one of the strange things about AI Agents:

The Agent can become worse because it remembers too much without knowing what should matter.

The problem is not only forgetting.

The problem is remembering without governance.


Memory Needs Scope

  • A human organization does not give every worker access to every memory.
  • A sales person does not automatically see payroll data.
  • A support agent does not automatically see executive board notes.
  • A contractor does not automatically see internal security policies.

Access depends on role, task, permission, and context.

AI agents need the same kind of boundaries.

If an agent has a role, its memory should be scoped to that role.

  • A finance agent should not recall unrelated HR details.
  • A support agent should not receive private strategy documents unless explicitly authorized.
  • A research agent should not inherit operational permissions just because it saw previous context.

Memory without scope becomes a data leak waiting to happen.


Memory Needs Provenance

Not all memory has the same authority.

  • Where did this memory come from ?
  • Was it written by a user ?
  • Was it retrieved from a document ?
  • Was it produced by another agent ?
  • Was it inferred by a model ?
  • Was it approved by a human ?
  • Was it produced by a tool execution ?
  • Was it recorded by the runtime ?

These distinctions matter.

For example:

"The agent thinks the customer is unhappy".

is not the same as:

"The customer wrote: 'I am unhappy with the delay'".

And neither of those is the same as:

"A support ticket was escalated by a human manager".

If the system does not track provenance, the model may treat all memory as equally trustworthy.

That is dangerous.

A model-generated assumption should not have the same authority as runtime evidence.


Memory Needs Freshness

  • Some memories expire.
  • Some facts change.
  • Some decisions are superseded.
  • Some preferences are temporary.
  • Some business rules are updated.
  • Some project states become obsolete.

If the memory layer does not understand freshness, agents can become confidently wrong.

This is especially dangerous in long-running workflows.

An agent might remember:

"The client prefers option A".

But maybe the client changed their mind yesterday.

An agent might remember:

"The deployment is blocked".

But maybe the deployment was completed two hours ago.

An agent might remember:

"This task is waiting for approval".

But maybe approval was already granted.

Memory should not only answer:

"Have I seen something like this before ?"

It should also answer:

"Is this still true ?"


Memory Needs Authority Levels

A production agent memory system should distinguish between different authority levels.

For example:

  1. Runtime Evidence:
    What actually happened: tool calls, outputs, timestamps, approvals, errors.

  2. Approved Knowledge:
    Policies, procedures, user-approved facts, business rules.

  3. Observed Facts:
    Information extracted from emails, documents, tickets, repositories, databases.

  4. User Preferences:
    Stable preferences explicitly stated by the user.

  5. Generated Summaries:
    Useful compression, but lossy and potentially wrong.

  6. Model Assumptions:
    Hypotheses, guesses, interpretations, incomplete reasoning.

These should not have equal weight.

  • A generated summary should not override a tool result.
  • A model assumption should not override a policy.
  • A retrieved chunk should not override a runtime audit log.

Memory needs hierarchy.

Otherwise the agent is just reasoning over a pile of mixed authority text.


Workflow State Is Not Memory

One major mistake is treating workflow state as memory.

Workflow state is not "something the agent remembers".

Workflow state is something the system owns.

For example:

  • Current step
  • Completed step
  • Failed step
  • Pending approval
  • Retry count
  • Tool result
  • Assigned agent
  • Deadline
  • Execution status

This should not depend on the model remembering correctly.

The runtime should know.

If an agent claims:

"I sent the email".

The system should be able to verify whether the email was actually sent.

If an agent claims:

"The task is complete".

The system should be able to check whether the required artifact exists.

If an agent claims:

"I already asked for approval".

The system should know whether an approval request was actually created.

Workflow state belongs outside the model.

The model can reason about state.

But the runtime should own state.


Memory Is Not Just Retrieval

  • RAG is useful.
  • Vector search is useful.
  • Embeddings are useful.
  • Long context is useful.

But none of them solve memory by themselves.

Retrieval answers:

"What information is semantically similar to this query ?"

Agent memory needs to answer:

"What information should this agent be allowed to use for this task right now ?"

That is a different question.

A memory system should consider:

  • Relevance
  • Permission
  • Freshness
  • Provenance
  • Authority
  • Task scope
  • Privacy
  • Retention
  • Evidence
  • Lifecycle

Without those controls, memory becomes a context injection mechanism.

And context injection is not governance.


The Runtime Should Curate Memory

In a reliable AI Agent System, the model should not receive memory simply because memory exists.

There should be a runtime or context layer that decides what enters the prompt.

That layer should ask:

  • Is this memory relevant to the current task ?
  • Is this agent allowed to access it ?
  • Is this memory still valid ?
  • What source created it ?
  • What authority level does it have ?
  • Has it expired ?
  • Has it been superseded ?
  • Does it conflict with stronger evidence ?
  • Should this memory be summarized or passed directly ?
  • Should this memory be hidden from the model ?

This is where agent memory becomes an architectural problem.

It is not just about storing text.

It is about governing recall.


A Better Mental Model

Instead of thinking:

"The agent has memory".

Think:

"The system controls what the agent is allowed to recall".

That small shift changes the architecture.

  1. The agent does not own memory.
  2. The runtime owns memory access.
  3. The model reasons.
  4. The runtime curates context.
  5. The system records evidence.
  6. The workflow tracks state.
  7. Permissions control access.
  8. Policies define boundaries.

This separation is important because models are probabilistic.

Memory governance should not be.


A Practical Architecture

A more reliable Agent Memory Architecture might separate memory into layers:

1. Conversation Context:

Recent interaction history.

Useful for continuity.

Not authoritative by default.

2. Working State:

The current task state.

Owned by the runtime, not the model.

3. Episodic Memory:

Past events and interactions.

Useful, but should include timestamps, sources, and scope.

4. Semantic Knowledge:

Documents, knowledge bases, policies, procedures.

Should include provenance and authority.

5. Runtime Evidence:

Tool calls, approvals, outputs, logs, completed actions.

This should have higher authority than model claims.

6. Preferences:

User or organization preferences.

Should be explicit, scoped, and editable.

7. Summaries:

Compressed context.

Useful, but lossy. Should not be treated as truth without source references.

The key is not only storing these separately.

The key is applying different rules to each one.


Why This Matters More in Multi-Agent Systems

Memory gets even harder when Multiple Agents are involved.

  • If Agent A writes something into shared memory, should Agent B trust it ?
  • Should Agent B see it ?
  • Was it an observation, an inference, or a completed action ?
  • Did a human approve it ?
  • Was it generated from stale context ?
  • Was it meant to be private to one workflow ?

In Multi-Agent Systems, memory becomes a coordination surface.

Bad memory can propagate across agents.

  • One agent makes an assumption.
  • Another agent reads it as fact.
  • A third agent acts on it.

Now the system has transformed an uncertain inference into operational behavior.

That is how Unreliable Agent Systems drift.

Multi-Agent Memory needs boundaries, ownership, and evidence.

Not just shared context.


The Real Problem

The real problem is not:

"How do we make agents remember more ?"

The real problem is:

"How do we make agents remember safely ?"

That means memory must be:

  • Scoped
  • Permissioned
  • Current
  • Traceable
  • Auditable
  • Ranked by authority
  • Connected to evidence
  • Separated from workflow state
  • Governed by runtime rules

Without this, agent memory becomes another source of hallucination.

A very convincing one.


Final Thought

  • AI agent memory is not chat history.
  • It is not a vector database.
  • It is not a bigger context window.
  • It is not a pile of summaries.

Real agent memory is governed recall.

For agents operating inside real organizations, memory must answer more than:

"What might be useful ?"

It must also answer:

"What is allowed, current, relevant, trustworthy, and supported by evidence ?"

That is the difference between an agent that remembers things and an agent whose memory can be trusted.