Skip to main content
Knowledge bases hold reusable context for agent versions. The v1 API manages the resource record and its documents; attach its signed kb_ ID to an agent version through knowledge_base_ids.

Capabilities

Lifecycle

  1. Create a knowledge base.
  2. Add documents with Upload Knowledge Base Document and wait until List Knowledge Base Documents shows each one ready. A document whose indexing fails is removed from that list instead; upload it again.
  3. Attach it with Update Agent.
  4. Get or list resources to confirm the signed ID and name.
  5. Rename without changing attachments.
  6. Detach it from agent versions before deleting.

Response envelope

GET /v1/knowledge-base returns items plus a meta object with totalItems, itemsPerPage, totalPages, and currentPage. See API pagination for an endpoint-by-endpoint envelope table.

Delete conflicts

Deletion is blocked while a current draft or latest published agent version references the knowledge base. The 409 Conflict response lists those agents in data.agent_ids (with data.code KNOWLEDGE_BASE_IN_USE); detach or replace the knowledge base on each, then retry the delete.