AI engineering · Persistent memory

When feedback becomes memory: designing how AI agents learn

An account manager reviews an AI-written monthly client update. She shortens the opening, moves the decisions to the top and replies, “Looks good.” A background process reads the exchange and saves a new instruction: always remove the background section from client updates.

The next report is for a different client. Its background explains why a deadline moved. The agent removes it anyway, following a preference nobody actually stated.

This is a useful failure to design around when an assistant starts remembering its work. The same mechanism that saves people from repeating themselves can carry an unsupported interpretation into every future task.

Consider an assistant used by an agency to draft monthly updates for several client workspaces. I would give it a small, inspectable memory system with an explicit path from feedback to a reusable preference. The agency, clients and records below are illustrative; this is a proposed design, not a deployed client system or a measured result.

Decide what the feedback actually says

“Looks good” is evidence that the reviewer responded positively to this draft. It leaves the reusable lesson unclear. The reviewer may like the new opening, accept the entire revision or simply be ready to finish. I would retain that event against the reviewed artifact without turning it into a permanent writing rule.

A stronger instruction is: “For Cedar monthly updates, put decisions first.” That states a behaviour and a scope. It still does not say to delete context, use the same layout for other clients or send a report without review. The memory candidate should preserve those limits.

This design learns by changing records that a later run can retrieve. It does not update the model’s weights. Saving a conversation, remembering a preference and changing the agent’s operating instructions are separate operations, with different consequences.

Vague praise stays attached to one draft as an event. An explicit Cedar instruction becomes a scoped preference candidate. Removing background for every client is an unsupported inference.
Two kinds of feedback, two storage decisions. A positive response supplies an event; a reusable preference needs an identifiable behaviour and scope. These are proposed decisions for the example.
Vague praise stays attached to one draft as an event. An explicit Cedar instruction becomes a scoped preference candidate. Removing background for every client is an unsupported inference.

Give each kind of memory its own job

I would separate the current task state, past events and reusable preferences. The draft revision and outstanding edits belong to the current task. A record that someone accepted a particular report belongs to its history. A preference about future Cedar reports belongs to a scoped collection the assistant can retrieve later.

Company policy has a different owner. A writing preference cannot change the required legal notice or grant access to another client’s records. The application should assemble these inputs with their origin and intended role intact. The existing article on which instructions an agent should trust covers the broader action and authority boundary.

Memory responsibilities
Stored itemHow this assistant should use it
Current draft and editsResume the work in this task
Review event for draft 12Explain what happened to that artifact
Cedar monthly-update preferenceGuide matching future drafts
Required agency noticeApply the controlled document policy

For an initial release, I would use structured preference records with a readable management view. A plain file can work for a small, single-user assistant if updates are versioned and controlled. A shared service also needs access boundaries and coordinated writes. A vector index may help find relevant records later, but it does not establish who can change them or which version is current.

Make a memory candidate carry its evidence

The extraction step should propose a bounded record. For the Cedar instruction, that means the preference text, memory type, client workspace, document workflow and a reference to the exact feedback and draft revision. Keep the original wording available to authorised reviewers under an appropriate retention policy. A summary by itself can conceal the qualification that made the instruction safe to reuse.

The application supplies the authenticated actor and permitted workspace. It must not accept a model’s claim that the speaker owns all client preferences. In this example, a workspace manager can change shared writing preferences for that workspace; another contributor can propose a change. Those are product choices to agree before implementation.

The following is a proposed logical record after validation. The identifiers are illustrative, and the status is deliberately still pending:

{
  "id": "pref-cedar-17",
  "type": "writing_preference",
  "text": "Put decisions first in monthly updates.",
  "scope": { "workspace": "cedar", "workflow": "monthly_update" },
  "evidence": { "feedback": "msg-208", "artifact": "draft-12" },
  "status": "pending",
  "revision": 1
}

I would also record who proposed and activated it, the timestamps and the extraction configuration. A later engineer needs to distinguish a user’s statement from the system’s interpretation. A model-generated confidence score can help organise review; it cannot supply missing permission or turn ambiguous praise into an explicit instruction.

Promote preferences through an explicit write path

For the first shared-workspace release, I would show the proposed preference beside its source and ask an authorised manager to activate, edit or dismiss it. A small review queue introduces friction, so I would limit extraction to feedback likely to affect future work. Storing every pleasant remark creates a queue people will stop reading.

That is one implementation policy, not a requirement that every personal preference needs another approval. A product can immediately save an explicit, permitted instruction such as a user’s preferred date format. The important decision is which categories qualify for automatic writes, at what scope, and how the user can see and undo them.

A pending preference includes its source and Cedar scope. Application checks and review of the exact revision gate activation. Missing evidence or a conflict keeps it pending.
Proposed admission path for shared preferences: the model proposes; the application checks scope, evidence and authority; the manager reviews the exact revision. Pending records do not guide new drafts.
A pending preference includes its source and Cedar scope. Application checks and review of the exact revision gate activation. Missing evidence or a conflict keeps it pending.

Activation should be a conditional write against the candidate and current preference versions. If the candidate changes during review, the previous approval must not activate its replacement. If two updates conflict, the backend should surface that conflict rather than let whichever worker finishes last silently win.

