Actualizar un agente
PATCH /v1/agents/{id}
Update an agent’s config: name, model, language, goal, channels, reengagement, tools, knowledge nodes or active flag.
PATCH
Actualizar un agente
Partial update. Only the fields present in the body change; everything else is left alone.
To change one prompt section, use
PUT /v1/agents/{id}/prompts/{section} instead. Sending prompts here replaces them all, which is what you want when your system owns the whole prompt and a mistake when it does not.
Endpoint
Required scope
agents:write
Headers
Path parameters
Body
Every field is optional.Example request
Response
200 OK
The full agent, same shape asGET /v1/agents/{id}.
400 Bad Request
A field over its length limit, a malformedObjectId, an unknown property, or INVALID_MODEL when the new model is not supported.
401 Unauthorized
Missing, invalid, revoked, or expired token.403 Forbidden
The token does not have theagents:write scope.
404 Not Found
No agent with that id in the token’s company and project.502 Bad Gateway
The agent service is unreachable.Operational notes
knowledge_node_idsreplaces, it does not append. Sending one id leaves the agent with exactly that one. Read the current list fromGET /v1/agents/{id}and send the union if you mean to add.- The model is only validated when it changes. An agent already configured with a model that has since been retired keeps working through updates that do not touch
model, and starts failing validation the moment you send it explicitly. is_active: falseis the reversible way to take an agent out of service. It keeps every section, version and knowledge assignment; deleting does not.- Changing
goal.typechanges which tools the agent can use. It is not a rename: an agent moved from informing to booking needs the services and availability behind it to exist. - Removing a channel stops it answering there, and a customer who writes gets nothing back.
- Omitting a field and sending
nullare not the same. Omit it to leave the value alone.nullis not accepted for these fields. - A change takes effect within about fifteen minutes at worst. The rendered prompt and bound tools are cached per agent; the cache is dropped on every write, but a request already in flight can still answer with the previous configuration.
Authorizations
Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.
Path Parameters
Body
application/json
Maximum string length:
150Maximum string length:
500Identificador del modelo. Se valida solo si cambia respecto del actual.
Example:
"es-CL"
Example:
"America/Santiago"
REEMPLAZA todas las secciones. Para cambiar una sola sin tocar el resto, usar PUT /v1/agents/{id}/prompts/{section}.
Maximum array length:
20Maximum array length:
10Maximum array length:
100Maximum array length:
200Response
200 - application/json