YourMemory

v1.4.18
io.github.sachitrafa/yourmemory Checked 1 day ago Published 7 months ago

Persistent memory for AI agents.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

recall_memory

Retrieve memories relevant to a query. Call this at the start of every task to get context about the user's preferences, past instructions, and known facts. Returns a list of memories with their IDs.

ParameterTypeDescription
query *stringKeywords or sentence describing what to look for in memory.
api_keystringAgent API key (starts with 'ym_'). If provided, also returns this agent's private memories. If omitted, returns shared memories only.
current_pathstringCurrent working file or directory path. Memories tagged with matching paths receive a relevance boost.
top_kintegerMax memories to return (default: 5).
user_idstringUser identifier (default: 'runner').

store_memory

Store a new memory about the user. Use when you learn a new fact, preference, instruction, past failure, or successful strategy. Does not conflict with any memory returned by recall_memory.

ParameterTypeDescription
content *stringThe fact, preference, failure, or strategy to remember.
api_keystringAgent API key (starts with 'ym_'). Required for agent-scoped memory. If omitted, stored as 'user' with shared visibility.
categorystringMemory category — controls decay rate: 'fact' — user preferences, identity, stable knowledge (default, ~24 day survival) 'assumption' — inferred beliefs, uncertain context (~19 days)…
context_pathsarrayFile or directory paths this memory is associated with (e.g. ['src/services/', 'pyproject.toml']). Used for spatial relevance boosting during retrieval.
importanceYou MUST decide this. How important is this memory? (0.0–1.0) 0.9–1.0 — core identity, permanent preferences (e.g. 'Sachit uses Python') 0.7–0.8 — strong preferences, recurring patterns 0.5…
user_idstringUser identifier (default: 'runner').
visibilitystringWho can recall this memory: 'shared' (any agent, default) or 'private' (only this agent).

update_memory

Merge or replace an existing memory by its ID. Use when a recalled memory is outdated (replace) or when new info adds detail to an existing memory (merge — write the combined sentence as new_content).

ParameterTypeDescription
memory_id *integerID of the memory to update (from recall_memory results).
new_content *stringThe updated or merged memory text.
importanceYou MUST decide this. Re-evaluate importance after the update. (0.0–1.0) 0.9–1.0 — core identity, permanent preferences 0.7–0.8 — strong preferences, recurring patterns 0.5 — regular f…