curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/memories \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"memory_key": "<string>",
"project_id": "<string>",
"visibility": "private",
"kind": "memory",
"expires_at": "2023-11-07T05:31:56Z",
"supersedes": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
tags: ['<string>'],
memory_key: '<string>',
project_id: '<string>',
visibility: 'private',
kind: 'memory',
expires_at: '2023-11-07T05:31:56Z',
supersedes: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/memories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/memories"
payload = {
"title": "<string>",
"content": "<string>",
"tags": ["<string>"],
"memory_key": "<string>",
"project_id": "<string>",
"visibility": "private",
"kind": "memory",
"expires_at": "2023-11-07T05:31:56Z",
"supersedes": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}{
"error": "<string>",
"code": "storage_rule_violation",
"violations": [
{
"rule": "<string>",
"message": "<string>",
"limit": "<unknown>",
"actual": "<unknown>"
}
],
"project_id": "<string>",
"refused_by_rules": [
{
"title": "<string>",
"rule": "<string>",
"message": "<string>"
}
]
}Save an AI memory
A project’s brain (#663), on every plan; a project hidden from the caller answers 404. Saves into this project; the role that applies is the caller’s role in this project. Requires write access in the memory’s project. Saves a memory artifact in the caller’s personal context. Every memory belongs to a project: project_id (id or slug) names one the caller can see, and without it the memory is filed in the Default project. The source app is taken from the connected agent’s OAuth registration (Claude, Claude Code, ChatGPT, Codex). client is used only when the registration does not say, and console saves are console. With a memory_key, saving again from the same source updates that artifact (200) instead of creating another (201). Private unless visibility is project or workspace (team is accepted as workspace). At most 2,000 memories per member and 32,768 characters each. A memory whose title, content or tags hold a credential-shaped value (API keys, tokens, private keys, JWTs) is refused with 400 (#666). A re-save under a memory_key that names a superseded memory makes it current again (#687).
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/memories \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"content": "<string>",
"tags": [
"<string>"
],
"memory_key": "<string>",
"project_id": "<string>",
"visibility": "private",
"kind": "memory",
"expires_at": "2023-11-07T05:31:56Z",
"supersedes": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
content: '<string>',
tags: ['<string>'],
memory_key: '<string>',
project_id: '<string>',
visibility: 'private',
kind: 'memory',
expires_at: '2023-11-07T05:31:56Z',
supersedes: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/memories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/memories"
payload = {
"title": "<string>",
"content": "<string>",
"tags": ["<string>"],
"memory_key": "<string>",
"project_id": "<string>",
"visibility": "private",
"kind": "memory",
"expires_at": "2023-11-07T05:31:56Z",
"supersedes": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){}{
"error": "<string>",
"code": "storage_rule_violation",
"violations": [
{
"rule": "<string>",
"message": "<string>",
"limit": "<unknown>",
"actual": "<unknown>"
}
],
"project_id": "<string>",
"refused_by_rules": [
{
"title": "<string>",
"rule": "<string>",
"message": "<string>"
}
]
}Path Parameters
Body
Response
Successful operation
The response is of type object.