MemdirService class

Memdir service — manages persistent memory for the session.

Constructors

MemdirService({String? projectRoot})

Properties

hashCode → int
The hash code for this object.
no setterinherited
projectRoot → String?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

deleteMemoryFile(String filename) → Future<bool>
Delete a memory file.
initialize() → Future<void>
Ensure the memory directory structure exists.
loadMemoryPrompt() → Future<MemoryPromptResult>
Build the memory prompt to inject into the system prompt. Loads MEMORY.md content and constructs behavioral instructions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readEntrypoint() → Future<String?>
Read MEMORY.md entrypoint content.
readMemoryFile(String filePath) → Future<String?>
Read a specific memory file by path.
scanMemories() → Future<List<MemoryHeader>>
Scan all memory files in the directory.
toString() → String
A string representation of this object.
inherited
writeEntrypoint(String content) → Future<void>
Update the MEMORY.md entrypoint index.
writeMemoryFile({required String filename, required String name, required String description, required MemoryType type, required String content}) → Future<void>
Write a memory file with frontmatter.

Operators

operator ==(Object other) → bool
The equality operator.
inherited