Agents
Update memory for an Agent
Update memory for an Agent. The request enforces Agent roles, ownership, workspace boundaries, and lifecycle state.
PATCH
/
api
/
v1
/
agents
/
{agentId}
/
memory
/
{agentMemoryId}
Update memory for an Agent
curl --request PATCH \
--url https://api.revoengine.com/api/v1/agents/{agentId}/memory/{agentMemoryId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ownerType": "USER",
"ownerId": "11111111-1111-4111-8111-111111111111",
"kind": "preference",
"name": "Incident RCA style",
"summary": "Use concise incident RCAs for this workspace.",
"refTokens": [
"[COMPONENTS/77777777-7777-4777-8777-777777777777](BillingSync)"
],
"tags": [
"billing",
"stripe"
],
"version": 6
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ownerType: 'USER',
ownerId: '11111111-1111-4111-8111-111111111111',
kind: 'preference',
name: 'Incident RCA style',
summary: 'Use concise incident RCAs for this workspace.',
refTokens: ['[COMPONENTS/77777777-7777-4777-8777-777777777777](BillingSync)'],
tags: ['billing', 'stripe'],
version: 6
})
};
fetch('https://api.revoengine.com/api/v1/agents/{agentId}/memory/{agentMemoryId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/agents/{agentId}/memory/{agentMemoryId}"
payload = {
"ownerType": "USER",
"ownerId": "11111111-1111-4111-8111-111111111111",
"kind": "preference",
"name": "Incident RCA style",
"summary": "Use concise incident RCAs for this workspace.",
"refTokens": ["[COMPONENTS/77777777-7777-4777-8777-777777777777](BillingSync)"],
"tags": ["billing", "stripe"],
"version": 6
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer JWT token or API Key (sk-*).
Body
application/json
Updated memory owner.
Available options:
USER, AGENT, WORKSPACE Example:
"USER"
Updated owner id. Used for USER, AGENT, and WORKSPACE memory.
Example:
"11111111-1111-4111-8111-111111111111"
Updated durable memory kind.
Available options:
digest, preference, fact, episode Example:
"preference"
Updated short stable memory name for labels and ref tokens.
Required string length:
1 - 64Example:
"Incident RCA style"
Updated canonical memory body.
Minimum string length:
1Example:
"Use concise incident RCAs for this workspace."
Replacement explicit exact source or resource tokens. The API also extracts REFTYPE/id [blocked] tokens from the current summary.
Example:
[
"[COMPONENTS/77777777-7777-4777-8777-777777777777](BillingSync)"
]
Replacement topical tags.
Example:
["billing", "stripe"]
Optimistic locking version.
Required range:
x >= 0Example:
6
Response
200
⌘I
Update memory for an Agent
curl --request PATCH \
--url https://api.revoengine.com/api/v1/agents/{agentId}/memory/{agentMemoryId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"ownerType": "USER",
"ownerId": "11111111-1111-4111-8111-111111111111",
"kind": "preference",
"name": "Incident RCA style",
"summary": "Use concise incident RCAs for this workspace.",
"refTokens": [
"[COMPONENTS/77777777-7777-4777-8777-777777777777](BillingSync)"
],
"tags": [
"billing",
"stripe"
],
"version": 6
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
ownerType: 'USER',
ownerId: '11111111-1111-4111-8111-111111111111',
kind: 'preference',
name: 'Incident RCA style',
summary: 'Use concise incident RCAs for this workspace.',
refTokens: ['[COMPONENTS/77777777-7777-4777-8777-777777777777](BillingSync)'],
tags: ['billing', 'stripe'],
version: 6
})
};
fetch('https://api.revoengine.com/api/v1/agents/{agentId}/memory/{agentMemoryId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.revoengine.com/api/v1/agents/{agentId}/memory/{agentMemoryId}"
payload = {
"ownerType": "USER",
"ownerId": "11111111-1111-4111-8111-111111111111",
"kind": "preference",
"name": "Incident RCA style",
"summary": "Use concise incident RCAs for this workspace.",
"refTokens": ["[COMPONENTS/77777777-7777-4777-8777-777777777777](BillingSync)"],
"tags": ["billing", "stripe"],
"version": 6
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)
