Pular para o conteúdo

/api/v1/squads/{squadId}/agents/{agentId} (PATCH)

PATCH
/api/v1/squads/{squadId}/agents/{agentId}
curl --request PATCH \
--url https://api.endless.zaia.app/api/v1/squads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/agents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Content-Type: application/json' \
--data '{ "type": "member", "agent": { "codeRuntime": true, "internalName": "example", "iterations": 1, "llm": "claude-haiku-4-5", "llmProviderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "picture": "example", "planning": true, "prompt": "example", "reasoningMode": "low", "role": "example", "superIdentityId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "temperature": 1, "timezone": "Africa/Cairo", "toolCount": 1, "voiceId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } }'

Updates agents in a squad.

agentId
required

A UUID v4 string that identifies an entity.

string format: uuid

A UUID v4 string that identifies an entity.

squadId
required

A UUID v4 string that identifies an entity.

string format: uuid

A UUID v4 string that identifies an entity.

Media typeapplication/json
object
type
string
Allowed values: member main
agent
object
codeRuntime

Whether the agent should be able to execute JavaScript code using the Code Runtime tool.

boolean
internalName

The internal name of the agent. For internal use only.

string
nullable >= 3 characters <= 50 characters
iterations

The number of iterations (steps) the agent can execute in a single execution.

number
>= 2 <= 100
llm

The LLM model key to use for the agent.

string
Allowed values: claude-haiku-4-5 claude-opus-4-8 claude-opus-4-6 claude-opus-4-5 claude-sonnet-4-6 claude-sonnet-4-5 gpt-5.2 gpt-5.5 gpt-5.4 gpt-5.4-mini gpt-5.4-nano gpt-5.6-luna gpt-5.6-sol gpt-5.6-terra gemini-2.5-flash gemini-2.5-pro gemini-3.5-flash gemini-3-flash gemini-3-pro gemini-3.1-pro kimi-k2.5 kimi-k2.6 grok-4.3 grok-4.5
llmProviderId

The id of the LLM provider to use for the agent.

string format: uuid
nullable
name

The name of the agent.

string
>= 3 characters <= 50 characters
picture

The picture of the agent.

string
nullable
planning

Whether the agent should plan before each execution.

boolean
prompt

The main description of the agent’s behavior.

string
>= 1 characters <= 10000 characters
reasoningMode

The reasoning mode to use for the agent. If null, reasoning will be disabled.

string
nullable
Allowed values: low medium high xhigh
role

The role of the agent. Particularly useful to give other agents context of what the agent does.

string
>= 1 characters <= 250 characters
superIdentityId

The super identity ID associated with the agent.

string format: uuid
temperature

The temperature to use for the agent. The lower the more deterministic. The higher the more creative.

number
<= 2
timezone

The timezone to use for the agent. If null, no timezone will be used.

string
nullable
Allowed values: Africa/Cairo Africa/Johannesburg America/Chicago America/Denver America/Los_Angeles America/New_York America/Sao_Paulo America/Manaus Asia/Dubai Asia/Kolkata Asia/Shanghai Asia/Singapore Asia/Tokyo Australia/Sydney Europe/Berlin Europe/London Europe/Moscow Europe/Paris Pacific/Auckland Pacific/Auckland2 UTC auto
toolCount

The number of tools currently associated with the agent.

integer
voiceId

The TTS voice for audio responses. Null to disable.

string format: uuid
nullable

The squad agent was updated.

Media typeapplication/json
object
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
agentId
required

A UUID v4 string that identifies an entity.

string format: uuid
squadId
required

A UUID v4 string that identifies an entity.

string format: uuid
type
required
string
Allowed values: member main
agent
required
object
createdAt
required
string format: date-time
id
required

A UUID v4 string that identifies an entity.

string format: uuid
isRemoved
required
boolean
referenceId
required

The ID of the original entity in production.

string format: uuid
nullable
updatedAt
required
string format: date-time
versionId
required

A UUID v4 string that identifies an entity.

string format: uuid
codeRuntime
required

Whether the agent should be able to execute JavaScript code using the Code Runtime tool.

boolean
internalName
required

The internal name of the agent. For internal use only.

string
nullable >= 3 characters <= 50 characters
iterations
required

The number of iterations (steps) the agent can execute in a single execution.

number
>= 2 <= 100
llm
required

The LLM model key to use for the agent.

string
Allowed values: claude-haiku-4-5 claude-opus-4-8 claude-opus-4-6 claude-opus-4-5 claude-sonnet-4-6 claude-sonnet-4-5 gpt-5.2 gpt-5.5 gpt-5.4 gpt-5.4-mini gpt-5.4-nano gpt-5.6-luna gpt-5.6-sol gpt-5.6-terra gemini-2.5-flash gemini-2.5-pro gemini-3.5-flash gemini-3-flash gemini-3-pro gemini-3.1-pro kimi-k2.5 kimi-k2.6 grok-4.3 grok-4.5
llmProviderId
required

The id of the LLM provider to use for the agent.

string format: uuid
nullable
name
required

The name of the agent.

string
>= 3 characters <= 50 characters
picture
required

The picture of the agent.

string
nullable
planning
required

Whether the agent should plan before each execution.

boolean
prompt
required

The main description of the agent’s behavior.

string
>= 1 characters <= 10000 characters
reasoningMode
required

The reasoning mode to use for the agent. If null, reasoning will be disabled.

string
nullable
Allowed values: low medium high xhigh
role
required

The role of the agent. Particularly useful to give other agents context of what the agent does.

string
>= 1 characters <= 250 characters
superIdentityId
required

The super identity ID associated with the agent.

string format: uuid
temperature
required

The temperature to use for the agent. The lower the more deterministic. The higher the more creative.

number
<= 2
timezone
required

The timezone to use for the agent. If null, no timezone will be used.

string
nullable
Allowed values: Africa/Cairo Africa/Johannesburg America/Chicago America/Denver America/Los_Angeles America/New_York America/Sao_Paulo America/Manaus Asia/Dubai Asia/Kolkata Asia/Shanghai Asia/Singapore Asia/Tokyo Australia/Sydney Europe/Berlin Europe/London Europe/Moscow Europe/Paris Pacific/Auckland Pacific/Auckland2 UTC auto
toolCount
required

The number of tools currently associated with the agent.

integer
voiceId
required

The TTS voice to use for audio responses. Null when disabled for the agent.

string format: uuid
nullable
workspaceId
required

The workspace ID that owns the agent.

string format: uuid
Example
{
"type": "member",
"agent": {
"llm": "claude-haiku-4-5",
"reasoningMode": "low",
"timezone": "Africa/Cairo"
}
}

Unauthorized.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}

The squad agent was not found.

Media typeapplication/json

The description of a known exception.

object
code

The error code.

string
cta

The error call-to-action.

object
type
required
string
Allowed values: support-contact
url
required
string format: uri
feedback
required

The error feedback.

object
enUs
string
esEs
string
ptBr
string
message
required

The error message.

string
name
required

The error name.

string
Example
{
"cta": {
"type": "support-contact"
}
}