Skip to main content

Module memory_tool

Module memory_tool 

Source
Expand description

LR-13 — Anthropic memory-tool backend adapter.

Implements the client-side operation contract of Anthropic’s memory tool (“you implement the storage backend”): view, create, str_replace, insert, delete, rename over a /memories path space — but backed by grains instead of naive files, so every edit is a supersession (full history), reads are entity_latest point lookups, provenance links survive renames, and crypto-erasure applies to the agent’s memory directory.

Mapping: one file = one supersession chain of Fact grains with subject = <path>, relation = "memory_file", object = <content digest> (kept short so the dictionary never stores file bodies), and the body in the grain’s context.content field.

Structs§

MemoryTool

Constants§

MEMORY_FILE_RELATION