@letta-ai/memfs-search
v0.1.0
Published
Letta Code mod package that adds an agent-callable MemFS memory search tool.
Readme
MemFS Search
A Letta Code mod package that adds an agent-callable memfs_search tool for searching the current agent's MemFS memory files.
The tool includes built-in keyword search over markdown memory files and optional QMD-backed semantic/hybrid search when qmd is installed and indexed.
Original source: https://tangled.org/cameron.stream/memfs-search
Install
letta install npm:@letta-ai/memfs-searchRun /reload in active sessions after installing.
Tool
memfs_searchsearches this agent's local MemFS projection.
Actions:
search(default) searches memory files.statusreports memory path and QMD availability.
Search modes:
keyword- built in, no dependencies.semantic- usesqmdstructured vector search.hybrid- usesqmdstructured lexical + vector search.
Example tool call:
{
"action": "search",
"query": "commit footer preferences",
"mode": "keyword",
"limit": 5
}Status check:
{ "action": "status" }QMD setup
semantic and hybrid modes require qmd to be installed and indexed. Install @tobilu/qmd, create a collection named memory over $MEMORY_DIR, and embed the memory markdown files.
If QMD is unavailable, use mode: "keyword".
Memory path detection
The mod first uses MEMORY_DIR when present. If not present in the mod runtime, it falls back to common local Letta memory paths using the current agent id:
~/.letta/lc-local-backend/memfs/<agent-id>/memory~/.letta/agents/<agent-id>/memory
Safety
This is trusted local code. It reads markdown memory files from the current agent's local MemFS projection and returns matching snippets to the model.
If a mod breaks startup or command handling, recover with:
letta --no-mods
# or
LETTA_DISABLE_MODS=1 lettaSee MOD.md for the agent-facing behavioral contract.
