Skip to main content
GET
Obtener un agente
Returns one agent with everything the list endpoint leaves out: its goal, the sections of its prompt with their text, the channels it answers on, the tools it may call and the knowledge nodes it can search. One call is enough. In the block model this replaced, the text lived somewhere else and reading a prompt took three calls; a section belongs to its agent, so it comes back here.

Endpoint

Required scope

agents:read

Headers

Path parameters

Example request

Response

200 OK

401 Unauthorized

Missing, invalid, revoked, or expired token.

403 Forbidden

The token does not have the agents:read 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

  • prompts carries the text. What each section is for comes from the catalogue; the order is the order they take in the assembled prompt.
  • A section that was never written is absent, not empty. There is no placeholder row per section type.
  • goal.type decides which tools the agent can actually use, beyond the ids in tools. Changing it changes the agent’s capabilities, not just a label.
  • tools and knowledge_node_ids are ids into company-level collections. Deleting the agent leaves them alone.
  • This endpoint returns inactive agents too, unlike the list. is_active: false means the agent does not answer, but its configuration is intact.
  • 404 covers the cross-project case. An agent that belongs to another project of the same company reads as not found, not as forbidden — the project of the token is part of its identity.
  • company, project, metadata and created_by are never returned. The first two are implied by the token, the third has no published schema, and the fourth is an internal user id.

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string
required

Response

200 - application/json
agent
object
required