Expand description
File-based memory mechanism.
When the SQLite memory tools are disabled (memory_mode = "file"), the
agent keeps long-term memory in Markdown files under the memory
directory: a master memory.md plus daily memory-YYYY-MM-DD.md files.
This module resolves the memory settings and builds the
{memory_section} injected into the system prompt: the mechanism
explanation plus the current master file content (bounded by
MAX_MEMORY_INJECT_BYTES, truncated beyond that).
Structs§
- Memory
Settings - Memory settings for one Agent construction.
Constants§
- MAX_
MEMORY_ INJECT_ BYTES - Upper bound for the master memory file content injected into the
system prompt. Larger files are truncated with a note pointing at
read.
Functions§
- build_
memory_ section - Build the
{memory_section}text for the system prompt. - resolve_
memory_ settings - Resolve memory settings from config. Called by frontends when constructing an Agent.