Skip to main content
PATCH
/
api
/
v2
/
agents
/
{agent_id}
/
memories
/
{memory_id}
curl -X PATCH \
  "http://localhost:8000/api/v2/agents/my-agent/memories/b7c3cf31-e537-49f1-abc4-c50ac6adeac5" \
  -H "X-Session-Token: your_session_token" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "User prefers light mode (updated)",
    "confidence": 0.99
  }'
{
  "agent_id": "my-agent",
  "session_id": "sess_abc123",
  "namespace": "memanto_agent_my-agent",
  "memory_id": "b7c3cf31-e537-49f1-abc4-c50ac6adeac5",
  "status": "updated",
  "action": "updated",
  "updated_fields": [
    "content",
    "confidence"
  ]
}

Overview

Updates an existing memory using a delete-and-recreate pattern on Moorcheh. The memory retains its original id and created_at timestamp, but updates its updated_at timestamp. You must provide at least one field to update.

Authentication

API clients do not send an API key or Authorization header.
X-Session-Token
string
required
Session token from Activate Agent. Must match agent_id.

Path Parameters

agent_id
string
required
The unique identifier of the agent.
memory_id
string
required
The ID of the memory to update.

Body

title
string
New memory title. Max 100 characters.
content
string
New memory content. Max 10,000 characters. Must be a non-empty string if provided.
type
string
New memory type (e.g., fact, preference, decision, etc.).
confidence
number
New confidence score between 0.0 and 1.0.
tags
array
List of strings representing the new tags.
source
string
New memory source string.
curl -X PATCH \
  "http://localhost:8000/api/v2/agents/my-agent/memories/b7c3cf31-e537-49f1-abc4-c50ac6adeac5" \
  -H "X-Session-Token: your_session_token" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "User prefers light mode (updated)",
    "confidence": 0.99
  }'
{
  "agent_id": "my-agent",
  "session_id": "sess_abc123",
  "namespace": "memanto_agent_my-agent",
  "memory_id": "b7c3cf31-e537-49f1-abc4-c50ac6adeac5",
  "status": "updated",
  "action": "updated",
  "updated_fields": [
    "content",
    "confidence"
  ]
}

Next Steps