Pular para o conteúdo

/api/v1/agents/{agentId}/tools

POST
/api/v1/agents/{agentId}/tools
curl --request POST \
--url https://api.endless.zaia.app/api/v1/agents/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/tools \
--header 'Content-Type: application/json' \
--data '{ "tool": { "description": "example", "detail": { "allowedDomains": [ "example" ], "effort": "low", "execution": "eligible", "llmProviderId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "prompt": "example", "type": "agentic-web-search" }, "name": "example" } }'

Creates a new tool or attaches an existing one to an agent.

agentId
required

A UUID v4 string that identifies an entity.

string format: uuid

A UUID v4 string that identifies an entity.

Media typeapplication/json
Any of:
object
tool
required
object
description
required

The internal description of the tool.

string
>= 3 characters <= 250 characters
detail
required
Any of:
object
allowedDomains
required

List of domains allowed in web search results.

Array<string>
effort
required

Web search effort level.

string
Allowed values: low medium high
execution
required

Whether the search should always be executed or only if the agent decides to do it.

string
Allowed values: eligible compulsory
llmProviderId
required

Optional OpenAI LLM provider ID to be used in this tool call.

string format: uuid
nullable
prompt
required

Prompt to be appended alongside queries to instruct the LLM call.

string
nullable <= 500 characters
type
required
string
Allowed values: agentic-web-search
name
required

The display name of the tool.

string
>= 3 characters <= 50 characters

The tool was created or linked to the agent.

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

The id of the agent to link the tool to.

string format: uuid
toolId
required

The id of the tool to link to the agent.

string format: uuid
tool
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
description
required

The internal description of the tool.

string
>= 3 characters <= 250 characters
detail
required
Any of:
object
allowedDomains
required

List of domains allowed in web search results.

Array<string>
effort
required

Web search effort level.

string
Allowed values: low medium high
execution
required

Whether the search should always be executed or only if the agent decides to do it.

string
Allowed values: eligible compulsory
llmProviderId
required

Optional OpenAI LLM provider ID to be used in this tool call.

string format: uuid
nullable
prompt
required

Prompt to be appended alongside queries to instruct the LLM call.

string
nullable <= 500 characters
type
required
string
Allowed values: agentic-web-search
name
required

The display name of the tool.

string
>= 3 characters <= 50 characters
workspaceId
required

The workspace ID that owns the tool.

string format: uuid
Example
{
"tool": {
"detail": {
"effort": "low",
"execution": "eligible",
"type": "agentic-web-search"
}
}
}

Invalid tool configuration.

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"
}
}

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 agent or tool 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"
}
}