> ## 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.

## 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.

> [!NOTE]
>
> Knowledge Bases use vector embeddings and semantic search to find the most relevant information for AI agent queries.

## 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

> [card] Manual upload
>
> Upload PDF documents directly from the Knowledge Base admin interface

### Content management

**1. Organize by stores**

Manage content by organizing it into separate stores for better control and traceability

**2. Append or replace**

Update existing stores by appending new information or replacing it entirely

**3. Delete when needed**

Remove stores and all associated chunks when they're no longer needed

### 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+)

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

### 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.

## Error handling and retry

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](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/knowledge-base-integration/managing-content.md#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 |
| **Keywords** | 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 Keywords for exact term lookups.

***

## 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](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/knowledge-base-integration/managing-content.md#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.

## 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:**
>
> * A Custom Agent node can use several Knowledge Bases, each as its own retrieval tool&#x20;
> * 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](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/knowledge-base-integration/managing-content.md#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

***

## 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:

**1. Navigate to Integration Designer**

Go to **FlowX Designer** → **Workspaces** → **Your workspace** → **Projects** → **Your project** → **Integrations** → **Data Sources**

**2. Create new data source**

Click **Add New Data Source** and select **FlowX Knowledge Base** as the data source type

**3. Configure basic settings**

Fill in the required fields with the following information

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

### Configuration fields

#### Name

The unique identifier for your Knowledge Base within the project.

**Name** `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

#### Description

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

**Description** `string`

Provide additional context about what information this Knowledge Base contains and how it should be used.

#### Containing personal information

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.

**Containing Personal Information** `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."*

> [!NOTE]
>
> 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.

> [!NOTE]
>
> The embedding model is set when the first store is built. To change it later, turn **Containing Personal Information** on or off: FlowX.AI re-embeds the existing content with the new model. See [Can I change personal information after content is ingested?](#can-i-change-personal-information-after-content-is-ingested)

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

#### Can I change personal information after content is ingested?

Yes. When you turn **Containing Personal Information** on or off for a Knowledge Base that already holds content, FlowX.AI re-embeds all of it with the new model:

* **Turning it on**: select a local **Embedding model** in the confirmation window. **Turn on** stays unavailable until you do.
* **Turning it off**: the content is re-embedded with the organization's default embedding model.

**1. Change the toggle**

In the **Settings** tab, change **Containing Personal Information**. The **Turn on personal information?** or **Turn off personal information?** window opens.

**2. Confirm**

Click **Turn on** or **Turn off**. FlowX.AI shows **Re-embedding started**, and the Knowledge Base header shows **Re-embedding content…** until it finishes. How long it takes depends on how much content the Knowledge Base holds.

While re-embedding runs:

* Search and retrieval keep using the current embedding, so workflows that use the Knowledge Base need no change.
* The **Containing Personal Information** toggle is locked.
* Content changes are refused with the message `An embedding migration is running for this knowledge base. Content operations are locked until it finishes.`
* An **Update Knowledge Base** node that targets the Knowledge Base fails without retrying.

If re-embedding fails, the Knowledge Base stays on its previous embedding model and is still fully searchable. The header shows how many documents weren't re-embedded, for example `3 of 120 documents were not re-embedded`. Change the setting again to retry.

On a Knowledge Base with no content yet, the change applies at once and FlowX.AI shows **Embedding settings updated**.

### 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 four tabs:

> [card] Stores
>
> View and manage all stores ingested into the Knowledge Base

> [card] Chunks
>
> Search and view the individual chunks created from your content

> [card] Metadata
>
> Define custom metadata keys used to filter and scope retrieval

> [card] Settings
>
> Configure the embedding model and personal-information handling

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

#### Settings tab

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

> [card] [Managing Content](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/knowledge-base-integration/managing-content.md)
>
> Upload documents and manage stores

> [card] [Using in Workflows](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/knowledge-base-integration/using-knowledge-base-in-workflows.md)
>
> Query Knowledge Bases from workflows

> [card] [Testing Operations](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/knowledge-base-integration/testing-knowledge-base.md)
>
> Test queries and operations before production use

## Related resources

> [card] [Integration Designer](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/integration-designer.md)
>
> Integration Designer and data sources

> [card] [Custom Agent Nodes](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/custom-agent-node.md)
>
> Using AI agents in workflows

> [card] [Integrations Overview](https://docs.flowx.ai/6.x/docs/platform-deep-dive/integrations/integrations-overview.md)
>
> Integration ecosystem overview


## Related topics

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


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