Skip to content
Hoody.com

The chat-agent routes manage the definitions (system prompts, frontmatter, tool allow-lists, model, max-turns) that ship and run inside the agent container. Use these endpoints to list available agents, create or clone custom agents, edit their raw markdown source, and adjust per-agent configuration such as model, tools, and turn limits. Responses are realm-scoped to the gateway’s own realm; a client-supplied X-Hoody-Realm or ?realm= is rejected with realm_scope_unsupported on these routes.

List the chat-agent definitions resolved for the requesting cwd / config_dir. Results include both built-in and custom definitions.

Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents?page=1&limit=20" \
-H "Authorization: Bearer <token>" \
-H "X-Hoody-Cwd: /home/user/project" \
-H "X-Hoody-Config-Dir: /home/user/.hoody"
NameInTypeRequiredDescription
pagequeryintegerNo1-based page number for pagination.
limitqueryintegerNoMaximum items per page (0 = no pagination).
X-Hoody-CwdheaderstringNoPer-request working-directory scope: the.hoody project layer / record cwd / tool+workflow cwd. Required by routes that resolve a cwd.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override selecting which on-disk .hoody install a stateless read/write resolves.
X-Hoody-ContainerheaderstringNoPer-request bound remote container (omitted = local). Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id (also accepted as ?realm=). Rejected (400 realm_scope_unsupported) on active-only / no-realm routes.
realmquerystringNoPer-request realm selector — the in:query alias of the X-Hoody-Realm header (read only when the header is absent).

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

Terminal window
curl -X GET "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents/code-reviewer/source" \
-H "Authorization: Bearer <token>" \
-H "X-Hoody-Cwd: /home/user/project"
NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container. Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected (400 realm_scope_unsupported).
realmquerystringNoPer-request realm selector — the in:query alias of X-Hoody-Realm.

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

Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{
"name": "code-reviewer",
"frontmatter": {
"description": "Reviews pull requests and flags risky changes.",
"model": "anthropic/claude-sonnet-4-6",
"tools": ["read_file", "git_diff"],
"turns": 10
},
"system_prompt": "You are a careful code reviewer. Focus on correctness, security, and clarity."
}'
NameInTypeRequiredDescription
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container. Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected (400 realm_scope_unsupported).
realmquerystringNoPer-request realm selector — the in: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.

Copy a chat-agent definition to a new name.

Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents/code-reviewer/copy" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "new_name": "code-reviewer-strict" }'
NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container. Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected (400 realm_scope_unsupported).
realmquerystringNoPer-request realm selector — the in:query alias of X-Hoody-Realm.
NameTypeRequiredDescription
new_namestringYesName for the copied agent.

Overwrite the raw markdown source of a chat-agent definition. Pass base_gen from a prior read to enable conflict detection.

Terminal window
curl -X PUT "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents/code-reviewer/source" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{
"content": "---\ndescription: Reviews pull requests and flags risky changes.\nmodel: anthropic/claude-sonnet-4-6\ntools: [read_file, git_diff]\nturns: 12\n---\n\nYou are a careful code reviewer. Always read the diff first.",
"base_gen": 7
}'
NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container. Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected (400 realm_scope_unsupported).
realmquerystringNoPer-request realm selector — the in:query alias of X-Hoody-Realm.
NameTypeRequiredDescription
contentstringYesThe full markdown source (frontmatter + system prompt).
base_genintegerNoThe gen returned by agents.read_source, for conflict detection.

Set (or remove) an agent’s frontmatter model line. Pass model: "" to remove the line entirely.

Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents/code-reviewer/model" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "model": "anthropic/claude-opus-4-8" }'
NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container. Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected (400 realm_scope_unsupported).
realmquerystringNoPer-request realm selector — the in:query alias of X-Hoody-Realm.
NameTypeRequiredDescription
modelstringNoModel spec (e.g. anthropic/claude-opus-4-8); "" removes the frontmatter model line.

Set (or remove) an agent’s frontmatter tools line. An empty list removes the line, which means “all tools”.

Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents/code-reviewer/tools" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "tools": ["read_file", "git_diff", "search_code"] }'
NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container. Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected (400 realm_scope_unsupported).
realmquerystringNoPer-request realm selector — the in:query alias of X-Hoody-Realm.
NameTypeRequiredDescription
toolsarray of stringNoTool names allowed for the agent; an empty list removes the line (= all tools).

Set an agent’s max-turns frontmatter value.

Terminal window
curl -X PATCH "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents/code-reviewer/turns" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "turns": 15 }'
NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container. Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected (400 realm_scope_unsupported).
realmquerystringNoPer-request realm selector — the in:query alias of X-Hoody-Realm.
NameTypeRequiredDescription
turnsintegerNoMax agent turns per dispatch.

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. Omit the optional body to flip the current state, or pass enabled: true / enabled: false to set it explicitly.

Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents/code-reviewer/tools/search_code/toggle" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "enabled": true }'
NameInTypeRequiredDescription
namepathstringYesPath identifier.
toolpathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container. Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected (400 realm_scope_unsupported).
realmquerystringNoPer-request realm selector — the in:query alias of X-Hoody-Realm.

This endpoint accepts no body. Any keys other than _-prefixed reserved keys are forwarded to the daemon; the agent name and tool come from the path. An optional enabled value (omitted = flip) may be supplied.

Rename a custom chat-agent definition.

Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents/code-reviewer/rename" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-H "X-Hoody-Cwd: /home/user/project" \
-d '{ "new_name": "reviewer" }'
NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container. Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected (400 realm_scope_unsupported).
realmquerystringNoPer-request realm selector — the in:query alias of X-Hoody-Realm.
NameTypeRequiredDescription
new_namestringYesNew agent name.

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. An agent with no shipped default is refused (is_error: true).

Terminal window
curl -X POST "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents/default/reset-to-shipped" \
-H "Authorization: Bearer <token>" \
-H "X-Hoody-Cwd: /home/user/project"
NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container. Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected (400 realm_scope_unsupported).
realmquerystringNoPer-request realm selector — the in:query alias of X-Hoody-Realm.

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 PUT /api/v1/agent/agents/{name}/source or POST /api/v1/agent/agents/{name}/reset-to-shipped instead.

Terminal window
curl -X DELETE "https://{projectId}-{containerId}-agent-1.{server}.containers.hoody.com/api/v1/agent/agents/code-reviewer-strict" \
-H "Authorization: Bearer <token>" \
-H "X-Hoody-Cwd: /home/user/project"
NameInTypeRequiredDescription
namepathstringYesPath identifier.
X-Hoody-CwdheaderstringNoPer-request working-directory scope.
X-Hoody-Config-DirheaderstringNoPer-request --config-dir override.
X-Hoody-ContainerheaderstringNoPer-request bound remote container. Rejected (400) on routes with no container dimension.
X-Hoody-RealmheaderstringNoPer-request realm selector: global or a 24-hex id. Rejected (400 realm_scope_unsupported).
realmquerystringNoPer-request realm selector — the in:query alias of X-Hoody-Realm.