What is agent_memory, and how does it work?

agent_memory gives an agent you deploy a small memory that lasts between runs: facts, cursors and "already handled this" markers. It keeps one private memory per end user and one shared memory for everyone. The agent sees its memory at the start of every turn, so it never acts on the same thing twice.

What makes it different

what it does the primitive behind it what that buys you
Memory for a runtime that has none Agents deployed to the cloud run without Irene's full memory system (Chronicle, dreaming). agent_memory is a small key-value memory built for them A scheduled cloud agent still remembers what it already did
Private per user, shared per agent Two scopes: user (private to the person talking to it, the default) and agent (shared, for everyone) One customer's details never show up in another's chat
Always in view Each turn, the agent is shown the shared memory plus this user's memory, never anyone else's It doesn't have to remember to look things up
Never re-acts A scheduled check advances its "seen up to here" marker only when it acts, so an item that didn't match stays open for next time No duplicate replies, and nothing skipped

How it works

The tools

tool does in auto mode
set_memory(key, value, scope) remember a fact or marker; overwrites the key runs (a local change)
get_memory(key) recall: checks this user's memory first, then the shared one runs (a read)
list_memory() everything: this user's private memory and the shared memory runs (a read)
delete_memory(key, scope) forget a key treated as deleting

Scopes

scope private to use it for
user (default) the end user in this conversation their name, preferences, order number, where you left off
agent nobody: shared with every user facts the owner curates, cursors for scheduled checks, "handled" markers

Where it lives

  • On the deployed agent's server, saved to cloud storage: one shared file for the agent, and one per end user. A user's memory is loaded the first time they show up, and never merged with anyone else's.
  • On your computer, it does nothing unless attached. Your own Irene uses Chronicle for memory instead.

Why it's built this way: a cloud agent is slimmed down to start fast and serve many people. It doesn't carry Irene's desktop memory system. But an agent that checks an inbox every hour still needs to know which emails it already answered.

How agents are told to use it

  • Remember small, durable things: a cursor, a dedupe key, a preference. Not whole documents (those go in a store).
  • Use user scope by default; agent scope is for things every user should share.

Where you see it

  • The Agent Builder attaches it to agents that run on a schedule or talk to many people.
  • On the deployed agent, memory calls show as ordinary tool cards, and the memory appears in the agent's context as "shared facts you know" and "your memory of this user".

Limits

  • A flat list of keys and values. No search. Long text belongs in a store.
  • No size cap is set, but everything in it is shown to the agent every turn, so keep it small.
  • Deployed agents only. On your own computer, use Chronicle.

What it costs

  • No usage of its own. It adds a little to every turn's input, since the memory is shown each time.

[Ask Irene about this]

Updated