Replace agent memory
curl --request PUT \
--url https://developer.creao.ai/v1/agents/{agent_id}/memory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"name": "region-check",
"content": "Always validate region before deploy.",
"trigger": "Deployment request",
"status": "approved"
}
]
}
'const url = 'https://developer.creao.ai/v1/agents/{agent_id}/memory';
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
name: 'region-check',
content: 'Always validate region before deploy.',
trigger: 'Deployment request',
status: 'approved'
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://developer.creao.ai/v1/agents/{agent_id}/memory"
payload = { "items": [
{
"name": "region-check",
"content": "Always validate region before deploy.",
"trigger": "Deployment request",
"status": "approved"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"name": "<string>",
"content": "<string>",
"trigger": "<string>",
"rationale": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}Agent Memory
Replace agent memory
Overwrite long-term memory items for a personal CREAO agent.
PUT
/
v1
/
agents
/
{agent_id}
/
memory
Replace agent memory
curl --request PUT \
--url https://developer.creao.ai/v1/agents/{agent_id}/memory \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"name": "region-check",
"content": "Always validate region before deploy.",
"trigger": "Deployment request",
"status": "approved"
}
]
}
'const url = 'https://developer.creao.ai/v1/agents/{agent_id}/memory';
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
items: [
{
name: 'region-check',
content: 'Always validate region before deploy.',
trigger: 'Deployment request',
status: 'approved'
}
]
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://developer.creao.ai/v1/agents/{agent_id}/memory"
payload = { "items": [
{
"name": "region-check",
"content": "Always validate region before deploy.",
"trigger": "Deployment request",
"status": "approved"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"items": [
{
"id": "<string>",
"name": "<string>",
"content": "<string>",
"trigger": "<string>",
"rationale": "<string>",
"status": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}Authorizations
bearerAuthapiKeyQuery
Account API key from Developer Console. Keys start with cr_sk_.
Path Parameters
Body
application/json
Maximum array length:
100Show child attributes
Show child attributes
Response
Replaced agent memory items.
Show child attributes
Show child attributes
⌘I