Note · May 2026 · Part 2 of 2
Agent memory: when live state matters
Wikis and graphs hold the knowledge. Agent memory holds what just happened.
The previous note argued that for document-driven workflows like patent drafting or foundry process design, an LLM wiki and a knowledge graph carry most of the load. The documents describe a world that does not change much while the LLM thinks about it.
That assumption breaks down for any system that has to act in a changing world.
Once the agent is doing things - moving a part, dispatching a vehicle, running a protocol - it has to remember what it just did, what changed because of it, and what is true right now. That requires a different kind of memory.
Document memory vs. agent memory
- Document memory remembers what the documents say.
- Agent memory remembers what happened over time and what the world looks like at this moment.
Concrete examples of agent memory:
- We decided not to pursue plan A after the last failure.
- The user prefers method X before method Y in this workflow.
- The first attempt overshot the target.
- The argument based on signal Z was weak.
- The next attempt should emphasize variable W.
That kind of memory is not about documents at all. It is about the history of interaction, reasoning, and decisions, and it needs to be queryable in a time-aware way.
Example 1: robotics (illustrative)
A robot cannot rely only on retrieval. It needs to know what is happening right now:
- Where am I?
- What object am I handling?
- What task am I performing?
- What just failed?
- What changed in the environment?
- What is safe to do next?
For robotics, the memory architecture looks more like this:
A knowledge graph can still be useful here - for storing relationships among objects, locations, constraints, tools, and procedures. But it sits underneath a live world model that updates as the robot acts.
Example 2: logistics (illustrative)
Logistics has a similar shape, even without a physical robot in the loop. Consider a warehouse with picking robots and human pickers, an inbound dock receiving deliveries, and an outbound fleet routing toward customers. The relevant state is changing continuously:
- Inventory by SKU and bin location, updated on each pick and putaway
- Vehicle positions, capacities, hours-of-service, and ETAs
- Dock door availability and dwell time
- Open orders, promised delivery windows, and SLA risk
- Disruptions: traffic, weather, equipment downtime, missed slots
A planner that re-routes a delivery, re-sequences a pick path, or re-slots inventory has to reason against the world as it is right now, not as it was when the last document was uploaded. The memory shape ends up looking like this:
The graph layer still matters - it encodes lanes, service-level constraints, customer preferences, and operational rules. But the agent’s effectiveness depends on fast, accurate live state and a clear record of what it just decided and why.
The memory layers that matter
A useful long-running agent separates memory into layers.
| Memory layer | Purpose | Example |
|---|---|---|
| Source memory | Stores original documents | Manuals, SOPs, contracts, specs |
| Semantic memory | Stores stable knowledge | Definitions, mechanisms, concepts |
| Graph memory | Stores relationships | Object → location → constraint |
| Working memory | Stores current task state | “Currently routing vehicle 17” |
| Episodic memory | Stores what happened | “Lane 4 was blocked yesterday at 14:20” |
| Procedural memory | Stores repeatable workflows | Pick-path heuristic, recovery procedure |
| Decision memory | Stores reasoning choices | “Chose route B to protect SLA on order 991” |
- Most basic RAG systems only handle source memory.
- An LLM wiki adds semantic memory and graph memory.
- A useful long-running agent additionally needs working, episodic, procedural, and decision memory.
A combined architecture for state-driven agents
For an agent that acts in a changing world, retrieval and a wiki are no longer the center of the system. The center is the live state store and the decision history; retrieval and the knowledge graph become supporting layers.
When a workflow needs which kind of memory
| Use case | Retrieval okay? | What must persist | Best memory pattern |
|---|---|---|---|
| Patent drafting | Yes | Invention concepts, embodiments, definitions, drafting decisions | LLM wiki + knowledge graph |
| Foundry process design | Yes | Part geometry, alloy data, gating / riser rationale, FMEA | LLM wiki + knowledge graph |
| Technical due diligence | Yes | Claims, evidence, risks, assumptions, open questions | Evidence graph + issue map |
| Regulatory strategy | Partly | Pathway decisions, classifications, predicates, risk controls | Decision memory + evidence graph |
| Logistics planning | No | Live inventory, vehicle state, SLAs, disruption history | Live state + episodic memory + graph |
| Robotics | No | Environment state, action history, object locations, failures | Live working memory + episodic memory |
| Lab automation | No | Protocol state, sample IDs, instrument status, deviations | State machine + audit log + graph memory |
The more a workflow depends on state, sequence, or in-flight decisions, the less sufficient ordinary retrieval and even a static wiki become.
Final takeaway
The two notes together describe one principle in two halves:
The mistake is picking one and pretending it covers the others. A logistics agent that leans only on a wiki will plan against yesterday’s world. Even a document-driven workflow like patent drafting benefits from a thin layer of agent memory: the protocol stays fixed, but remembering which claim shapes an examiner already rejected, or which prior art a reviewer flagged last week, keeps the system from relitigating settled decisions on every run.
Back to Part 1
← Part 1: LLM wikis and knowledge graphs