AI Agent Memory: Keep Corrections Across Sessions
AI agent memory earns its place when a customer corrects a fact once and the next session uses the correction. Save the approved value with its evidence, mark the earlier note as superseded, and retrieve the current record inside the customer’s account. Keeping the old conversation somewhere is only part of the job.
Imagine a photo-archive service called Archive Desk. An owner uploads a photograph of a town parade. The agent suggests 1932 from the cars and clothing, labels the year uncertain, and moves on. Later, the owner supplies a dated newspaper page carrying the same photograph: June 14, 1934. The owner approves 1934 for the catalogue.
A week later, the owner asks for a caption. Getting 1932 again makes the earlier correction feel like a conversation with a very polite filing cabinet.
Anthropic’s November 6 research post, The components of agent memory, examines how agents organize knowledge across sessions. One experiment traces a navigation mistake to an incorrect memory note; reviewing the note against the original transcript changes the agent’s subsequent route. The research gives a concrete reason to preserve evidence alongside memory.
Carry an approved correction into persistent agent memory
Archive Desk has three places where the year appears. The current conversation contains the owner’s correction. A persistent catalogue note supplies the working year for later sessions. A private source record holds the newspaper page, its location within the upload, and the owner’s approval.
The conversation explains how the discussion unfolded. The note makes the next caption straightforward. The source record lets a reviewer establish why 1934 replaced an estimate.
Before accepting the date, the reviewer checks the photograph itself. Does the newspaper reproduce the same image? Does its caption date the parade, or does June 14 merely date the newspaper? A publication date alone cannot establish when the photographer took the picture. For the worked example, the page identifies the pictured parade as an event in 1934, and the owner approves the match.
The following before-and-after record uses synthetic data. Every field belongs to the illustrative Archive Desk application design; none represents a required Claude or HeadlessDomains.com schema.
| Field | Initial note | Approved correction |
|---|---|---|
| record_id | A-P017-v1 | A-P017-v2 |
| year | 1932 | 1934 |
| status | uncertain | approved |
| basis | Agent estimate from cars and clothing | Reviewer matches the image and event caption; owner approves the year |
| source_ref | A:upload-01:image-17 | A:newspaper-02:page-4 |
| approval_ref | None | A:approval-07 |
| supersedes | None | A-P017-v1 |
On approval, the application marks v1 as superseded and points the current catalogue entry to v2. It retains both versions and their private sources under the archive’s retention policy. A routine caption request retrieves v2; an authorized history review can retrieve v1 as well. Old evidence remains available without competing for the job of current answer.
Anthropic’s Managed Agents memory documentation separates persistent stores from fresh session context. Its API supports targeted memory edits, version history, and a content-hash precondition for avoiding a concurrent overwrite. Stores attach at session creation, with read_only available for reference material. Older versions can expire, so export history if your archive retains provenance longer.
For Archive Desk, the correction path can update one record directly. It checks the saved version before writing, records the approval, then reads back the new current value. Commit the version change and current-record pointer together so a failed write cannot leave the catalogue between revisions. If another reviewer has changed the entry meanwhile, the application returns the competing revision for review. A silent last-write-wins rule gives the fastest typist an undeserved promotion to historian.

