Skip to main content

Overview

Knowledge Bases can be integrated into workflows to enable AI agents to query them for contextual information when generating responses.
Not available in v5.4: Workflow-based content ingestion (adding, updating, or deleting Knowledge Base content from workflows) is planned for a future release. Currently, you can only upload content manually through the Knowledge Base interface.

Using knowledge bases in custom agent nodes

Custom Agent nodes can query Knowledge Bases to retrieve contextual information when generating responses.

Configuring custom agent with knowledge base

1

Add Custom Agent node

Add a Custom Agent node to your workflow
2

Configure the agent

Set up the basic agent configuration (operation prompt, etc.)
3

Enable Knowledge Base

In the Knowledge Base section, enable the Knowledge Base feature
4

Select Knowledge Base

Choose a Knowledge Base from the available options
5

Configure query parameters

Set the query parameters for retrieving chunks
Custom Agent with KB

Knowledge base query configuration

Knowledge Base
select
required
Select the Knowledge Base that the agent should query
Content Source Filter
select
Options:
  • All content sources (default)
  • Specific content source(s)
Filter which content sources the agent should search
Max. Number of Results
number
Maximum number of chunks to retrieve (1-10). Default: 5
Min. Relevance Score
percentage
Minimum relevance score threshold (0-100%). Only chunks above this score will be included. Default: 70%
Metadata Filters
object
Optional metadata filters to apply (exact match with AND logic)
Metadata filtering is a low-priority feature for the first iteration.

How the agent uses knowledge base

When a Custom Agent node executes with Knowledge Base enabled:
  1. Query generation: The agent analyzes the user’s input and generates a search query
  2. Chunk retrieval: The Knowledge Base is queried using semantic search
  3. Relevance filtering: Only chunks meeting the minimum relevance score are returned
  4. Context inclusion: Retrieved chunks are added to the agent’s context
  5. Response generation: The agent generates a response using the retrieved information

ReAct model with knowledge base

When using the ReAct (Reasoning and Acting) model, the agent can:
  • Reason: Determine if Knowledge Base information is needed
  • Act: Query the Knowledge Base as a tool
  • Iterate: Make multiple queries if needed for comprehensive answers
Example ReAct flow:
User: "What are the new features in version 2.5?"

Agent Reasoning: I need to search the Knowledge Base for version 2.5 information

Agent Action: Query Knowledge Base with "new features version 2.5"

Knowledge Base: Returns 3 relevant chunks about version 2.5 features

Agent Reasoning: I have enough information to answer the question

Agent Response: "Version 2.5 introduces three major features..."

Example workflows

Dynamic documentation updates

Update product documentation whenever a new release is deployed:
Workflow: Product Release
Nodes:
  1. Receive Release Data
  2. Knowledge Base Operation
     - KB: "Product Documentation KB"
     - Operation: "Replace Content"
     - Content Source: "Release Notes ${release.version}"
     - Content: "${release.documentation}"
  3. Notify Support Team

Customer support with contextual AI

Use Knowledge Base in a customer support chatbot:
Workflow: Customer Support Chat
Nodes:
  1. Receive Customer Message
  2. Custom Agent Node
     - Model: GPT-4
     - Knowledge Base: "Support Documentation KB"
     - Content Sources: All
     - Min. Relevance: 75%
     - Max Results: 5
  3. Send Response to Customer

Multi-source knowledge ingestion

Aggregate information from multiple systems:
Workflow: Weekly Knowledge Update
Nodes:
  1. Fetch from CRM System
  2. Append to KB
     - Content Source: "CRM Updates"
  3. Fetch from Documentation Site
  4. Append to KB
     - Content Source: "Documentation"
  5. Fetch from Support Tickets
  6. Append to KB
     - Content Source: "Support Insights"

Error handling

Common errors and solutions

Error: Content source "Example" does not exist in Knowledge Base "KB Name"Cause: Attempting to append or replace content in a non-existent content sourceSolution:
  • Verify the content source name is correct
  • Use “Append Content” which creates the content source if it doesn’t exist
  • Check for typos in content source names
Error: Failed to parse JSON contentCause: The content provided is not valid JSONSolution:
  • Ensure workflow variables contain valid JSON
  • Validate JSON structure before passing to Knowledge Base operation
  • Check for special characters that may break JSON formatting
Error: Knowledge Base "KB Name" not found or not accessibleCause: The Knowledge Base doesn’t exist or you don’t have permissionsSolution:
  • Verify the Knowledge Base exists in the project or dependencies
  • Check access permissions for the Knowledge Base
  • Ensure the Knowledge Base is published if using from dependencies
Error: Failed to process content into chunksCause: Error occurred while creating chunks from the contentSolution:
  • Check console logs for detailed error messages
  • Verify the content is in the expected format
  • Retry the operation
  • Contact support if the issue persists

Best practices

Agent configuration

Custom Agent with Knowledge Base:
  • Start with a higher minimum relevance score (70-80%) to avoid irrelevant results
  • Adjust max results based on your use case (fewer for focused answers, more for comprehensive coverage)
  • Test different queries to understand chunk retrieval behavior
  • Monitor console logs to optimize configuration

Relevance score management

Optimizing relevance scores:
  • Chunk size matters: If chunks are too large and queries are small, relevance scores will be low because the query doesn’t cover all the content. If you find yourself setting minimum relevance score to 0%, this may indicate your chunks are too large.
  • Let the agent determine relevance: Consider ordering chunks by relevance (descending) and letting the agent evaluate which chunks are relevant, rather than filtering by minimum relevance score. The agent can see if chunks are relevant and make better decisions.
  • System prompt guidance: If you want to manage relevance filtering, add instructions to your system prompt such as: “If you don’t find any relevant information in the provided chunks, just say ‘I cannot find this information’.”
  • Empty results handling: The Knowledge Base tool returns an empty list when no results are found. Ensure your agent handles empty results gracefully and informs users when information is not available.

Performance

Optimize performance:
  • Keep content sources focused and organized by topic
  • Use content source filters when you know which source contains relevant information
  • Avoid ingesting extremely large documents without proper structuring
  • Regular cleanup of deprecated content sources
  • Consider removing max results limit: Instead of limiting the number of chunks, order them by relevance (descending) and let the agent process all relevant chunks. This allows the agent to make better decisions about which information to use.

Limitations

Current limitations:
  • Only one Knowledge Base per Custom Agent node
  • Cannot ingest documents directly from Document Plugin
  • Metadata filters use exact match with AND logic only (first iteration)
  • Custom metadata cannot be defined

Next steps

Managing Content

Understand content source management in detail

Custom Agent Nodes

Complete guide to Custom Agent nodes

Workflow Data Models

Understanding workflow variables and data
Last modified on February 2, 2026