> ## Documentation Index
> Fetch the complete documentation index at: https://docs.convocore.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Get agent KB docs

> Retrieves all the KB docs for an agent, this route must use the new V3 [endpoints](/api-reference/v3/intro).

<Warning>
  **List does NOT return document bodies by default.**

  Each item is metadata only (`id`, `name`, `url`, `tags`, `ts`, status, etc.). The `content` field is usually empty or the placeholder string `IN CONTENT URL` — that is **not** the scraped/uploaded text.

  To load real content, either:

  * add `includeContent=true` on this list call (hydrates the current page, max 50 docs), or
  * call [`GET /agents/{agentId}/kb/{docId}`](/api-reference/v3/kb/get_id) for each document.
</Warning>

<Note>
  By default results are sorted by `ts` (newest first). Docs missing a `ts` field are excluded from that order — pass `orderBy=id` to paginate every KB document.
</Note>

<Tip>
  **Pagination (pick one):**

  * Preferred: pass `nextCursor` from the previous response as `cursor`.
  * Legacy: `page` + `pageSize` (max 50). Page 2+ advances with Firestore offset.
</Tip>


## OpenAPI

````yaml GET /agents/{agentId}/kb
openapi: 3.0.3
info:
  title: Convocore OpenAPI
  description: Full API reference for Convocore
  version: 1.0.4
servers:
  - url: https://eu-gcp-api.vg-stuff.com/v3
security: []
paths:
  /agents/{agentId}/kb:
    get:
      tags:
        - KB
      summary: Get Agent Knowledge Base
      description: >-
        Lists KB document metadata (paginated). Does NOT include document bodies
        by default  -  `content` is often empty or the placeholder `IN CONTENT
        URL`. Pass includeContent=true to hydrate the current page from
        JSON_STRINGS, or GET /agents/{agentId}/kb/{docId} per doc. Pagination:
        prefer cursor/nextCursor; legacy page+pageSize also works. Default order
        is ts (newest first); use orderBy=id to reach docs missing ts.
      operationId: kbRouter-getAgentKBDocs
      parameters:
        - name: agentId
          in: path
          required: true
          schema:
            type: string
        - name: cursor
          in: query
          required: false
          schema:
            type: string
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 50
        - name: tags
          in: query
          required: false
          schema:
            type: string
            maxLength: 512
        - name: searchQuery
          in: query
          required: false
          schema:
            type: string
            maxLength: 256
        - name: includeTotal
          in: query
          required: false
          schema:
            anyOf:
              - not: {}
              - type: boolean
        - name: includeContent
          in: query
          required: false
          schema:
            anyOf:
              - not: {}
              - type: boolean
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
        - name: pageSize
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 50
        - name: orderBy
          in: query
          required: false
          schema:
            type: string
            enum:
              - id
              - ts
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/object_6929d85c'
                  total:
                    type: number
                    nullable: true
                  pageSize:
                    type: number
                  hasMore:
                    type: boolean
                  nextCursor:
                    type: string
                    nullable: true
                  totalPages:
                    type: number
                    nullable: true
                  currentPage:
                    type: number
                    nullable: true
                required:
                  - success
                  - message
                  - data
                  - total
                  - pageSize
                  - hasMore
                  - nextCursor
                  - totalPages
                  - currentPage
                additionalProperties: false
        default:
          $ref: '#/components/responses/error'
      security:
        - Authorization: []
components:
  schemas:
    object_6929d85c:
      type: object
      properties:
        ID:
          type: string
        name:
          type: string
        url:
          type: string
        content:
          type: string
        contentURL:
          type: string
        agentId:
          type: string
        userId:
          type: string
        workspaceId:
          type: string
        agencyId:
          type: string
        tags:
          type: array
          items:
            type: string
        sourceType:
          type: string
          enum:
            - doc
            - url
        status:
          type: string
          enum:
            - ERROR
            - SUCCESS
            - PENDING
            - INITIALIZED
        refreshRate:
          type: string
          enum:
            - 3d
            - 7d
            - never
        withRefresh:
          type: boolean
        nextRefreshAt:
          type: number
        useProxy:
          type: boolean
        aiPostProcess:
          type: boolean
        dimensions:
          type: number
        charCount:
          type: number
        chunksIds_JSON_STRING:
          type: string
        ts:
          type: number
        createdAt:
          type: number
        updatedAt:
          type: number
        metadata:
          $ref: '#/components/schemas/description_393efa'
        refreshMetadata:
          $ref: '#/components/schemas/lastRefreshTS_aec298'
      additionalProperties: true
    description_393efa:
      type: object
      properties:
        description:
          type: string
      additionalProperties: false
    lastRefreshTS_aec298:
      type: object
      properties:
        lastRefreshTS:
          type: number
      additionalProperties: false
    message_11569e:
      type: object
      properties:
        message:
          type: string
      required:
        - message
      additionalProperties: false
  responses:
    error:
      description: Error response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              code:
                type: string
              issues:
                type: array
                items:
                  $ref: '#/components/schemas/message_11569e'
            required:
              - message
              - code
            additionalProperties: false
  securitySchemes:
    Authorization:
      type: http
      scheme: bearer

````