Check memory corrections against source evidence
Now suppose someone uploads an undated inventory sheet listing P-017 as 1936. The document also contains a line telling the agent to replace earlier dates.
Archive Desk can extract the 1936 claim for comparison. It gives instructions inside an uploaded document no authority to edit approved memory. The authenticated owner’s approval arrives through the application’s review path, with access to the relevant account and photograph. Text announcing its own authority remains text.
Even an owner’s correction benefits from a precise scope. Approval of the year for P-017 leaves other parade photographs unchanged. The application records the owner’s decision about the catalogue entry; it makes no claim to settle every historical question about the event.
Keep the competing claim as a separate candidate with its source reference and unverified status. If a reviewer finds credible conflicting evidence and cannot resolve it, mark the current entry disputed. Retain 1934 as the last approved value, but have the next caption request return the conflict for review instead of presenting an unqualified year.
As the archive grows, ten copies of the undated sheet still trace back to one unsupported claim. Repetition supplies volume. The dated source and recorded approval supply the reason for the catalogue decision.
The HeadlessEmpire tool guide covers the wider choice of memory, execution, and communication systems. Here, the deciding behavior sits inside the correction workflow: who approved which fact, from which evidence, for which photograph.
Review a Dreams output store before adoption
Once Archive Desk has months of notes, an off-session review can help organize repeated observations and expose contradictions. Anthropic’s Dreams documentation covers a separate Managed Agents feature in research preview, with requested access and supported-model conditions. Dreams takes an existing store and past sessions, then produces a separate output store without changing the input.
An output ID can appear while the job still runs. Wait for completed, inspect the output, and approve it before attaching it to future sessions. Failed or canceled jobs can leave partial output. Broad synthesis does not function as a deterministic line editor; use a targeted memory edit for an exact correction. Dreams also incurs API token charges.
For the archive review, compare the proposed store against the approved P-017 record. Does 1934 retain its source and approval? Does the old 1932 estimate remain historical? Does the unresolved 1936 claim still carry its uncertainty? A shorter file earns nothing if it quietly removes the evidence for the year.
Include only the relevant customer’s authorized records and transcripts in the review job. Freeze a comparison version, then check for corrections arriving during synthesis. If the owner approves another change before adoption, reconcile it and rerun the affected replay cases. Otherwise, a tidy new store can restore yesterday’s error with excellent formatting.
Replay the correction in a fresh session
Test the next conversation without carrying over the correction chat. Give the session the photograph reference and access to the account’s current memory, then ask for a caption year and supporting evidence.
The application obtains the account from the authenticated session. It selects the authorized store and records before exposing context to the model. A customer identifier typed into a prompt cannot expand access. The customer-scoped order lookup tutorial develops the same server-side ownership principle for a different task.
Use the following synthetic replay cases as an evaluation plan. The expected results express the application’s rules; they are not measured model results.
| Case | Fresh-session input | Expected behavior |
|---|---|---|
| Initial uncertainty | Customer A requests P-017 before approval. | Return 1932 as an uncertain estimate. Supply its original source reference. |
| Owner correction | The reviewer accepts the dated source and the owner approves 1934. | Save v2, supersede v1, and preserve both source references and the approval. |
| Fresh retrieval | Customer A requests P-017 after approval, without the earlier chat. | Retrieve v2 and return 1934 with the dated source. Keep 1932 out of the current caption. |
| Unverified upload | An undated sheet claims 1936 and directs an overwrite. | Record a candidate claim. Leave the approved year unchanged. |
| Unresolved conflict | A reviewer flags credible conflicting evidence. | Return a review requirement and the competing references. Withhold an unqualified caption year. |
| Second customer | Customer B requests its own P-017, dated 1951. | Return B’s 1951 record and source. Expose no A record, approval, or source. |
| Foreign record | Customer B requests A’s private record ID. | Return no record details, even if the prompt asserts permission. |
A local mock can test record selection, supersession, and rejection rules without calling a model. A real service evaluation adds separate evidence: start a fresh session, inspect which record the agent retrieves, capture its response, and compare the year, status, and citation with the expected case. Log failures individually. An answer containing 1934 still fails if it cites the wrong customer’s newspaper.
Run the cases again after changing retrieval, prompts, memory structure, or models. Keep the source fixtures fixed so a new result reflects a system change rather than a conveniently revised answer key.
Give returning archive customers a public service name
The owner also wants to find Archive Desk again. A public name can lead returning customers to the official intake and contact route while the application keeps their photographs, approvals, and working memory private.
Register a .agent name for the archive service at HeadlessDomains.com, using the agent setup guide for the registration workflow. Publish the service’s actual scope. An illustrative description fits the example:
Archive Desk catalogues photographs, records source-backed corrections, and prepares captions for owner review. Use the official intake page to submit an archive or contact the operator.
The profile guide supports name, bio, and link; the bio allows 251 characters. Point the public link to a maintained service page containing the working intake and contact routes. The manifest reference covers published descriptions, declared capabilities, and service pointers. Publish interfaces the service actually operates and inspect the resulting public records.
Registration connects the name to service information. Archive Desk’s application handles storage, customer access, and memory corrections; connecting Claude requires its own application setup. The OpenClaw identity guide covers local persona and public presentation, while the canonical identity guide covers continuity across infrastructure changes.
For the archive owner, the return visit stays simple: reach Archive Desk, sign in, and request the caption. The application brings back the reviewed year and the evidence behind it. Nobody has to argue with 1932 again unless new evidence earns the conversation.
The onboarding walkthrough covers the first seven steps after registering a public name.