Everstack
API ReferenceAgentsUpdate Agent Memory

Update Agent Memory

PATCH/v1/agents/memories/{memoryId}
PATCH/v1/agents/memories/{memoryId}

Your instance endpoint, shown on the instance page in the dashboard. Each instance has its own host; there is no shared API host.

Parameters

NameInTypeRequiredDescription
memoryIdpathstringYes

Request Body

PropertyTypeRequiredDescription
tenantIdstringNo
contentstringNo
factKeystringNo
confidencenumberNo

Responses

200 Update a persistent memory entry

PropertyTypeDescription
memoryobjectAgentMemoryEntry represents a single persistent memory entry.

default An unexpected error response.

PropertyTypeDescription
codeinteger
messagestring
detailsobject[]

Request

curl -X PATCH "http://localhost:8089/v1/agents/memories/{memoryId}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tenantId":"string","content":"string","factKey":"string","confidence":0}'
const response = await fetch("http://localhost:8089/v1/agents/memories/{memoryId}", {
  method: "PATCH",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
  "tenantId": "string",
  "content": "string",
  "factKey": "string",
  "confidence": 0
}),
});
const data = await response.json();
import requests

response = requests.patch(
    "http://localhost:8089/v1/agents/memories/{memoryId}",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
  "tenantId": "string",
  "content": "string",
  "factKey": "string",
  "confidence": 0
},
)
data = response.json()

Response

{
  "memory": {
    "id": "string",
    "agentId": "string",
    "tenantId": "string",
    "memoryType": "string",
    "content": "string",
    "factKey": "string",
    "confidence": 0,
    "source": "string",
    "scope": "string",
    "userId": "string",
    "accessCount": 0,
    "isActive": true,
    "createdAt": "2024-01-01T00:00:00Z",
    "updatedAt": "2024-01-01T00:00:00Z",
    "sourceSessionId": "string",
    "sourceTurnNumber": 0,
    "supersededBy": "string",
    "lastAccessedAt": "2024-01-01T00:00:00Z"
  }
}
{
  "code": 0,
  "message": "string",
  "details": [
    {
      "@type": "string"
    }
  ]
}