---
title: "List Collections Api"
method: GET
path: "/api/kb/collections"
tags: ["kb"]
---

# List Collections Api

`GET /api/kb/collections`

List all collections with their statistics.

## Response `200`

Successful Response

- ListCollectionsResult — Response payload for the list collections operation.
  - `status` string, required — Operation status: success|error
  - `collections` CollectionInfo[] — Collection statistics
    - `schema_version` string — Schema version for migration compatibility
    - `name` string, required — Collection identifier
    - `embedding_model_id` string, nullable — Fixed embedding model ID. Set during first document ingestion.
    - `embedding_dimension` integer, nullable — Vector dimension. Auto-detected from embedding model.
    - `rerank_model_id` string, nullable — Optional rerank model ID (registered in the model hub). When set, knowledge_search adds a rerank stage for this collection. When None, no rerank is performed.
    - `documents` integer — Total number of registered documents
    - `processed_documents` integer — Number of successfully processed documents
    - `parses` integer — Number of parse records
    - `chunks` integer — Number of chunk records
    - `embeddings` integer — Number of embedding vectors
    - `document_names` string[] — Distinct source paths for documents within the collection
    - `document_metadata` CollectionDocumentMetadata[] — Minimal per-document metadata for UI actions like unambiguous delete
      - `filename` string, required — Display filename for the document
      - `file_id` string, nullable — UploadedFile identifier when available
      - `doc_id` string, nullable — Knowledge base document identifier when available
    - `owners` integer[] — Distinct user IDs that have documents in this collection
    - `collection_locked` boolean — Whether to lock collection configuration. When True, enforces strict config validation.
    - `allow_mixed_parse_methods` boolean — Whether to allow mixed parse methods within the collection. When False, enforces type-based parse method consistency.
    - `skip_config_validation` boolean — Whether to skip configuration validation during ingestion. Use with caution.
    - `ingestion_config` IngestionConfig — Configuration values for the document ingestion pipeline.
      - `deepdoc_processing_mode` string, nullable — DeepDoc processing mode (e.g., 'pipeline', 'default').
      - `deepdoc_parallel_threads` integer, nullable — DeepDoc parallel threads (DEEPDOC_PARALLEL_THREADS).
      - `deepdoc_reserve_cpu` integer, nullable — DeepDoc reserved CPU cores (DEEPDOC_RESERVE_CPU).
      - `deepdoc_limiter_capacity` integer, nullable — DeepDoc CapacityLimiter capacity (DEEPDOC_LIMITER_CAPACITY).
      - `deepdoc_pipeline_monitor` boolean, nullable — Enable DeepDoc pipeline monitor (DEEPDOC_PIPELINE_MONITOR).
      - `deepdoc_pipeline_s1_workers` integer, nullable — DeepDoc S1 worker count (DEEPDOC_PIPELINE_S1_WORKERS).
      - `deepdoc_gpu_sessions` integer, nullable — DeepDoc GPU sessions count/preference (DEEPDOC_GPU_SESSIONS).
      - `embedding_base_url` string, nullable — Override DashScope base URL for embedding requests.
      - `embedding_api_key` string, nullable — Override DashScope API key for embedding requests.
      - `embedding_timeout_sec` number, nullable — Override embedding request timeout (seconds).
      - `rerank_model_id` string, nullable — Bound rerank model ID for this collection (user-scoped).
      - `parse_method` 'default' | 'pypdf' | 'pdfplumber' | 'unstructured' | 'pymupdf' | 'deepdoc' — Available parsing methods
      - `chunk_strategy` 'recursive' | 'fixed_size' | 'markdown' — Available chunk strategies
      - `chunk_method` string, nullable — Custom chunk method identifier. If provided, takes precedence over chunk_strategy
      - `chunk_size` integer, nullable — Chunk size passed to chunk_document; must be a positive integer. If None, semantic splitting is used without size limits.
      - `chunk_overlap` integer — Chunk overlap passed to chunk_document; must be non-negative
      - `headers_to_split_on` array[], nullable — Markdown headers split rules for markdown strategy
        - unknown[]
          - unknown
      - `separators` string[], nullable — Custom separators for recursive/markdown strategies
      - `use_token_count` boolean — If True, chunk_size and chunk_overlap are in tokens (tiktoken); only applies to RECURSIVE strategy
      - `tiktoken_encoding` string — tiktoken encoding name when use_token_count=True (e.g. cl100k_base for GPT-4/3.5). Should align with config.DEFAULT_TIKTOKEN_ENCODING.
      - `enable_protected_content` boolean — If True, do not split inside code blocks, formulas, tables (P1).
      - `protected_patterns` string[], nullable — Optional regex patterns for protected regions; None uses config default.
      - `table_context_size` integer — Chars from prev/next chunk to attach to table chunks; 0 = off (P2).
      - `image_context_size` integer — Chars from prev/next chunk to attach to image chunks; 0 = off (P2).
      - `embedding_model_id` string, nullable — Embedding model identifier registered in AgentOS model hub. If omitted, the pipeline attempts to auto-detect a single available embedding model.
      - `collection_locked` boolean — Whether to lock collection configuration. When True, enforces strict config validation.
      - `allow_mixed_parse_methods` boolean — Whether to allow mixed parse methods within the collection. When False, enforces type-based parse method consistency.
      - `skip_config_validation` boolean — Skip collection configuration validation. Use with caution.
      - `embedding_batch_size` integer — Batch size for embedding provider requests; must be positive
      - `embedding_concurrent` integer — Maximum concurrent requests for embedding computation when using async mode (for models that don't support batch processing, e.g., text-embedding-v4). Must be positive. Adjust based on machine configuration and API rate limits.
      - `embedding_use_async` boolean — Whether to use async concurrent processing for embeddings. Set to True for models that don't support batch processing (e.g., text-embedding-v4). When True, embeddings are processed concurrently using asyncio instead of batch API calls.
      - `max_retries` integer — Maximum number of retries for embedding provider failures; must be non-negative
      - `retry_delay` number — Delay in seconds between embedding retries; must be non-negative
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `last_accessed_at` string, date-time
    - `extra_metadata` object — Additional metadata for future extensions
  - `total_count` integer, required — Number of collections discovered
  - `message` string, required — Human-readable status message
  - `warnings` string[] — Non-fatal issues encountered during aggregation

---

[API](https://skmtc.net/xorbitsai/apis/xagent.md) · [All operations](https://skmtc.net/xorbitsai/apis/xagent/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xorbitsai/xagent/revisions/33e4ba4936ad/schema)
