Skip to content

Update agent instructions

PATCH
/api/agent-definitions/{id}/instructions

Replaces the instructions of a custom agent, an agent created in your account. The instructions are the agent’s system prompt: the text that tells the agent how to handle its task. Set customInstructions to null to clear them. Agents provided by oHallo answer 403 with code: "platform_agent".

id
required
string format: uuid

The unique identifier of the custom agent to update instructions for.

object
customInstructions
required

The agent’s instructions, which replace its system prompt. Set to null to clear them.

string | null
Example
You handle product return requests. Always verify the order number and check that the item is within the return window (30 days from delivery) before you initiate a return.

The agent’s instructions were updated.

An agent definition configures an agent that the orchestrator can dispatch during conversation processing. Specialist agents execute domain tasks via the MCP tools they are connected to. System agents are platform-provided and cannot be deleted, though their instructions can be customised.

object
id
required

Unique identifier for the agent definition.

string format: uuid
Example
ag1a2b3c-5678-9abc-def0-1234567890ab
tenantId
required

The account the agent belongs to; null on an agent provided by oHallo.

string | null format: uuid
Example
a0b1c2d3-4567-89ab-cdef-0123456789ab
name
required

Internal name used to identify the agent in logs and workflow execution records.

string
Example
shipping_tracker
displayName
required

Human-readable name shown in the dashboard.

string
Example
Shipping Tracker
description

Describes what this agent does. The orchestrator reads this description when deciding whether to dispatch to this specialist.

string | null
Example
Looks up shipping status, delivery dates, and tracking information using the logistics MCP server.
agentRole
required

system for an agent that runs a step of oHallo’s own conversation handling, specialist for an agent the orchestrator hands tasks to. Every agent created in the account is a specialist.

string
Allowed values: system specialist
Example
specialist
roleSlug
required

The role the agent’s model is chosen for. An agent created in the account has agent.specialist_llm.

string
Example
agent.specialist_llm
model

On an agent created in the account, the model chosen for it: an id from GET /api/agent-definitions/available-models; null is Automatic, where oHallo chooses the model. oHallo chooses the model for the agents it provides.

string | null
Example
claude-sonnet-4-6
systemPrompt

The agent’s system prompt: its instructions, how it does its work. On an agent created in the account, the text set as systemPrompt on create or update, or with PATCH /api/agent-definitions/{id}/instructions.

string | null
Example
You track shipments. Look up the order's shipment with get_shipment_status and give the customer the expected delivery date and the tracking link.
customInstructions

Instructions added to an agent oHallo provides: on a system agent, the ones the account adds in the dashboard; on oHallo’s other agents, oHallo’s own. An agent created in the account takes its instructions from systemPrompt.

string | null
acceptsGuidance

On a system agent: whether guidance the account adds in the dashboard reaches the agent’s instructions. It is false for the agents that check replies before they are sent and that learn from resolved conversations, which work from oHallo’s instructions alone. Absent on every other agent.

boolean
Example
true
requiredCapabilities
required

On an agent provided by oHallo, the capabilities it works with: when the list is not empty, the assistant hands it tasks in a workspace where an active MCP connection offers one of them. Empty on an agent created in the account, which works with its own mcpConnections.

Array<string>
Example
[]
maxIterations
required

The most tool-use steps the agent takes in one run. A run that reaches them ends with terminationReason max_iterations.

integer
Example
10
promptVersion
required

The revision of an agent provided by oHallo, raised each time oHallo refines it. An agent created in the account keeps 1; its changes are recorded in its versions.

integer
Example
1
voiceExecution
required

How the agent works on a voice call. direct: the voice assistant calls the agent’s tools itself. worker: the voice assistant hands the task to the agent and keeps talking with the caller while it works, telling the caller what it finds. An agent created in the account is direct unless create or update sets it; oHallo sets it on the agents it provides.

string
Allowed values: direct worker
Example
direct
publishedVersionId

The agent’s current version, as GET /api/agent-definitions/{id}/versions lists it; null on an agent provided by oHallo.

string | null format: uuid
mcpConnections

The MCP connections the agent calls tools on, with the tools it may call on each. The two list endpoints return it on every agent created in the account.

Array<object>

One MCP connection an agent calls tools on, and the tools on it the agent may call.

object
connectionId
required

The id of an MCP connection, as GET /api/mcp-connections returns it.

string format: uuid
Example
11111111-2222-4788-9444-555555555555
allowedTools
required

The tools on the connection the agent may call, each one the connection declares. An empty list places no restriction: the agent may call every tool on the connection.

