Change an AI agent (only the fields sent)
curl --request PATCH \
--url https://app.hookie.ai/admin/api/projects/{project_id}/ai-agents/{agent_id} \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"active": true,
"model": "<string>",
"system_prompt": "<string>",
"prompt": "<string>",
"tools": [
"<unknown>"
],
"memory_dataset": "<string>",
"max_tokens": 1024
}
'const options = {
method: 'PATCH',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
active: true,
model: '<string>',
system_prompt: '<string>',
prompt: '<string>',
tools: ['<unknown>'],
memory_dataset: '<string>',
max_tokens: 1024
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/ai-agents/{agent_id}', 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}/ai-agents/{agent_id}"
payload = {
"name": "<string>",
"active": True,
"model": "<string>",
"system_prompt": "<string>",
"prompt": "<string>",
"tools": ["<unknown>"],
"memory_dataset": "<string>",
"max_tokens": 1024
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"ok": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}AI agents
Change an AI agent (only the fields sent)
PATCH
/
admin
/
api
/
projects
/
{project_id}
/
ai-agents
/
{agent_id}
Change an AI agent (only the fields sent)
curl --request PATCH \
--url https://app.hookie.ai/admin/api/projects/{project_id}/ai-agents/{agent_id} \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"name": "<string>",
"active": true,
"model": "<string>",
"system_prompt": "<string>",
"prompt": "<string>",
"tools": [
"<unknown>"
],
"memory_dataset": "<string>",
"max_tokens": 1024
}
'const options = {
method: 'PATCH',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
active: true,
model: '<string>',
system_prompt: '<string>',
prompt: '<string>',
tools: ['<unknown>'],
memory_dataset: '<string>',
max_tokens: 1024
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/ai-agents/{agent_id}', 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}/ai-agents/{agent_id}"
payload = {
"name": "<string>",
"active": True,
"model": "<string>",
"system_prompt": "<string>",
"prompt": "<string>",
"tools": ["<unknown>"],
"memory_dataset": "<string>",
"max_tokens": 1024
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"ok": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>"
}Authorizations
sessionbearerAuthapiKey
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Body
application/json
Any subset of the create body. Fields left out keep their current values — unlike PUT, which replaces the whole agent and resets what it omits. memory_dataset: null stops storing replies; active: false retires it. The MCP tool update_ai_agent uses this.
Required string length:
1 - 120A model from GET /admin/api/ai-models; one off the list is refused. Left out, the stored model is kept, even one saved before the list existed (#196).
Maximum string length:
8000Not supported; only an empty list is accepted. Any tools stored before #196 (never used) are cleared by an edit.
Response
Changed.
Available options:
true