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

# Get knowledge capabilities

> Read knowledge limits, defaults and the account scope marker before enabling import, review and testing controls in your app.

**FIXED · agent** One live knowledge base belongs to an agent. Its attached numbers use that base on enabled channels. Only the active revision and eligible, unsuppressed pieces enter live retrieval.

**NOT OFFERED → do this instead · number** Knowledge and its enabled channels belong to the agent. Retired per-number knowledge operations return 410 number\_knowledge\_removed. Use separate agents when a number needs different knowledge or none.

**YOU CAN CHANGE · source** Use pasted text, PDF, DOCX or plain UTF-8 text, or discover a website and import selected pages. API submissions can request review.

**SCOPE · agent** Review knowledge drafts and publish approved material. Limits per base: `sources` 50 · `kbTokens` 100,000 · `topics` 1,000.

[Read the compact AI rules](https://docs.nixflex.com/ai-rules.md#knowledge)

Read current knowledge limits, defaults and account scope marker.

Method: **GET** · Success: **200** · Scope: **Owning account**

**The important part**

* Read supported actions and bounds before enabling a knowledge UI.
* Capability availability is not a promise that a particular write will be admitted.

[Business guide](https://docs.nixflex.com/guides/business/knowledge.md) · [Developer guide](https://docs.nixflex.com/guides/developer/knowledge.md) · [Glossary](https://docs.nixflex.com/guides/glossary.md)

## Authentication

Send Authorization: Bearer KEY\_ID:KEY\_SECRET using the owning account’s server-side API credential. API keys have Owner authority. With a personal dashboard session, Owner, Admin and Member may read visible knowledge; membership is checked before and after the read. Personal dashboard visibility can hide API-origin agents.

## Request fields

Do not send a request body.

Use returned limits instead of hard-coding runtime configuration. Legacy training/note counters remain for compatibility; their endpoints are removed. The released flag is a rollout marker.

## Response fields

`200 OK` returns the fields below. Where this operation queues work, follow the job and current revision until it finishes ([accepted is not confirmed](https://docs.nixflex.com/guides/glossary.md#saved-accepted-and-confirmed)).

| Field | Type | Meaning |
| - | - | - |
| `released` | boolean | Current rollout marker; false is not a route failure. |
| `limits` | object | Saved value. |
| `limits.fileBytes` | integer | Maximum raw upload bytes: 10 MiB. |
| `limits.pages` | integer | Maximum PDF pages. |
| `limits.sourceTokens` | integer | Maximum tokens per source. |
| `limits.kbTokens` | integer | Maximum original-text tokens per base, including additional manual text. |
| `limits.sources` | integer | Maximum sources per base. |
| `limits.topics` | integer | Maximum topics per base. |
| `limits.bases` | integer | Maximum active agent bases per account. |
| `limits.accountBytes` | integer | Private account storage cap, 100 MiB. |
| `limits.topicTokens` | integer | Maximum packed tokens per published piece. |
| `limits.packTokens` | integer | Current runtime knowledge-pack budget; use the returned value. |
| `limits.mainPromptTokens` | integer | Main prompt token limit with knowledge enabled. |
| `limits.sessionMs` | integer | Legacy five-minute value; knowledge Test has no training wait or timer gate. |
| `limits.kbDaily` | integer | Legacy per-base training counter; training is removed. |
| `limits.accountDaily` | integer | Legacy account training counter; training is removed. |
| `limits.notes` | integer | Legacy note limit; note routes are removed. |
| `limits.noteChars` | integer | Legacy note size; note routes are removed. |
| `limits.messageChars` | integer | Maximum question characters. |
| `limits.messages` | integer | Latest retained conversation messages. |
| `limits.jobs` | integer | Maximum pending/running/review jobs per account. |
| `limits.parseMs` | integer | Bounded file-reader timeout, milliseconds. |
| `limits.discoveryPages` | integer | Maximum discovered website pages. |
| `limits.leaseMs` | integer | Worker lease duration, milliseconds; not a client timeout. |
| `limits.attempts` | integer | Maximum processing attempts per job. |
| `limits.retainedDays` | integer | Retention for transient jobs, drafts, sessions and unanswered observations. |
| `defaults` | object | Only channels, match and not\_found may be supplied. Omitted settings retain the saved value on update. |
| `defaults.channels` | array of string | Enabled knowledge channels. An empty list turns knowledge off for all channels. Allowed items: `"inbound"`, `"outbound"`, `"web_voice"`, `"web_chat"`, `"sms"`. |
| `defaults.match` | string | Answer matching mode. Allowed: `"Strict"`, `"Normal"`. |
| `defaults.not_found` | string | Nonblank response when suitable knowledge is missing. Maximum 500 characters. Minimum 1 characters. |
| `channels` | array of string | Allowed items: `"inbound"`, `"outbound"`, `"web_voice"`, `"web_chat"`, `"sms"`. |
| `sources` | array of string | Allowed items: `"file"`, `"text"`, `"website"`. |
| `test_questions` | string | Value: `"unlimited"`. |
| `training` | boolean | Value: `false`. |
| `preparation` | string | Value: `"original_words"`. |
| `scope_id` | string | Opaque account partition marker, 24 characters. |
| `policy_version` | string | Policy compatibility version. |

## Example request

These examples target Node/CLI 0.11.0 and Python 0.4.0; confirm the installed version supports the method before use. The cURL tab uses Bash; CLI uses PowerShell. Python shows sync usage; AsyncNixflex uses the same JSON methods with async with and await. Set the account credential in `NIXFLEX_API_KEY` and the owned path identifiers shown below in environment variables. Keep private responses out of logs.

```bash cURL (Bash) theme={"dark"}
curl --request GET \
  --url "https://api.nixflex.com/v1/knowledge/capabilities" \
  --header "Authorization: Bearer $NIXFLEX_API_KEY"
```

```javascript Node theme={"dark"}
import Nixflex from 'nixflex';
const c = new Nixflex({apiKey:process.env.NIXFLEX_API_KEY,baseUrl:'https://api.nixflex.com',maxRetries:0});
const result = await c.knowledge.capabilities();
// Keep knowledge and private results out of logs.
```

```python Python theme={"dark"}
import os
from nixflex import Nixflex

with Nixflex(api_key=os.environ["NIXFLEX_API_KEY"], base_url="https://api.nixflex.com", max_retries=0) as c:
    result = c.knowledge.capabilities()
    # Keep knowledge and private results out of logs.
```

```powershell CLI (PowerShell) theme={"dark"}
nixflex knowledge capabilities  --json --base-url "https://api.nixflex.com"
```

```json MCP theme={"dark"}
{
  "name": "get_knowledge_capabilities",
  "arguments": {}
}
```

MCP has 97 registered tools, including 19 Knowledge tools. This example uses a registered tool; configure its credentials and permissions separately.

## Example response

Illustrative response; identifiers are placeholders and optional fields can be absent.

```json Response theme={"dark"}
{
  "released": false,
  "limits": {},
  "defaults": {},
  "channels": [],
  "sources": [],
  "test_questions": "unlimited",
  "training": false,
  "preparation": "original_words",
  "scope_id": "example",
  "policy_version": "example"
}
```

## Errors

Failures use `error.type`, `error.code`, `error.message`, `error.doc_url` and optional `error.details`. Knowledge failures include a request ID in details when available. Read the safe message as text. A job can return HTTP 200 with state `failed` and `error`; that is a job failure, not an HTTP error. Source failures can arise during preparation after the initial accepted response.

| Status | Code | Meaning | What to do |
| - | - | - | - |
| 400 | [`invalid_input`](https://docs.nixflex.com/api-reference/errors#invalid_input) | Check the information and try again. | Correct the named fields or reduce the input before retrying. |
| 404 | [`not_found`](https://docs.nixflex.com/api-reference/errors#not_found) | That topic is not available. | Check the owned identifier and feature availability. |
| 409 | [`deleting`](https://docs.nixflex.com/api-reference/errors#deleting) | This knowledge base is being deleted. | Read current state and resolve the conflict before sending a new request. |
| 503 | [`unavailable`](https://docs.nixflex.com/api-reference/errors#unavailable) | Knowledge is unavailable right now. Your saved information is safe. Try again. | Retry reads with bounded backoff; reconcile writes before repeating. |
| 503 | [`knowledge_unconfigured`](https://docs.nixflex.com/api-reference/errors#knowledge_unconfigured) | Knowledge is not available yet. | Retry reads with bounded backoff; reconcile writes before repeating. |
| 503 | [`knowledge_not_released`](https://docs.nixflex.com/api-reference/errors#knowledge_not_released) | Knowledge is not released yet. | Retry reads with bounded backoff; reconcile writes before repeating. |
| 403 | [`permission_denied`](https://docs.nixflex.com/api-reference/errors#permission_denied) | Your personal role does not allow this action. | Use a permitted personal account; do not share the organisation key. |
| 403 | [`membership_revoked`](https://docs.nixflex.com/api-reference/errors#membership_revoked) | Your membership has ended. | Use a permitted personal account; do not share the organisation key. |
| 401 | [`unauthorized`](https://docs.nixflex.com/api-reference/errors#unauthorized) | The credential is missing or invalid. | Check the full account credential. |
| 429 | [`rate_limit_exceeded`](https://docs.nixflex.com/api-reference/errors#rate_limit_exceeded) | The account request limit was reached. | Wait for the stated retry/reset time. |

## Retry and idempotency

This is a read or calculation. GET requests may retry transient connection failures once with bounded backoff; respect Retry-After. Do not retry invalid input or ownership errors unchanged. POST calculations are not automatically retried.

## Related endpoints

* [List knowledge agents](https://docs.nixflex.com/api-reference/knowledge/get-knowledge-targets.md)
* [Get agent knowledge](https://docs.nixflex.com/api-reference/knowledge/get-agents-target-knowledge-base.md)
* [Errors and recovery](https://docs.nixflex.com/api-reference/errors.md#error-envelope)


## OpenAPI

````yaml api-reference/public.openapi.json GET /knowledge/capabilities
openapi: 3.1.0
info:
  title: Nixflex public API
  version: 1.0.0
  description: >-
    Nixflex API reference for agents, calls, messaging, knowledge, organisations
    and integrations. Authenticate with the owning account and follow each
    operation’s permissions, response and retry contract.
servers:
  - url: https://api.nixflex.com/v1
security:
  - bearerAuth: []
paths:
  /knowledge/capabilities:
    get:
      tags:
        - Knowledge
      summary: Get knowledge capabilities
      description: >-
        Read current knowledge limits, defaults and account scope marker. Use
        returned limits instead of hard-coding runtime configuration. Legacy
        training/note counters remain for compatibility; their endpoints are
        removed. The released flag is a rollout marker.
      operationId: get_knowledge_capabilities
      parameters: []
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  released:
                    type: boolean
                    description: Current rollout marker; false is not a route failure.
                  limits:
                    type: object
                    properties:
                      fileBytes:
                        type: integer
                        description: 'Maximum raw upload bytes: 10 MiB.'
                        example: 10485760
                      pages:
                        type: integer
                        description: Maximum PDF pages.
                        example: 200
                      sourceTokens:
                        type: integer
                        description: Maximum tokens per source.
                        example: 20000
                      kbTokens:
                        type: integer
                        description: >-
                          Maximum original-text tokens per base, including
                          additional manual text.
                        example: 100000
                      sources:
                        type: integer
                        description: Maximum sources per base.
                        example: 50
                      topics:
                        type: integer
                        description: Maximum topics per base.
                        example: 1000
                      bases:
                        type: integer
                        description: Maximum active agent bases per account.
                        example: 20
                      accountBytes:
                        type: integer
                        description: Private account storage cap, 100 MiB.
                        example: 104857600
                      topicTokens:
                        type: integer
                        description: Maximum packed tokens per published piece.
                        example: 800
                      packTokens:
                        type: integer
                        description: >-
                          Current runtime knowledge-pack budget; use the
                          returned value.
                        example: 800
                      mainPromptTokens:
                        type: integer
                        description: Main prompt token limit with knowledge enabled.
                        example: 3000
                      sessionMs:
                        type: integer
                        description: >-
                          Legacy five-minute value; knowledge Test has no
                          training wait or timer gate.
                        example: 300000
                      kbDaily:
                        type: integer
                        description: Legacy per-base training counter; training is removed.
                        example: 3
                      accountDaily:
                        type: integer
                        description: Legacy account training counter; training is removed.
                        example: 30
                      notes:
                        type: integer
                        description: Legacy note limit; note routes are removed.
                        example: 20
                      noteChars:
                        type: integer
                        description: Legacy note size; note routes are removed.
                        example: 2000
                      messageChars:
                        type: integer
                        description: Maximum question characters.
                        example: 4000
                      messages:
                        type: integer
                        description: Latest retained conversation messages.
                        example: 100
                      jobs:
                        type: integer
                        description: Maximum pending/running/review jobs per account.
                        example: 8
                      parseMs:
                        type: integer
                        description: Bounded file-reader timeout, milliseconds.
                        example: 15000
                      discoveryPages:
                        type: integer
                        description: Maximum discovered website pages.
                        example: 200
                      leaseMs:
                        type: integer
                        description: >-
                          Worker lease duration, milliseconds; not a client
                          timeout.
                        example: 240000
                      attempts:
                        type: integer
                        description: Maximum processing attempts per job.
                        example: 3
                      retainedDays:
                        type: integer
                        description: >-
                          Retention for transient jobs, drafts, sessions and
                          unanswered observations.
                        example: 7
                    additionalProperties: true
                    description: ''
                  defaults:
                    type: object
                    properties:
                      channels:
                        type: array
                        items:
                          type: string
                          description: Channel identifier.
                          enum:
                            - inbound
                            - outbound
                            - web_voice
                            - web_chat
                            - sms
                        description: >-
                          Enabled knowledge channels. An empty list turns
                          knowledge off for all channels.
                        uniqueItems: true
                        default:
                          - inbound
                      match:
                        type: string
                        description: Answer matching mode.
                        enum:
                          - Strict
                          - Normal
                        default: Strict
                      not_found:
                        type: string
                        description: Nonblank response when suitable knowledge is missing.
                        minLength: 1
                        maxLength: 500
                        default: I don't have that information right now.
                    additionalProperties: false
                    description: >-
                      Only channels, match and not_found may be supplied.
                      Omitted settings retain the saved value on update.
                  channels:
                    type: array
                    items:
                      type: string
                      description: ''
                      enum:
                        - inbound
                        - outbound
                        - web_voice
                        - web_chat
                        - sms
                    description: ''
                  sources:
                    type: array
                    items:
                      type: string
                      description: ''
                      enum:
                        - file
                        - text
                        - website
                    description: ''
                  test_questions:
                    type: string
                    description: ''
                    const: unlimited
                  training:
                    type: boolean
                    description: ''
                    const: false
                  preparation:
                    type: string
                    description: ''
                    const: original_words
                  scope_id:
                    type: string
                    description: Opaque account partition marker, 24 characters.
                  policy_version:
                    type: string
                    description: Policy compatibility version.
                required:
                  - released
                  - limits
                  - defaults
                  - channels
                  - sources
                  - test_questions
                  - training
                  - preparation
                  - scope_id
                  - policy_version
                additionalProperties: true
                description: ''
        '400':
          description: 'invalid_input: Check the information and try again.'
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                      - type
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
        '401':
          description: 'unauthorized: The credential is missing or invalid.'
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                      - type
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
        '403':
          description: >-
            permission_denied: Your personal role does not allow this action.
            membership_revoked: Your membership has ended.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                      - type
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
        '404':
          description: 'not_found: That topic is not available.'
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                      - type
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
        '409':
          description: 'deleting: This knowledge base is being deleted.'
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                      - type
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
        '429':
          description: 'rate_limit_exceeded: The account request limit was reached.'
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                      - type
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
        '503':
          description: >-
            unavailable: Knowledge is unavailable right now. Your saved
            information is safe. Try again. knowledge_unconfigured: Knowledge is
            not available yet. knowledge_not_released: Knowledge is not released
            yet.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - doc_url
                      - type
                    properties:
                      type:
                        type: string
                      code:
                        type: string
                      message:
                        type: string
                      doc_url:
                        type: string
                      details:
                        type: object
                        additionalProperties: true
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        KEY_ID:KEY_SECRET from the owning account. Keep it server-side. A
        verified personal dashboard Bearer session may be used where the
        operation documents role-based access.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.