To coach behavior over months, an agent needs memory that lasts longer than a single chat session. Otherwise it feels helpful on day one and strangely forgetful by week two.
Buffy Agent is built with three memory layers—short-term, episodic, and semantic—so it can coordinate habits, tasks, and routines based on what actually happened, not just what was said.
What is “memory” in a behavior agent?
In this context, “memory” isn’t a single database. It’s the system that answers three practical questions:
- What did the user mean right now? (short-term context)
- What actually happened over time? (event history)
- What patterns seem to be true—and useful? (learned summaries)
Short-term conversational memory (for “what did you mean?”)
Short-term memory keeps recent dialogue and references in a fast store (often Redis). It powers follow-ups like:
- “move that to tomorrow”
- “mark the second one done”
- “push this routine to 8am”
Short-term memory is necessary, but it’s not enough for coaching. It fades quickly by design.
Episodic event history (for “what actually happened?”)
Episodic memory is a log of concrete events:
- habit completed / skipped
- reminder fired
- user snoozed / ignored
- task finished / deferred
- routine started / partially completed
This gives the agent ground truth. With episodic history, you can ask:
- “How often did I actually do this in the last 3 weeks?”
- “What time do I usually complete this?”
- “When I slip, what tends to be happening around it?”
Without this layer, the agent is forced to guess—and reminder UX becomes spammy because the system can’t learn what’s working.
Semantic memory (for “what does this mean over time?”)
Semantic memory is the layer that turns raw events into useful, readable patterns—often stored in a vector database and/or derived summaries.
Examples of semantic patterns that are actually useful:
- “Deep work is more likely in mornings.”
- “Evening workouts slip on late-meeting days.”
- “Telegram reminders get faster responses than Slack.”
This is what enables personalized suggestions that aren’t random. The agent isn’t “being clever.” It’s compressing history into small, actionable hypotheses.
Example: what a semantic summary might look like
Here’s the kind of output a semantic layer might generate internally:
- “Over the last 4 weeks, you completed your ‘deep work block’ routine on 9/12 weekdays when it started before 10:30, and 2/8 weekdays when it started after 2pm.”
- “When ‘weekly review’ slipped, 5/6 times you had late meetings on the previous evening.”
- “Morning Telegram nudges for ‘drink water’ get a reply within 15 minutes ~80% of the time; similar Slack nudges within that window succeed ~30% of the time.”
The product doesn’t have to show raw numbers, but these kinds of summaries drive better suggestions.
How it feels to the user (not the architecture diagram)
Here’s what these layers let the product do:
1) Calmer reminders
If episodic history shows you usually complete “drink water” within 10 minutes of the first nudge, the reminder strategy can be:
- one nudge
- optional one follow-up near the end of the window
- otherwise: quiet + summary later
2) Better channel choice
If the system sees that Telegram nudges work in the morning and Slack works after lunch, it can route reminders accordingly (and explain the change briefly).
3) Better recovery after a missed week
Instead of “you failed, restart your streak,” the agent can say:
“Noticed this slipped last week. Want a 2-minute version Tue/Thu to restart momentum?”
That only works if the agent has factual history plus a reasonable pattern hypothesis.
What semantic memory should NOT do
A good rule: semantic memory should be helpful, small, and explainable.
It should not:
- invent fake certainty (“you always…”)
- make huge behavior changes without confirmation
- replace episodic facts (patterns are summaries, not the source of truth)
It’s better to phrase hypotheses as:
- “It looks like X tends to work better than Y. Want to try leaning into that?”
…and then treat the user’s response as new data.
Where to go next
- Next step: see how memory shows up in a real OpenClaw habit agent: OpenClaw Habit Agent Memory: Why Chat Context Isn’t Enough