Skip to content
Hoody.com

The Agent Chat Agents API manages chat-agent definitions: list, create, copy, rename, reset, edit source, configure model/tools/turns, and delete. Each agent is a markdown file with frontmatter (model, tools, turns) and a system prompt. Results are realm-scoped to the gateway’s own realm; a client-supplied X-Hoody-Realm is ignored on these routes.

All endpoints live under the agent gateway at https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu.

List chat-agent definitions resolved for the requesting cwd/config_dir (built-in + custom). Supports pagination via page and limit.

NameInTypeRequiredDescription
pagequeryintegerNo1-based page number for pagination.
limitqueryintegerNoMaximum items per page (0 = no pagination).
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local).
X-Hoody-RealmheaderstringNoPer-request realm selector ("global" or a 24-hex id). Ignored on this realm-scoped route.
realmquerystringNoIn-query alias of X-Hoody-Realm.
Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents?page=1&limit=20" \
-H "X-Hoody-Cwd: /home/user/project" \
-H "X-Hoody-Config-Dir: /home/user/.hoody" \
-H "X-Hoody-Realm: global"
{
"items": [
{
"name": "code-reviewer",
"description": "Reviews pull requests against the project style guide.",
"model": "anthropic/claude-opus-4-8",
"tools": ["Read", "Grep", "Bash"],
"turns": 25,
"origin": "custom"
},
{
"name": "general-purpose",
"description": "Default Hoody assistant agent.",
"model": "anthropic/claude-sonnet-4-6",
"tools": [],
"turns": 50,
"origin": "shipped"
}
],
"meta": {
"total": 2,
"page": 1,
"limit": 20
}
}

Read the raw markdown source (frontmatter + system prompt) of a chat-agent definition.

NameInTypeRequiredDescription
namepathstringYesAgent name.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Ignored on this scope.
realmquerystringNoIn-query alias of X-Hoody-Realm.
Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents/code-reviewer/source" \
-H "X-Hoody-Cwd: /home/user/project"
{
"name": "code-reviewer",
"content": "---\nmodel: anthropic/claude-sonnet-4-6\ntools: [Read, Grep, Bash]\nturns: 25\ndescription: Reviews pull requests against the project style guide.\n---\n\nYou are a meticulous code reviewer. Score each PR against the style guide, list issues in priority order, and never approve work you have not actually read.",
"gen": 12
}

Create (or overwrite) a custom chat-agent definition from a name, frontmatter, and system prompt.

NameInTypeRequiredDescription
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Ignored on this scope.
realmquerystringNoIn-query alias of X-Hoody-Realm.
NameTypeRequiredDescription
namestringYesAgent name (the definition file stem).
frontmatterobjectNoOptional frontmatter keys (model, tools, turns, description).
system_promptstringNoThe agent’s system prompt body.
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{
"name": "docs-writer",
"frontmatter": {
"model": "anthropic/claude-sonnet-4-6",
"tools": ["Read", "Write"],
"turns": 20,
"description": "Drafts and edits project documentation."
},
"system_prompt": "You are a technical writer. Use concise, action-oriented language and follow the project docs style guide."
}'
{
"name": "docs-writer",
"path": "/home/user/.hoody/agents/docs-writer.md",
"created": true
}

Overwrite the raw markdown source of a chat-agent definition. Pass base_gen (returned by getAgentSource) for conflict detection.

NameInTypeRequiredDescription
namepathstringYesAgent name.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Ignored on this scope.
realmquerystringNoIn-query alias of X-Hoody-Realm.
NameTypeRequiredDescription
contentstringYesThe full markdown source (frontmatter + system prompt).
base_genintegerNoThe gen returned by getAgentSource, for conflict detection.
Terminal window
curl -X PUT "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents/code-reviewer/source" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{
"content": "---\nmodel: anthropic/claude-opus-4-8\ntools: [Read, Grep, Bash]\nturns: 30\n---\n\nYou are a meticulous code reviewer.",
"base_gen": 12
}'
{
"name": "code-reviewer",
"gen": 13
}

Copy a chat-agent definition to a new name. The source {name} comes from the path; the destination is given in the body.

NameInTypeRequiredDescription
namepathstringYesSource agent name.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Ignored on this scope.
realmquerystringNoIn-query alias of X-Hoody-Realm.
NameTypeRequiredDescription
new_namestringYesName for the copied agent.
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents/code-reviewer/copy" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "new_name": "code-reviewer-strict" }'
{
"source": "code-reviewer",
"destination": "code-reviewer-strict",
"copied": true
}

