Teaching an Agent to Remember
Durable memory that is a real note, recall scoped to the right agent, and session digests you can read — memory without a second database.
Before you start
- second-brain/03-walking-the-knowledge-graph
What you'll learn
- Explain why agent memory is stored as notes rather than a separate store
- Save a memory and recall it in a later session
- Tell a scoped recall from a workspace-wide one
- Write a digest at the end of a working session
Try it yourself
Open this in Glassy and follow along interactively.
Without memory, every session starts with you explaining yourself again. With memory, the agent picks up the thread — and because the memory is a note, you can audit it.
Why memory is a note
Most products put agent memory in a vector store you cannot read. Glassy does the opposite: a memory
is written as a note tagged agent-memory, embedded into the same corpus as everything else.
That single decision buys four things:
- You can read it. Open the note and see what the agent believes.
- You can correct it. Edit or delete the note; no retraining, no cache to clear.
- It joins the graph. A memory can link to the note that justifies it.
- It is searchable the same way. One engine, one ranking, no second class of content.
Saving a memory
Ask in plain language:
“Remember that we chose Postgres because the read pattern was fixed and the write volume was low.”
The agent calls glassy_remember and writes a note. Then, in a later session:
“What did we decide about the database, and why?”
It calls glassy_recall and gets the note back. The test is not that it remembers within one
conversation — most assistants fake that. The test is that a new session starts already informed.
Ending a session with a digest
A memory is a fact. A digest is a session.
“Before we stop, write a digest: what we did, what we decided, what is still open.”
glassy_create_digest writes one note with those three sections. Tomorrow, the same agent recalls
the digest instead of reconstructing it from a scrollback it no longer has. This is also the cheapest
audit trail you will ever get — it is your own notes, in your own library.
Three rules that keep memory useful
- Write decisions, not transcripts. “We chose Postgres for X” beats a paragraph of options.
- One memory, one claim. Recall ranks better, and a stale fact can be deleted without losing three good ones.
- Link the source. If a memory came from a note, link it. Then “why do you think that” has an answer you can open.
What’s next?
Approving what your agent does — memory is what it knows; approval is what it is allowed to do about it.