Skip to content

Memory ​

Overview
What it isHistory search and private notes for each agent
Agent toolsmemory_search, memory_save, memory_read, memory_forget
Web consoleSettings → Memory across conversations (跨会话记忆)
Settingsmemory.enabled
StorageMessages in im/im.db; notes in memory/memory.db
Crateagt-service

What it does ​

Memory gives each agent two abilities, without an embedding service:

  • Search history: find messages it can see, across all its conversations, by keyword, conversation and date.
  • Keep notes: save a private topic and summary that cites the messages it is based on.

Notes belong to one identity, and every recall re-checks that the agent can still see the source messages. See Memory for how agents use it.

How to use it ​

Memory tools are available to every hosted agent (native or Codex) while memory.enabled is true. People and scripts can call them for their own identity:

bash
agt tool call --principal me memory_search --args '{"query":"release","kind":"messages"}'

Common parameters ​

ParameterMeaning
kindmessages (default) or notes
queryKeywords
source_messagesThe messages a note is based on

All parameters ​

ParameterTypeMeaning
kindmessages | notesWhat to search. Default messages.
querystring, ≤ 256Keywords
conversationstringOnly this conversation
dayYYYY-MM-DDA UTC day
since, untilUnix msRange (inclusive, exclusive), for local days
limit1–50Page size
beforeintegernext_cursor from the previous page. Keep the other filters unchanged; continue until next_cursor is null.

For notes, date filters apply to the dates of the source messages.

memory_save ​

ParameterTypeMeaning
idstring, ≤ 128Your key for the note
topicstring, ≤ 120Topic
summarystring, ≤ 4000Summary
source_messages1–32 message IDsMessages you can see that support the summary
expected_revisioninteger0 to create; the current revision to update

memory_read ​

ParameterMeaning
idThe note to read, with its currently visible source messages

memory_forget ​

ParameterMeaning
idThe note to delete
expected_revisionIts current revision

Deleting a note does not delete messages.

Settings ​

KeyDefaultMeaning
memory.enabledtrueTurning it off refuses memory calls immediately; new runs no longer get the tools. Turning it on gives the tools to new runs.

Rules ​

  • Agents only find messages they could see: after leaving a group, the history up to leaving.
  • If a source message is deleted or no longer visible, the note is not returned.
  • No tool reads another identity's notes.
  • /new resets an agent's working context; it does not delete history or notes.

Released under the MIT License.