Writing memory during the task makes a preference available sooner, but adds work to the response path. Background extraction keeps that work off the immediate path while introducing a delay. I would show when a preference is pending and define when it takes effect. Retried background jobs need a stable source-and-candidate identity so one message does not produce several active copies.

Retrieve within scope before asking what is relevant

When drafting the next update, the backend establishes the organisation, workspace and workflow from the authorised task. Only active preferences within that scope are eligible. If semantic search is useful, apply those access and scope restrictions before returning content to the model; a request to the model to “ignore other clients” is insufficient.

For Cedar, “put decisions first” can guide the opening. For Larch, it should not be retrieved at all. An explicit instruction for this particular report may override an ordinary writing preference, while a controlled policy remains in force. That precedence needs to be specified by the application. When two applicable preferences conflict without a clear rule, expose the conflict instead of asking similarity ranking to choose an authority.

Record the memory IDs and revisions used by the run, alongside the prompt configuration and resulting draft. This makes an unexpected layout investigable: did retrieval select the wrong preference, did the stored text overstate the source, or did generation ignore the applicable instruction? A useful trace answers those questions without putting every client conversation into a broadly accessible log.

Make corrections survive the next background job

Suppose an earlier extractor saved “put decisions first for every client” under organisation memory version 7. An authorised agency owner corrects it: “Cedar monthly updates only.” I would retire the broad record and activate the corrected, narrowly scoped record in one coordinated update, advancing the organisation’s memory version. Keep the supersession relationship where retention permits it.

A stale consolidation job may still be holding version 7. Its write must check the memory version it read against the current version and be rejected if that base has changed. It can then reread the correction and form a new proposal. Protecting only the original row is insufficient if the job can insert the same old claim under a new ID; the organisation-wide version check must cover that path too. A current job processing the old feedback also needs the linked correction, so it cannot treat the contradicted claim as fresh evidence. That deliberately coordinates more writes in this small first release; a larger system would need a partitioning strategy that still covers cross-workspace changes.

A broad preference is replaced by a Cedar-only preference. The scope memory version advances from r7 to r8, stale writers are rejected, and derived context refreshes for the next run.
Correction sequence: change authoritative records, reject stale writes, refresh derived context, then inspect the next run. The illustrated versions identify states in the example; they are not performance measurements.
A broad preference is replaced by a Cedar-only preference. The scope memory version advances from r7 to r8, stale writers are rejected, and derived context refreshes for the next run.

Search indexes, cached profiles and consolidated summaries also need an invalidation path. I would keep record IDs and revisions with derived context, reject obsolete entries during retrieval and rebuild affected summaries. A retired preference should not survive as an unattributed sentence in a “user profile” that is still injected into every prompt.

A run that already received the old memory needs separate handling. For an unsent draft, mark it for regeneration or review before use; for a report already sent, let the owner inspect and correct the output. Memory correction changes future context. It cannot retract a delivered document. A request to forget information also needs a retention and deletion path for source text, derived records and backups, with actual limits made clear. Superseding a preference alone does not erase its data.

Test what changes in the next task

I would test memory formation and later behaviour separately. First, inspect whether feedback creates the intended candidate and state. Then start a fresh task with controlled inputs and inspect which memory revisions were retrieved and what the draft contains. Passing one stage does not establish the other.

Proposed acceptance cases, not executed system results
Proposed caseRequired observation
Reviewer says “Looks good”Event retained; no general preference activated
Manager states the Cedar ruleExact scoped candidate can reach activation
Next task is for LarchCedar preference is absent from model context
Candidate changes during reviewOld approval cannot activate the new revision
Two writers use the same base versionA conflicting stale write is rejected
Correction races with consolidationBroad rule stays retired, including under new IDs
Old rule remains in an index or summaryRetrieval excludes it; affected context is refreshed

Keep a baseline that uses the same current-task instructions without persistent preferences. Compare whether memory reduces repeated corrections while preserving useful context in other workspaces. Track unsupported preferences, wrong-scope retrievals, correction propagation and the staff effort needed to manage the system. These are proposed checks and measures, not results from an implemented benchmark.

My client-commissioned AI Pitch Deck Generator includes a workflow from input notes through research, structured content, evaluation and revision to editable presentation output. That experience is relevant to reviewing intermediate artifacts and their changes; it does not establish that the memory system described here has been implemented.

For a team adding persistent memory, I would help define what may be learned, design the write and retrieval boundaries, coordinate implementation and verify the correction path. If your team needs an engineer to own that work, tell me about the workflow and the role. One example of feedback that should influence a future task, and one that should remain local, is a useful place to start.

Available for project work

What do you need built?

Tell me what you want to achieve, your current tools and the result you expect. For an existing integration, include an example of what goes wrong.

Send your project brief

Let’s work together

Tell me about your project.

What would you like to build or improve? Share a few details and I’ll get back to you by email.

One PDF, DOCX, TXT, PNG or JPG file, up to 10 MB.

Up to two requests per hour.

Your details, IP address and attachment are sent to me to respond to this request and prevent spam. Your country and region are estimated from your IP address. Please leave out passwords and sensitive personal information. IP Geolocation by DB-IP.

Delivered directly to my inbox.