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

# Knowledge Base integration

> Learn how to create and manage FlowX Knowledge Bases to provide AI agents with contextual information from static documents and dynamic data feeds.

export const release_2 = "5.11"

export const release_1 = "5.11"

export const release_0 = "5.10"

## Overview

The FlowX Knowledge Base integration enables you to ingest static documents into contextual Knowledge Bases that AI agents can query when preparing responses. This integration provides a centralized repository for information that can be semantically searched and retrieved by AI agents during workflow execution.

<Info>
  Knowledge Bases use vector embeddings and semantic search to find the most relevant information for AI agent queries.
</Info>

## Key features

* **Centralized content management**: Upload documents into organized Knowledge Bases
* **Multiple stores**: Manage content by splitting it across different stores for better organization
* **Semantic search**: AI agents can find relevant information using natural language queries
* **Multiple search modes**: Choose between hybrid, semantic, or keyword search algorithms
* **Testing capabilities**: Test queries and operations in isolation before adding them to workflows
* **Content versioning**: Append, replace, or delete stores with full traceability
* **Relevance scoring**: Understand which content chunks are most relevant for agent responses
* **Audit trail**: Track all store operations with user and timestamp information
* **Version tracking**: Knowledge Base entries are tied to app versions for consistency

## How it works

```mermaid theme={"dark"}
graph LR
    A[Upload Documents] -->|Ingest| B[Knowledge Base]
    B -->|Chunk & Index| D[Vector Database]
    E[Custom Agent Node] -->|Query| D
    D -->|Return Chunks| E
    E -->|Generate Response| F[AI Service]
```

### High-level workflow

1. **Create Knowledge Base**: Add a new Knowledge Base data source in Integration Designer
2. **Ingest content**: Upload documents into stores
3. **Automatic chunking**: Content is automatically split into chunks and indexed for semantic search
4. **Query in workflows**: AI agents query the Knowledge Base to find relevant information
5. **Monitor usage**: Track which chunks are used and their relevance scores in console logs

## Main capabilities

### Content ingestion

<CardGroup cols={2}>
  <Card title="Manual upload" icon="upload">
    Upload PDF documents directly from the Knowledge Base admin interface
  </Card>
</CardGroup>

### Content management

<Steps>
  <Step title="Organize by stores">
    Manage content by organizing it into separate stores for better control and traceability
  </Step>

  <Step title="Append or replace">
    Update existing stores by appending new information or replacing it entirely
  </Step>

  <Step title="Delete when needed">
    Remove stores and all associated chunks when they're no longer needed
  </Step>
</Steps>

### AI agent integration

AI agents can use Knowledge Bases with the ReAct (Reasoning and Acting) model to:

* Find relevant information based on user queries
* Understand which stores provided the information
* See relevance scores for retrieved chunks
* Make informed decisions based on contextual knowledge

## Stores

Stores represent individual collections of information within a Knowledge Base. Each store can be:

* **Manual**: Files uploaded through the Knowledge Base admin interface
* **Workflow**: Content ingestion through workflow operations. The Update Knowledge Base node accepts a file path, so workflows can ingest content uploaded earlier in the run (5.8.0+)

<Frame>
  ![Knowledge Base Stores](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.6/kb_stores.png)
</Frame>

### Store lifecycle

```mermaid theme={"dark"}
stateDiagram-v2
    [*] --> New: Create
    New --> Processing: Upload/Ingest
    Processing --> Ready: Complete
    Processing --> Failed: Error
    Ready --> Processing: Update
    Ready --> Failed: Partial failure
    Ready --> MarkedForRemoval: Delete
    Failed --> Processing: Retry
    MarkedForRemoval --> [*]
```

Stores progress through the following states:

| State          | Description                                                       |
| -------------- | ----------------------------------------------------------------- |
| **New**        | Store created, awaiting content                                   |
| **Processing** | Content is being uploaded, chunked, and indexed                   |
| **Ready**      | Content is fully processed and available for queries              |
| **Failed**     | Processing encountered an error, or content is partially degraded |
| **Deleting**   | Store is scheduled for deletion                                   |

### Audit trail

All store operations are tracked in the audit trail with full traceability:

| Field              | Description                                                                                              |
| ------------------ | -------------------------------------------------------------------------------------------------------- |
| **Operation type** | `ADD_CONTENT_SOURCE`, `REPLACE_CONTENT_SOURCE`, `DELETE_CONTENT_SOURCE`, `ADD_CONTENT`, `REMOVE_CONTENT` |
| **Triggered by**   | How the operation was initiated: Manual, API, Workflow, or Test                                          |
| **User**           | The user who performed the operation (for manual operations)                                             |
| **Status**         | Final operation state: Completed or Failed                                                               |
| **Timestamp**      | When the operation occurred                                                                              |