Array<string>
Example
[
"get_shipment_status",
"get_tracking_url"
]
dispatchableChannels

Returned when GET /api/agent-definitions is read with workspaceId: the types of the workspace’s active, enabled channels, on an agent the assistant in that workspace hands tasks to. An empty list on any other agent.

Array<string>
Example
[
"email",
"chat"
]
createdAt
required

Timestamp when the agent was created.

string format: date-time
Example
2026-02-15T10:00:00.000Z
updatedAt
required

Timestamp when the agent was last updated.

string format: date-time
Example
2026-03-20T16:30:00.000Z

Your account reviews agent changes before they apply: the new instructions wait for approval as the version versionId, and the agent is unchanged until it is approved.

A change saved as a version that waits for approval in the dashboard. An account that reviews changes before they apply receives this for an update, and the record stays as it was until the version is approved.

object
pending
required

Always true.

boolean
Example
true
versionId
required

The version that waits for approval.

string format: uuid
Example
55443322-1100-4988-8776-655443322110

The caller may not change this agent. An agent provided by oHallo answers with code: "platform_agent". People need the owner or admin role. An API key needs the agents:write scope; a key restricted to a brand or workspace receives code: "key_lock" when the agent uses an MCP connection outside its restriction.

Standard error response returned by all endpoints on failure.

object
error
required

A human-readable error message describing what went wrong.

string
Example
Conversation not found
code

A machine-readable reason on some refusals, for example ‘key_lock’ when an API key’s brand or workspace restriction does not cover the action.

string
Example
key_lock
missing_scopes

On a 403 for an API key without a scope the endpoint requires: the scopes the key lacks.

Array<string>
Example
[
"mcp:write"
]
entryId

On a 409 with code duplicate_question or duplicate_rule_text: the knowledge base entry or policy that already holds the question or rule text.

string format: uuid
Example
11223344-5566-4788-99aa-bbccddeeff00
connectionId

On a 422 about one MCP connection a request names, from an assignment or an agent create or update (a connection that does not exist, one listed twice, or one that does not declare a tool named): the connection, as the request named it.

string
undeclaredTools

On the same 422: the tool names the connection does not declare.

Array<string>
Example
[
"get_orders"
]
declaredTools

On the same 422: the tools the connection declares.

Array<string>
Example
[
"get_order",
"search_orders"
]

No agent exists with the given ID.

Standard error response returned by all endpoints on failure.

object
error
required

A human-readable error message describing what went wrong.

string
Example
Conversation not found
code

A machine-readable reason on some refusals, for example ‘key_lock’ when an API key’s brand or workspace restriction does not cover the action.

string
Example
key_lock
missing_scopes

On a 403 for an API key without a scope the endpoint requires: the scopes the key lacks.

Array<string>
Example
[
"mcp:write"
]
entryId

On a 409 with code duplicate_question or duplicate_rule_text: the knowledge base entry or policy that already holds the question or rule text.

string format: uuid
Example
11223344-5566-4788-99aa-bbccddeeff00
connectionId

On a 422 about one MCP connection a request names, from an assignment or an agent create or update (a connection that does not exist, one listed twice, or one that does not declare a tool named): the connection, as the request named it.

string
undeclaredTools

On the same 422: the tool names the connection does not declare.

Array<string>
Example
[
"get_orders"
]
declaredTools

On the same 422: the tools the connection declares.

Array<string>
Example
[
"get_order",
"search_orders"
]

Validation error.

Standard error response returned by all endpoints on failure.

object
error
required

A human-readable error message describing what went wrong.

string
Example
Conversation not found
code

A machine-readable reason on some refusals, for example ‘key_lock’ when an API key’s brand or workspace restriction does not cover the action.

string
Example
key_lock
missing_scopes

On a 403 for an API key without a scope the endpoint requires: the scopes the key lacks.

Array<string>
Example
[
"mcp:write"
]
entryId

On a 409 with code duplicate_question or duplicate_rule_text: the knowledge base entry or policy that already holds the question or rule text.

string format: uuid
Example
11223344-5566-4788-99aa-bbccddeeff00
connectionId

On a 422 about one MCP connection a request names, from an assignment or an agent create or update (a connection that does not exist, one listed twice, or one that does not declare a tool named): the connection, as the request named it.

string
undeclaredTools

On the same 422: the tool names the connection does not declare.

Array<string>
Example
[
"get_orders"
]
declaredTools

On the same 422: the tools the connection declares.

Array<string>
Example
[
"get_order",
"search_orders"
]