Memories
The Memories API is the core of Memsolus. Use it to store agent observations, user preferences, session facts, and any information that should persist across conversations.
Endpoint Overview
| Method | Path | Permission | Description |
|---|---|---|---|
GET | /v1/memories | memory.read | List or search memories |
POST | /v1/memories | memory.write | Store a new memory |
GET | /v1/memories/entities | memory.read | List users and agents with memory counts |
GET | /v1/memories/categories | memory.read | List distinct memory categories |
GET | /v1/memories/:id | memory.read | Get a single memory by ID |
PUT | /v1/memories/:id | memory.write | Update memory content, metadata, or priority |
DELETE | /v1/memories/:id | memory.delete | Delete a memory |
POST | /v1/memories/:id/promote | memory.write | Promote a TASK-layer memory to permanent storage |
POST | /v1/memories/:id/feedback | memory.write | Submit quality feedback on a memory |
GET | /v1/memories/:id/history | memory.read | Get the event timeline for a memory |
GET | /v1/memories/profile/:workspaceId/:userId | memory.read | Get a user's extracted memory profile |
DELETE | /v1/memories | memory.delete | Delete all memories (requires password confirmation) |
Memory Object
| Field | Type | Description |
|---|---|---|
id | string | UUID of the memory |
memory | string | Text content of the memory |
user_id | string | User identifier |
agent_id | string | null | Agent identifier |
session_id | string | null | Session identifier |
priority | LOW | MEDIUM | HIGH | Memory priority |
status | PENDING | PROCESSING | COMPLETED | FAILED | Processing status |
categories | string[] | Category tags |
metadata | object | null | Arbitrary key-value pairs |
workspace_id | string | Workspace UUID |
access_count | number | Number of times this memory was retrieved |
last_accessed_at | string | null | ISO 8601 timestamp of last retrieval |
created_at | string | ISO 8601 creation timestamp |
updated_at | string | ISO 8601 last-update timestamp |
List Memories
/v1/memoriesList memories with optional filtering and semantic search
| Parameter | Type | Description |
|---|---|---|
search | string | Search query — enables vector search when present (max 1000 chars) |
user_id | string | Filter by user identifier |
agent_id | string | Filter by agent identifier |
workspace_id | string (UUID) | Filter by workspace |
priority | enum | Filter by a single priority: `LOW`, `MEDIUM`, or `HIGH` |
priorities | string[] | Filter by multiple priorities (comma-separated). Takes precedence over `priority` |
categories | string[] | Filter memories that contain at least one of the given categories |
created_after | string (ISO 8601) | Start of the creation date range |
created_before | string (ISO 8601) | End of the creation date range |
mode | enum | Search mode: `hybrid` (default), `semantic`, or `keyword` |
expand | boolean | Expand the query to improve semantic recall. Applies only to `semantic` and `hybrid` modes (default: false) |
entity_id | string (UUID) | Filter memories linked to a specific entity |
entity_name | string | Filter memories by normalized entity name (exact match) |
page | number | Page number, starting at 1 (default: 1) |
page_size | number | Results per page, max 100 (default: 10) |
Search Modes
| Mode | Best For |
|---|---|
hybrid | General-purpose retrieval (recommended) |
semantic | Meaning-based similarity |
keyword | Exact term matching |
Create Memory
/v1/memoriesStore a new memory
| Parameter | Type | Description |
|---|---|---|
memoryrequired | string | The text content of the memory (max 50,000 chars) |
user_id | string | The user this memory belongs to (max 255 chars) |
agent_id | string | The agent that created the memory (max 255 chars) |
session_id | string | The session context (max 255 chars) |
priority | enum | Memory priority: `LOW`, `MEDIUM` (default), or `HIGH` |
categories | string[] | Category tags for the memory (max 20 items, 100 chars each) |
metadata | object | Arbitrary key-value pairs for filtering and context |
layer | enum | Storage layer: `TASK` (enables automatic TTL) or `RAW` (default — permanent storage) |
expires_at | string (ISO 8601) | Explicit expiration date — only valid when `layer=TASK`. Must be a future date. |
Returns 409 Conflict with error code DUPLICATE_MEMORY if a memory with identical content already exists for the same workspace.
After creation, the memory is processed asynchronously. Status transitions from PENDING → PROCESSING → COMPLETED.
Get Memory
/v1/memories/:idGet a single memory by ID
Update Memory
/v1/memories/:idUpdate memory content, metadata, or priority
| Parameter | Type | Description |
|---|---|---|
memoryrequired | string | Updated memory content (max 50,000 chars) |
priority | enum | Updated priority: `LOW`, `MEDIUM`, or `HIGH` |
categories | string[] | Replace the categories list (max 20 items) |
metadata | object | Replace the metadata object |
Updating a memory re-queues it for processing — status returns to PENDING.
Delete Memory
/v1/memories/:idDelete a memory
Delete All Memories
/v1/memoriesDelete all memories in the workspace (requires password confirmation)
This endpoint requires a X-Confirm-Password header with the account password. Optionally scopes the deletion to a specific user or agent.
| Parameter | Type | Description |
|---|---|---|
user_id | string | Scope deletion to a specific user ID |
agent_id | string | Scope deletion to a specific agent ID |
Returns 400 Bad Request with error code PASSWORD_CONFIRMATION_REQUIRED if the password header is missing or incorrect.
Promote Memory
/v1/memories/:id/promotePromote a TASK-layer memory to permanent storage, removing its expiration
TASK-layer memories have an automatic expiration date. Promoting a memory makes it permanent.
| Error code | Description |
|---|---|
404 MEMORY_NOT_FOUND | Memory not found |
409 MEMORY_NOT_PROMOTABLE | Memory is not in the TASK layer |
410 MEMORY_EXPIRED | Memory has already expired |
Submit Feedback
/v1/memories/:id/feedbackSubmit quality feedback on a memory
| Parameter | Type | Description |
|---|---|---|
signalrequired | enum | Feedback signal: `POSITIVE`, `NEGATIVE`, or `NEUTRAL` |
query_hash | string | Hash of the search query that returned this memory (max 64 chars). Used for ranking improvement. |
Get Memory History
/v1/memories/:id/historyGet the event timeline for a memory
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
page_size | number | Results per page, max 100 (default: 20) |
List Entities
/v1/memories/entitiesList users and agents with their memory counts
List Categories
/v1/memories/categoriesList all distinct memory categories in the workspace
Get Memory Profile
/v1/memories/profile/:workspaceId/:userIdGet the extracted memory profile for a user in a workspace
Returns the profile extracted from processed memories for the given user. Returns null if no profile has been extracted yet.
Returns 403 WORKSPACE_ACCESS_DENIED if the API key does not have access to the specified workspace, and 404 WORKSPACE_NOT_FOUND if the workspace does not exist.