Agent Memory
Edit existing memory text with literal replacements and a base version.
Edit existing memory text with literal replacements and a base version. The request enforces Agent memory roles, scope, ownership, and lifecycle state.
POST
/
api
/
v1
/
agents
/
memory
/
{agentMemoryId}
/
edit
Edit existing memory text with literal replacements and a base version.
curl --request POST \
--url https://api.revoengine.com/api/v1/agents/memory/{agentMemoryId}/edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-revo-mutation-review: <x-revo-mutation-review>' \
--data '
{
"baseVersion": 1,
"replacements": [
{
"oldText": "<string>",
"newText": "<string>",
"expectedMatches": 2
}
]
}
'const options = {
method: 'POST',
headers: {
'x-revo-mutation-review': '<x-revo-mutation-review>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
baseVersion: 1,
replacements: [{oldText: '<string>', newText: '<string>', expectedMatches: 2}]
})
};
fetch('https://api.revoengine.com/api/v1/agents/memory/{agentMemoryId}/edit', 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/memory/{agentMemoryId}/edit"
payload = {
"baseVersion": 1,
"replacements": [
{
"oldText": "<string>",
"newText": "<string>",
"expectedMatches": 2
}
]
}
headers = {
"x-revo-mutation-review": "<x-revo-mutation-review>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)Authorizations
Bearer JWT token or API Key (sk-*).
Headers
Path Parameters
Body
application/json
Response
201
⌘I
Edit existing memory text with literal replacements and a base version.
curl --request POST \
--url https://api.revoengine.com/api/v1/agents/memory/{agentMemoryId}/edit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-revo-mutation-review: <x-revo-mutation-review>' \
--data '
{
"baseVersion": 1,
"replacements": [
{
"oldText": "<string>",
"newText": "<string>",
"expectedMatches": 2
}
]
}
'const options = {
method: 'POST',
headers: {
'x-revo-mutation-review': '<x-revo-mutation-review>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
baseVersion: 1,
replacements: [{oldText: '<string>', newText: '<string>', expectedMatches: 2}]
})
};
fetch('https://api.revoengine.com/api/v1/agents/memory/{agentMemoryId}/edit', 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/memory/{agentMemoryId}/edit"
payload = {
"baseVersion": 1,
"replacements": [
{
"oldText": "<string>",
"newText": "<string>",
"expectedMatches": 2
}
]
}
headers = {
"x-revo-mutation-review": "<x-revo-mutation-review>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
