/memories root, that the agent sees in its prompt and edits with tools.
Three pieces work on the same files:
Storage
The files live in aMemoryStore:
conditional_writes=True also sends If-Match headers, which makes the check atomic on servers that honour them (AWS S3). Paths that try to leave the root are rejected.
An agent with memory
alwaysfiles are rendered in full in a## Memoryblock of the system prompt; a missing one starts from a template.browseprefixes are listed in an index (path and description of each topic file); the agent reads one withread_memory.aload(query=...)also picks the topic files the request is about, by matching it against the index (file names, descriptions, identifiers) without an LLM call, and renders them in the prompt.recall_limit(3) caps them;recall_stopwordsadds the common words of your domain.- The tools work on an in-process copy;
aflush()writes the files that changed. After a version conflict, this run’s edits are replayed on a fresh copy.
system_prompt.
The tools
tools= exposes a subset. A conversational agent typically keeps read_memory and memory_edit and leaves the rest to the consolidator. max_lines (200) caps a file on every write, max_chars caps its rendering in the prompt.
Consolidating after a conversation
creatable_prefixes, never touching a file it was not shown. result.failed tells a failed call from “nothing to change”.