Skip to main content

Overview

Knowledge Bases can be integrated into workflows in two ways:
  1. Content ingestion: Add, update, or delete content sources dynamically from workflows
  2. AI agent queries: Enable Custom Agent nodes to query Knowledge Bases for contextual information

Content ingestion from workflows

You can manage Knowledge Base content sources directly from workflows using Knowledge Base operations. This allows you to dynamically update Knowledge Bases based on process data.

Adding knowledge base operations

1

Open your workflow

Navigate to the workflow where you want to add a Knowledge Base operation
2

Add a task node

Add a new task node or select an existing one
3

Add Knowledge Base action

Add a new action and select Knowledge Base Operation as the action type
4

Configure the operation

Fill in the required configuration fields
Knowledge Base Operation

Configuration fields

Knowledge Base
select
required
Select a Knowledge Base from:
  • Local project libraries
  • Dependency libraries
Operation
select
required
Choose the operation to perform on the content source
Content Source
string
required
The name of the content source to operate on. You can:
  • Select an existing content source from the dropdown
  • Type a new content source name
  • Use a workflow variable (e.g., ${contentSourceName})
  • Use a configuration parameter
Content
string
required
The JSON content to ingest. Typically a workflow variable containing the data to be indexed.

Available operations

The following operations are available for managing content sources from workflows:

Append content

Add new content to a content source without removing existing chunks.
PropertyBehavior
Creates if missing?Yes
Deletes existing content?No
Use case: continuously adding new information to a Knowledge Base, such as adding new product updates or FAQ entries. Example:
{
  "knowledge_base": "Product Documentation KB",
  "operation": "Append Content",
  "content_source": "${process.contentSource}",
  "content": "${process.productUpdate}"
}

Replace content

Replace all existing content in a content source with new content.
PropertyBehavior
Creates if missing?Yes
Deletes existing content?Yes (content only)
Use case: updating documentation to a new version where the previous version should be completely replaced. Example:
{
  "knowledge_base": "Policy Documents KB",
  "operation": "Replace Content",
  "content_source": "Employee Handbook",
  "content": "${process.updatedHandbook}"
}
Replace Content permanently deletes all existing chunks from the content source before adding new content.

Delete content source

Remove a content source and all its associated chunks completely.
PropertyBehavior
Creates if missing?No
Deletes existing content?Yes (object + content)
Use case: removing outdated or deprecated content that should no longer be available to AI agents. Example:
{
  "knowledge_base": "Temporary KB",
  "operation": "Delete Content Source",
  "content_source": "Deprecated Policy"
}

Content format

Content ingested from workflows must be in JSON format. The JSON can contain:
  • Plain text strings
  • Structured data objects
  • Arrays of information
  • Any JSON-serializable data
Example content:
{
  "title": "Product Update - Q4 2025",
  "sections": [
    {
      "heading": "New Features",
      "content": "We've introduced three major features this quarter..."
    },
    {
      "heading": "Bug Fixes",
      "content": "Resolved critical issues affecting performance..."
    }
  ],
  "metadata": {
    "version": "2.5.0",
    "release_date": "2025-12-15"
  }
}

Using variables and parameters

You can use workflow variables and configuration parameters in Knowledge Base operations:
Reference data from the current process instance:
{
  "content_source": "${application.documentType}",
  "content": "${application.documentContent}"
}

Console logs

Knowledge Base operations generate detailed console logs showing the execution status:
KB Operation Console Log
The console log displays:
Operation
string
The Knowledge Base operation that was executed
Knowledge Base
string
The name of the Knowledge Base
Content Source
string
The name of the content source that was modified
Status
string
Success or error status of the operation
Chunks Created
number
Number of chunks created (for Append and Replace operations)
Chunks Deleted
number
Number of chunks deleted (for Replace and Delete operations)
Error Message
string
Detailed error message if the operation failed

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 (model, 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..."

Console logs for knowledge base queries

When an agent queries a Knowledge Base, the console log shows detailed information:
KB Query Console Log
The console log includes:
Query
string
The search query generated by the agent
Content Sources Searched
array
List of content sources that were searched
Chunks Retrieved
number
Total number of chunks retrieved
Chunks Used
array
Details of each chunk used, including:
  • Chunk content
  • Relevance score
  • Content source
  • Metadata
Execution Time
duration
Time taken to retrieve and process chunks
Use console logs to understand:
  • Which chunks are most relevant for different queries
  • Whether relevance score thresholds need adjustment
  • If content sources are providing useful information

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

Content ingestion

Workflow content ingestion tips:
  • Use meaningful content source names that include versioning
  • Include metadata in your JSON content for better organization
  • Test operations in isolation before adding to production workflows
  • Handle errors gracefully with try-catch patterns in your workflow

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

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

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

Custom Agent Nodes

Complete guide to Custom Agent nodes

Workflow Data Models

Understanding workflow variables and data