Skip to main content
POST
Asignar nodos de la base de conocimientos a todos los workers de un agente.
Associates one or more knowledge base nodes with an agent. The assignment propagates to all of the agent’s workers (except supervisor workers), adding the given node_id values to their list of accessible knowledge. The operation is idempotent: if a node was already assigned, it isn’t duplicated. To list available agents use GET /v1/agents. To get validated node_id values for your folders and documents use GET /v1/knowledge/tree. After the assignment, a reindex is enqueued to refresh the workers’ cached embeddings.

Endpoint

Required scope

knowledge:assign

Headers

Body

Example request

Response

200 OK

400 / 401 / 403 / 404 / 429

  • 400 BAD_REQUEST: agent_id or node_ids with invalid format, or node_ids empty.
  • 403 FORBIDDEN with code: INSUFFICIENT_SCOPE: the PAT doesn’t have knowledge:assign.
  • 404 NOT_FOUND: the agent_id doesn’t exist, or one or more node_ids don’t belong to your company.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Body

application/json
agent_id
string
required

ObjectId del agente destino.

node_ids
string[]
required

ObjectIds de los nodos a asignar a todos los workers del agente.

Response

200 - application/json
workers_updated
number
required