Agent Memory
By Ai Flowi · Published
Agent memory is information retained so an agent can use it in a later interaction or task step. It can include conversation messages, explicit task notes or facts retrieved from a separate knowledge source. These forms serve different purposes; storing text does not mean a model has learned it permanently.
The useful question is what will be available next time, to whom and for how long. A recent chat window helps interpret a follow-up. A reviewed source document helps answer a policy question. Neither automatically provides a reliable record of unfinished work.
What is the difference between conversation, task notes and knowledge in agent memory?
| Record | Useful content | Check before relying on it |
|---|---|---|
| Recent messages | The question, a clarification and earlier replies. | Correct session, order and retrieved message window. |
| Task notes | Accepted facts, remaining questions and a current decision. | Source attribution and whether the note is still current. |
| Curated knowledge | Approved documents independent of the conversation. | Access permission, source version and retrieval relevance. |
A message can contain an inaccurate claim, while a curated document can become outdated. Memory design therefore needs provenance and correction rules as well as storage. Do not elevate an earlier model reply into an authoritative source simply because the history component can retrieve it.
Related: Zep memory integration for AI Flowi Workflow.
How memory reaches a later answer
First decide which information to record. Then store it with the intended scope, retrieve an appropriate subset and include that subset in the next task’s context. Each operation can fail independently: a message may not have been stored, retrieval may select the wrong records or the next prompt may omit what was retrieved.
A model can answer only from information it receives or from capabilities separately available to it. Keeping a record in a table does not prove the next model call reads that table. Check both the retrieval result and the assembled prompt when a follow-up appears to be forgotten.
Memory-related components in AI Flowi Workflow
The Message History interface covers the storage and retrieval fields used by the exercise below.
A retrieved conversation establishes what was said; deciding which statement still applies is a separate correction rule.
Inspect Message Store in the catalogue for the storage operation, then verify the saved record before assessing recall.
Check message-saving settings in the Chat Input and Chat Output references when the exercise starts in chat.
A synthetic remembering and forgetting exercise
Use a fictional preference that has no personal information. First tell the conversation that the report should use bullet points. Later ask for the preference to change to paragraphs. Finally ask what format should be used now. The expected behaviour for this exercise is to use the latest explicit correction and avoid inventing another preference.
example configuration, not a recorded test
Message History, retrieval node
mode: "Retrieve"
order: "Ascending"
n_messages: 4
session_id: synthetic-format-check
Message Store, storage node
message: supply each synthetic preference message
session_id: synthetic-format-check
sender: User
The count is a proposed exercise setting, not a documented maximum or observed retrieval result. Keep storage and retrieval as separate checks. Inspect what messages_text and dataframe contain before attaching them to a later model stage; an output type match alone cannot establish selection order or message-window semantics.
Use the Language Model reference when preparing the later prompt from retrieved conversation text.
Inspect corrections before judging recall
Use these invented turns in order: “Use bullet points for the report”; “Correction: use paragraphs for the report”; “Use a table for the appendix only”; then “What format applies to the report and appendix?” The intended answer preserves both scopes: paragraphs for the report, a table for the appendix. Inspect the stored text and retrieved selection before asking the model. If the correction is absent from retrieval, the failure is in context delivery; if both statements are present but the answer chooses bullets, inspect the interpretation instructions.
Now add unrelated synthetic turns and retrieve again with the same window setting. Record which correction remains available instead of assuming the last four messages means the last four user instructions. Sender filtering and ordering can affect the useful context. A summary that says only “prefers tables” loses the appendix qualifier, even if every underlying message remains stored.
For forgetting, withdraw the appendix preference and ask the same question again. The expected result is an unspecified appendix format, not a return to an older guess. Check any maintained summary as well as raw history: a stale summary can reintroduce a withdrawn preference. If deletion is available in your chosen backend, remove a synthetic record and inspect retrieval again. A successful answer after omission proves only that the record was not used in that prompt; it cannot prove storage deletion.
Keep separately curated knowledge separate
For separately curated document retrieval, follow RAG rather than treating conversation history as the source collection.
If a conversation claims that a policy changed but the approved document still says otherwise, retain the chat as a report of that claim and mark the disagreement. The conversation can prompt a source review; it should not silently become the replacement policy. When the question is only about the user’s report-format preference, document retrieval adds no useful authority: inspect the correction history instead.
What retention and forgetting checks must prove
- Storage: verify that the synthetic message was recorded before blaming retrieval.
- Window: add further synthetic turns and observe which earlier turns remain available. Document the actual behaviour.
- Correction: confirm that the latest explicit preference supersedes the earlier one.
- Isolation: use another authorised test session and confirm it cannot obtain the first session’s messages. An identifier is not evidence of isolation.
- Removal: if your backend supports deletion, verify both the stored record and subsequent retrieval. Merely omitting a message from one prompt does not remove it from storage.
No retention duration, deletion feature or durable learning result is established by this catalogue. These memory-related components are documented in the catalogue; not production-tested by Ai Flowi. A model-backed follow-up needs your own provider account and API key, with provider charges separate from the workflow plan.
Common mistakes and related terms
Adding every past turn can obscure the current instruction and carry unnecessary sensitive data. Summarising indiscriminately can erase corrections or source qualifiers. Record only the context needed for the task and keep source-backed facts distinguishable from a model’s earlier guesses.
AI agent state describes explicit progress and completion records. Autonomous agents concerns action authority, while multi-agent systems adds handoff decisions about what each participant may see. The use-case hub links the existing Memory Chatbot starting pattern without establishing new runtime results here.
Workflow usage
Plans: Go from USD8/month billed yearly (USD10 monthly), Plus from USD16 (USD20 monthly), Pro 100 from USD80 (USD100 monthly), Pro 200 from USD160 (USD200 monthly) and Pro 500 from USD400 (USD500 monthly), with 5,000 to 250,000 Flowi Tokens/month and top-ups; 1 token per node run; third-party API and model usage is not included.