<Tip>
  Use the audit trail to track who made changes to Knowledge Base content and when, which is useful for compliance and troubleshooting.
</Tip>

## Error handling and retry

<Badge color="blue" icon="cloud">SaaS · {release_0}</Badge>

<Info>
  **Available on SaaS with FlowX.AI {release_0}.** This feature is live on managed (SaaS) deployments now. Self-hosted deployments will receive it with the next LTS release family.
</Info>

When Knowledge Base ingestion fails, the Knowledge Base page shows a clear **failure status and reason**, and a **Retry** button re-runs the last operation after cleaning up any partial content, so the store is not left inconsistent. For the store-side recovery flow, see [Managing content](./managing-content#error-handling).

In workflows, the **Update Knowledge Base** node gains a **FAIL** exit handle with **per-operation rollback**: when an update fails, the node routes to the FAIL branch and rolls back the failed operation instead of leaving partial content behind, so you can handle the error explicitly in the flow.

## Search modes

Knowledge Bases support three search algorithms that determine how queries are matched against stored content:

| Search Mode  | Description                                                                     | Best For                                                          |
| ------------ | ------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| **Hybrid**   | Combines semantic and keyword search for balanced results                       | General-purpose queries where both meaning and exact terms matter |
| **Semantic** | Uses vector embeddings to match by meaning, not exact words                     | Natural language questions, conceptual queries                    |
| **Keyword**  | Term-based matching that also finds closely related words, not just exact terms | Precise lookups, technical terms, codes, identifiers              |

<Tip>
  Start with **Hybrid** search mode for most use cases. Switch to Semantic for conversational queries or Keyword for exact term lookups.
</Tip>

***

## Chunks and search

Chunks are small snippets of content that are indexed in the vector database for semantic search. When an AI agent queries a Knowledge Base, the most relevant chunks are returned based on:

* **Content similarity**: Semantic meaning of the query vs. chunk content
* **Relevance score**: Percentage indicating how relevant the chunk is (0-100%)
* **Metadata filters**: Optional filters built from typed operators and AND/OR logic — see [Filtering by metadata](./managing-content#filtering-by-metadata)

<Tip>
  You can test different query parameters to see which chunks are returned and their relevance scores before using the Knowledge Base in production workflows.
</Tip>

## Use cases

### Product documentation assistant

Create a Knowledge Base with product documentation and allow AI agents to answer customer questions based on the latest documentation.

### Policy compliance

Upload company policies and compliance documents. AI agents can reference these when processing requests to ensure compliance.

### Dynamic knowledge updates

Upload updated documents to Knowledge Bases to keep AI agent knowledge current. Content can be managed manually through the admin interface or programmatically through workflows and APIs.

### Multi-source information synthesis

Organize information across multiple stores and let AI agents synthesize information from different sources to provide comprehensive answers.

## Limitations

<Warning>
  **Current limitations:**

  * AI agents can only use one Knowledge Base per Custom Agent node
  * Documents received from integrations cannot be directly ingested (Document Plugin links are treated as strings)
  * Store renaming is not available
  * There is no bulk operation to clear all content from a Knowledge Base: content is deleted per store. See [Emptying a knowledge base](./managing-content#emptying-a-knowledge-base)
  * Deleting the Knowledge Base data source does not remove already-ingested content: delete all of its stores first, then delete the data source
</Warning>

***

## Creating a knowledge base

### Prerequisites

Before you begin, ensure you have:

* Access to FlowX Designer with appropriate permissions
* A project where you want to add the Knowledge Base
* Content ready to ingest (PDF documents or JSON data)

### Setup steps

To add a new Knowledge Base data source:

<Steps>
  <Step title="Navigate to Integration Designer">
    Go to **FlowX Designer** → **Workspaces** → **Your workspace** → **Projects** → **Your project** → **Integrations** → **Data Sources**
  </Step>

  <Step title="Create new data source">
    Click **Add New Data Source** and select **FlowX Knowledge Base** as the data source type
  </Step>

  <Step title="Configure basic settings">
    Fill in the required fields with the following information
  </Step>
</Steps>

<Frame>
  ![Add Knowledge Base](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.x/add_kb.png)
</Frame>

### Configuration fields

#### Name

The unique identifier for your Knowledge Base within the project.

<ParamField path="Name" type="string" required>
  **Validation rules:**

  * **Required**: Field cannot be empty
  * **Uniqueness**: Must be unique within the project
  * **Special characters**: Only letters, numbers, and the following characters are allowed: `[]`, `()`, `.`, `_`, `-`
  * **Length**: Minimum 3 characters, maximum 50 characters
</ParamField>

#### Description

An optional description explaining the purpose and contents of the Knowledge Base.

<ParamField path="Description" type="string">
  Provide additional context about what information this Knowledge Base contains and how it should be used.
</ParamField>

#### Containing personal information

<Badge color="blue" icon="cloud">SaaS · {release_1}</Badge>

<Info>
  **Available on SaaS with FlowX.AI {release_1}.** This feature is live on managed (SaaS) deployments now. Self-hosted deployments will receive it with the next LTS release family.
</Info>

Turn on **Containing Personal Information** when the Knowledge Base will hold personal data and you need its content to stay on-box. When the toggle is on, FlowX indexes the Knowledge Base with a **local embedding model** instead of the cloud default, so the content is never sent to an external embedding provider.

<ParamField path="Containing Personal Information" type="toggle">
  Enables a local embedding model so that personal information from the Knowledge Base stays on-box. **Default:** OFF.

  When on, an **Embedding model** dropdown appears listing the enabled embedding models from your local AI providers. If none are configured, the dropdown shows *"No local embedding models are available. Configure one in the organization AI settings."*
</ParamField>

<Info>
  Local embedding models are configured once, at the organization level, as a **CUSTOM** AI provider that points at any OpenAI-compatible on-box endpoint (for example, a self-hosted text-embeddings server). The provider stores a free-form base URL and needs no API key.
</Info>

<Warning>
  The embedding model is set before the first store and can no longer be changed. Choose it before you ingest any content: once the first store is built, the model is locked for the life of the Knowledge Base. To use a different model, create a new Knowledge Base.
</Warning>

When the toggle is **off**, the Knowledge Base uses the organization default embedding model and no model selector is shown.

### Example configuration

Here's an example of a well-configured Knowledge Base:

```yaml theme={"dark"}
Name: Product Documentation KB
Description: Contains all product documentation, user guides, and FAQ documents for the customer support AI agent
```

### After creation

Once you've created a Knowledge Base, you'll see three tabs:

<CardGroup cols={3}>
  <Card title="Stores" icon="folder">
    View and manage all stores ingested into the Knowledge Base
  </Card>

  <Card title="Chunks" icon="cube">
    Search and view the individual chunks created from your content
  </Card>

  <Card title="Metadata" icon="tags">
    Define custom metadata keys used to filter and scope retrieval
  </Card>
</CardGroup>

<Frame>
  ![Knowledge Base Dashboard](https://s3.eu-west-1.amazonaws.com/docx.flowx.ai/5.x/kb_dashboard.png)
</Frame>

#### Settings tab

<Badge color="blue" icon="cloud">SaaS · {release_2}</Badge>

<Info>
  **Available on SaaS with FlowX.AI {release_2}.** This feature is live on managed (SaaS) deployments now. Self-hosted deployments will receive it with the next LTS release family.
</Info>

The **Settings** tab holds the **Embedding** section for the Knowledge Base:

* The **Containing Personal Information** toggle and, when it is on, the **Embedding model** selector.
* The active embedding model, shown in the Knowledge Base header tooltip as *"Embedding model: \<model>"*.
* **Dimensions** and **distance metric**, which the platform derives from the model when the first store is built. These are read-only.

***

## Next steps

<CardGroup cols={3}>
  <Card title="Managing Content" href="./managing-content" icon="folder">
    Upload documents and manage stores
  </Card>

  <Card title="Using in Workflows" href="./using-knowledge-base-in-workflows" icon="workflow">
    Query Knowledge Bases from workflows
  </Card>

  <Card title="Testing Operations" href="./testing-knowledge-base" icon="flask">
    Test queries and operations before production use
  </Card>
</CardGroup>

## Related resources

<Card title="Integration Designer" href="../integration-designer" icon="link">
  Integration Designer and data sources
</Card>

<Card title="Custom Agent Nodes" href="../custom-agent-node" icon="link">
  Using AI agents in workflows
</Card>

<Card title="Integrations Overview" href="../integrations-overview" icon="link">
  Integration ecosystem overview
</Card>


## Related topics

- [Chat interface](/5.9/ai-platform/using-agents/chat-interface.md)
- [Chat component](/5.9/ai-platform/chat-component.md)
- [Knowledge base RAG](/5.9/ai-platform/patterns/knowledge-base-rag.md)
- [Using AI agents](/5.9/ai-platform/using-agents/overview.md)
- [FlowX.AI 5.3.0 Release Notes](/release-notes/v5.x/v5.3.0-december-2025/v5.3.0-december-2025.md)
