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

# List knowledge bases

> Retrieve all knowledge bases for the authenticated user's organization.

Returns each knowledge base with file count, status, and configuration details.




## OpenAPI

````yaml /openapi.yaml get /kb/manage
openapi: 3.1.0
info:
  title: AsterAgents API
  version: 1.0.0
  description: >
    API for AsterAgents platform operations.


    - **Admin endpoints** (`/admin/*`) require organization admin privileges
    (`org:admin` role)

    - **Agent endpoints** (`/agents`) require agent management permissions or
    `org:admin` role

    - **Knowledge base endpoints** (`/kb/*`) require standard authentication

    - **Skills endpoints** (`/skills/*`) require standard authentication

    - **File endpoints** (`/upload/*`, `/kb/files`, `/skills/files`) require
    standard authentication
  contact:
    name: AsterAgents Support
    url: https://asteragents.com/support
servers:
  - url: https://asteragents.com/api
    description: Production
  - url: http://localhost:3000/api
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Users
    description: Manage active organization users
  - name: Invitations
    description: Manage organization invitations
  - name: Files
    description: Upload and manage files
  - name: Knowledge Bases
    description: Manage knowledge bases and their files
  - name: Knowledge Base Management
    description: Create, update, and delete knowledge bases
  - name: Agents
    description: Create, update, and delete agents
  - name: Agent Tags
    description: Organize agents with tags
  - name: Tools
    description: Discover the tool catalog available to your organization
  - name: Skills
    description: Manage agent skills
  - name: Skill Files
    description: Manage bundled files for skills
  - name: Conversations
    description: Invoke agents and retrieve conversation history and messages
  - name: Scheduled Tasks
    description: Schedule agents to run automatically on a cron schedule
paths:
  /kb/manage:
    get:
      tags:
        - Knowledge Base Management
      summary: List knowledge bases
      description: >
        Retrieve all knowledge bases for the authenticated user's organization.


        Returns each knowledge base with file count, status, and configuration
        details.
      operationId: listKnowledgeBases
      responses:
        '200':
          description: Successfully retrieved knowledge bases
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - knowledgeBases
                properties:
                  success:
                    type: boolean
                  knowledgeBases:
                    type: array
                    items:
                      $ref: '#/components/schemas/KnowledgeBase'
              examples:
                success:
                  value:
                    success: true
                    knowledgeBases:
                      - id: 1
                        name: Product Documentation
                        description: All product docs and guides
                        embeddingModel: openai:text-embedding-3-small
                        embeddingDimensions: 1536
                        extractionModel: null
                        extractionSchema: null
                        source: null
                        trigger: null
                        createdAt: '2024-01-15T10:30:00.000Z'
                        updatedAt: '2024-01-15T10:30:00.000Z'
                        userId: user_2ABC123DEF
                        fileCount: 12
                        lastFileUploadedAt: '2024-02-01T14:00:00.000Z'
                        totalSize: 52428800
                        status: ready
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    KnowledgeBase:
      type: object
      required:
        - id
        - name
        - embeddingModel
        - embeddingDimensions
        - createdAt
        - updatedAt
        - userId
        - fileCount
        - status
      properties:
        id:
          type: integer
          description: Unique knowledge base identifier
          example: 1
        name:
          type: string
          description: Knowledge base name
          example: Product Documentation
        description:
          type: string
          nullable: true
          description: Optional description
          example: All product docs and user guides
        embeddingModel:
          type: string
          description: Embedding model identifier
          example: openai:text-embedding-3-small
        embeddingDimensions:
          type: integer
          description: Vector dimensions for the embedding model
          example: 1536
        extractionModel:
          type: string
          nullable: true
          description: Model used for structured data extraction
        extractionSchema:
          type: object
          nullable: true
          description: JSON schema for structured data extraction
        source:
          type: string
          nullable: true
          description: Integration source (when set, KB is integration-managed)
          example: null
        trigger:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/KnowledgeBaseTrigger'
        createdAt:
          type: string
          format: date-time
          description: When the knowledge base was created
          example: '2024-01-15T10:30:00.000Z'
        updatedAt:
          type: string
          format: date-time
          description: When the knowledge base was last updated
          example: '2024-01-15T10:30:00.000Z'
        userId:
          type: string
          description: Clerk user ID of the creator
          example: user_2ABC123DEF
        fileCount:
          type: integer
          description: Number of files in the knowledge base
          example: 12
        lastFileUploadedAt:
          type: string
          format: date-time
          nullable: true
          description: When the most recent file was uploaded
        totalSize:
          type: integer
          nullable: true
          description: Total size of all files in bytes
        status:
          type: string
          description: Knowledge base status
          enum:
            - empty
            - ready
          example: ready
    KnowledgeBaseTrigger:
      type: object
      description: >
        Trigger configuration that automatically runs an agent when new files
        are added.

        Set `enabled: true` with an `agentId` and `prompt` to activate.
      properties:
        enabled:
          type: boolean
          description: Whether the trigger is active
          example: true
        agentId:
          type: integer
          description: ID of the agent to run (must belong to the same organization)
          example: 42
        prompt:
          type: string
          description: Instructions appended after document context when the agent runs
          example: Summarize this document and extract key topics
        createdAt:
          type: string
          format: date-time
          description: When the trigger was configured (set automatically)
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Bad Request
        details:
          type: array
          items:
            type: object
            additionalProperties: true
  responses:
    BadRequest:
      description: Bad Request - Invalid parameters or user not part of organization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: User is not part of any organization
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        JWT token from Clerk authentication.

        Must be from a user with `org:admin` role.

````