/api/v1/squads/{squadId}/agents
const url = 'https://api.endless.zaia.app/api/v1/squads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/agents';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"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","temperature":1,"timezone":"Africa/Cairo"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.endless.zaia.app/api/v1/squads/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/agents \ --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", "temperature": 1, "timezone": "Africa/Cairo" } }'Creates a new agent or attaches an existing one to a squad.
Parameters
Seção intitulada “Parameters”Path Parameters
Seção intitulada “Path Parameters”A UUID v4 string that identifies an entity.
A UUID v4 string that identifies an entity.
Request Bodyrequired
Seção intitulada “Request Bodyrequired”object
object
Whether the agent should be able to execute JavaScript code using the Code Runtime tool.
The internal name of the agent. For internal use only.
The number of iterations (steps) the agent can execute in a single execution.
The LLM model key to use for the agent.
The id of the LLM provider to use for the agent.
The name of the agent.
The picture of the agent.
Whether the agent should plan before each execution.
The main description of the agent’s behavior.
The reasoning mode to use for the agent. If null, reasoning will be disabled.
The role of the agent. Particularly useful to give other agents context of what the agent does.
The temperature to use for the agent. The lower the more deterministic. The higher the more creative.
The timezone to use for the agent. If null, no timezone will be used.
object
A UUID v4 string that identifies an entity.
Responses
Seção intitulada “Responses”The agent was created.
object
A UUID v4 string that identifies an entity.
A UUID v4 string that identifies an entity.
object
A UUID v4 string that identifies an entity.
The ID of the original entity in production.
A UUID v4 string that identifies an entity.
Whether the agent should be able to execute JavaScript code using the Code Runtime tool.
The internal name of the agent. For internal use only.
The number of iterations (steps) the agent can execute in a single execution.
The LLM model key to use for the agent.
The id of the LLM provider to use for the agent.
The name of the agent.
The picture of the agent.
Whether the agent should plan before each execution.
The main description of the agent’s behavior.
The reasoning mode to use for the agent. If null, reasoning will be disabled.
The role of the agent. Particularly useful to give other agents context of what the agent does.
The super identity ID associated with the agent.
The temperature to use for the agent. The lower the more deterministic. The higher the more creative.
The timezone to use for the agent. If null, no timezone will be used.
The number of tools currently associated with the agent.
The TTS voice to use for audio responses. Null when disabled for the agent.
The workspace ID that owns the agent.
Example
{ "type": "member", "agent": { "llm": "claude-haiku-4-5", "reasoningMode": "low", "timezone": "Africa/Cairo" }}Unauthorized.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}Plan limit exceeded.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}The agent was not found.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}Agent is already associated with this squad.
The description of a known exception.
object
The error code.
The error call-to-action.
object
The error feedback.
object
The error message.
The error name.
Example
{ "cta": { "type": "support-contact" }}