Memories API
Direct CRUD endpoints for managing individual memory facts. Use these when you want explicit control over what is stored. For conversation-based auto-extraction, see the Engine API.
All endpoints require Token authentication:
Authorization: Token mg-your-keyPOST
/v1/memories/Add new memories from a list of messages. The system extracts facts from messages and stores them.
Auth
TokenRequest Body
{
"messages": [{"role": "user", "content": "text"}],
"user_id": "string (optional)",
"agent_id": "string (optional)",
"app_id": "string (optional)",
"metadata": {},
"categories": ["string"],
"expiry": "datetime (optional)"
}POST
/v1/memories/search/Search memories using semantic similarity.
Auth
TokenRequest Body
{
"query": "string",
"user_id": "string (optional)",
"top_k": 10,
"filters": {}
}POST
/v1/memories/get/List memories with pagination and filters.
Auth
TokenGET
/v1/memories/{id}/Get a single memory.
Auth
TokenPUT
/v1/memories/{id}/Update memory text.
Auth
TokenDELETE
/v1/memories/{id}/Soft-delete a single memory.
Auth
TokenDELETE
/v1/memories/Delete memories matching filters (user_id, agent_id, app_id).
Auth
TokenGET
/v1/memories/{id}/history/Get memory change history.
Auth
TokenPOST
/v1/memories/feedback/Submit feedback on a memory.
Auth
TokenPOST
/v1/memories/exports/Export memories as JSON.
Auth
Token