Rename a custom chat-agent definition. The current {name} comes from the path; the new name is given in the body.

NameInTypeRequiredDescription
namepathstringYesCurrent agent name.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Ignored on this scope.
realmquerystringNoIn-query alias of X-Hoody-Realm.
NameTypeRequiredDescription
new_namestringYesNew agent name.
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents/code-reviewer-strict/rename" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "new_name": "strict-reviewer" }'
{
"from": "code-reviewer-strict",
"to": "strict-reviewer",
"renamed": true
}

POST /api/v1/agent/agents/{name}/reset-to-shipped

Section titled “POST /api/v1/agent/agents/{name}/reset-to-shipped”

Restore one agent to its shipped default, discarding local customizations. Agents with no shipped default are refused (is_error: true).

NameInTypeRequiredDescription
namepathstringYesAgent name.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Ignored on this scope.
realmquerystringNoIn-query alias of X-Hoody-Realm.
Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents/general-purpose/reset-to-shipped" \
-H "X-Hoody-Cwd: /home/user/project"
{
"output": "agent 'general-purpose' restored to shipped default",
"is_error": false
}

Set (or, with model: "", remove) an agent’s frontmatter model line.

NameInTypeRequiredDescription
namepathstringYesAgent name.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Ignored on this scope.
realmquerystringNoIn-query alias of X-Hoody-Realm.
NameTypeRequiredDescription
modelstringNoModel spec (e.g. anthropic/claude-opus-4-8); "" removes the frontmatter model line.
Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents/code-reviewer/model" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "model": "anthropic/claude-opus-4-8" }'
{
"name": "code-reviewer",
"model": "anthropic/claude-opus-4-8",
"applied": true
}

Set (or, with an empty list, remove — meaning “all tools”) an agent’s frontmatter tools line.

NameInTypeRequiredDescription
namepathstringYesAgent name.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Ignored on this scope.
realmquerystringNoIn-query alias of X-Hoody-Realm.
NameTypeRequiredDescription
toolsarrayNoTool names allowed for the agent; an empty list removes the line (= all tools).
Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents/code-reviewer/tools" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "tools": ["Read", "Grep", "Bash", "Glob"] }'
{
"name": "code-reviewer",
"tools": ["Read", "Grep", "Bash", "Glob"],
"applied": true
}

POST /api/v1/agent/agents/{name}/tools/{tool}/toggle

Section titled “POST /api/v1/agent/agents/{name}/tools/{tool}/toggle”

Toggle a single tool on or off in an agent’s frontmatter tools line. Pass an optional enabled boolean in the body to set explicitly; omit it to flip the current state.

NameInTypeRequiredDescription
namepathstringYesAgent name.
toolpathstringYesTool name.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Ignored on this scope.
realmquerystringNoIn-query alias of X-Hoody-Realm.

The request body is a free-form object forwarded to the daemon. Reserved _-prefixed keys are ignored. The accepted fields are exactly those the operation reads; an optional enabled flag may be supplied (omit to flip the current state).

Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents/code-reviewer/tools/Bash/toggle" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "enabled": false }'
{
"name": "code-reviewer",
"tool": "Bash",
"enabled": false
}

Set an agent’s turns frontmatter value (max agent turns per dispatch).

NameInTypeRequiredDescription
namepathstringYesAgent name.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Ignored on this scope.
realmquerystringNoIn-query alias of X-Hoody-Realm.
NameTypeRequiredDescription
turnsintegerNoMax agent turns per dispatch.
Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents/code-reviewer/turns" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "turns": 40 }'
{
"name": "code-reviewer",
"turns": 40,
"applied": true
}

Delete one custom chat-agent definition. Shipped-default agents and the configured default chat agent are refused by the daemon guard rails (is_error: true); use putAgentSource or resetAgentToShipped instead.

NameInTypeRequiredDescription
namepathstringYesAgent name.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container.
X-Hoody-RealmheaderstringNoPer-request realm selector. Ignored on this scope.
realmquerystringNoIn-query alias of X-Hoody-Realm.
Terminal window
curl -X DELETE "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.icu/api/v1/agent/agents/docs-writer" \
-H "X-Hoody-Cwd: /home/user/project"
{
"output": "agent 'docs-writer' deleted",
"is_error": false
}