store_memory
Persist a fact, preference, or piece of context for a user.
Required scope: memory:write
When to call: After learning something meaningful about a user — their preferences, goals, past decisions, or any context worth recalling later. Also call it when explicitly asked to “remember” something.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
content | string | yes | — | The information to store. Be specific and self-contained — each memory should make sense without surrounding context. Max 8 KB. |
agent_id | string | no | "mcp-client" | Identifier for the agent storing this memory. Use a consistent value for the same agent across sessions, e.g. "claude-desktop" or "customer-support-bot". |
user_id | string | no | "default" | Identifier for the user this memory belongs to. Use a stable, unique value per person, e.g. "user-123" or "alice". |
confidence | float | no | 1.0 | Your confidence in this information’s accuracy, 0.0–1.0. Use lower values for inferred or uncertain facts. |
extract | boolean | no | true | When true, the cognition worker runs LLM extraction to transform raw content into clean, discrete facts before storage. Set to false to store content verbatim with no LLM call. |
Example tool call
Tool result
The memory is processed asynchronously. It will be available for search within a few seconds of the tool call returning. Pass
extract=false to skip LLM fact extraction and store content verbatim — useful when you already control the phrasing of the fact.search_memories
Search for relevant memories using semantic similarity.
Required scope: memory:read
When to call: At the start of a conversation to load user context, before answering questions that might benefit from past context, or when asked “do you remember…”. Results are ranked by a combination of semantic relevance, importance, and recency.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
query | string | yes | — | Natural language description of what you are looking for. Can be a question, a topic, or a description of the context you need. Max 2048 characters. |
agent_id | string | no | — | Restrict results to memories written by this agent. Leave empty to search across all agents. |
user_id | string | no | — | Restrict results to memories belonging to this user. Leave empty to search across all users. |
k | integer | no | 10 | Maximum number of memories to return. Range: 1–50. |
task_context | string | no | — | Optional description of what you are currently trying to accomplish. Used to improve ranking beyond pure semantic similarity. Example: "composing a weekly digest email". |
Example tool call
Tool result
score field is a multi-signal fusion score — use it to compare results within a single response, not across different queries.
list_memories
List memories in reverse-chronological order with cursor-based pagination.
Required scope: memory:read
When to call: When you need an overview of all stored memories for a user or agent, or when you want to browse by recency rather than semantic relevance.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
agent_id | string | no | — | Filter to memories written by this agent. Leave empty to list all agents. |
user_id | string | no | — | Filter to memories belonging to this user. Leave empty to list all users. |
limit | integer | no | 20 | Number of memories to return per page. Range: 1–50. |
cursor | string | no | — | Opaque cursor from a previous list_memories response. Omit to start from the most recent memory. |
Example tool call
Tool result
cursor in the next call to fetch the next page.
Memory
content is intentionally excluded from list results to keep responses concise. Call get_memory with a specific ID to retrieve the full content.get_memory
Retrieve the full content and metadata of a single memory by its ID.
Required scope: memory:read
When to call: When you have a memory ID from search_memories or list_memories and need its complete record, including the full content field.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The UUID of the memory to retrieve. |
Example tool call
Tool result
delete_memory
Delete a memory by its ID.
Required scope: memory:delete
When to call: When a stored memory is outdated, incorrect, or when the user explicitly asks for it to be removed.
This performs a soft delete: the memory’s status is set to deprecated and it is immediately excluded from all future searches. The record is not permanently erased from the database. For permanent erasure (GDPR), use DELETE /v1/memories/{id}?hard=true via the REST API directly.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The UUID of the memory to delete. |
Example tool call
Tool result
Error handling
Tool-level errors (missing scope, validation failures, not found) are returned as tool results withisError: true. Your AI client will receive the error message as text and can explain it to the user or take corrective action.
Internal server errors are returned as JSON-RPC errors and surface as a tool failure in the client.
Common error messages
| Message | Cause |
|---|---|
API key is missing the memory:write scope. | The key used does not have memory:write. Create a new key with the correct scopes. |
API key is missing the memory:read scope. | The key used does not have memory:read. |
API key is missing the memory:delete scope. | The key used does not have memory:delete. |
Monthly write limit reached. | Your plan’s write quota is exhausted. Upgrade your plan in the dashboard. |
Monthly search limit reached. | Your plan’s search quota is exhausted. |
content is required | store_memory was called without a content argument. |
Memory not found: <id> | The ID does not exist or belongs to a different organization. |
confidence must be between 0.0 and 1.0 | confidence argument was out of range. |
Writing effective system prompts
To get the most out of Thrindex memory tools, include guidance in your agent’s system prompt:agent_id and user_id consistent across sessions. Changing them creates a separate memory namespace and loses access to previously stored memories.