Reference · Tools

Knowledge Base

Create knowledge bases and add, update, or remove their documents

Action (binary) Data & Storage v1 Binary data

The Knowledge Base node manages knowledge bases and their contents from inside a workflow: create or delete a base, add a document from binary data or text, replace one in place keeping its ID, remove documents, and list what exists. Added files are extracted to markdown, summarised and indexed exactly as a manual upload would be. A typical build is scraping a docs site nightly and keeping a knowledge base current from it.

Node type
Action (binary)
Parameters
20
Outputs
Output, Error
Credentials
None required

Knowledge Base

Create knowledge bases and manage their documents

Overview

Manages BusyBot knowledge bases from a workflow: create/delete a knowledge base, add a document (from binary data or text — extracted, summarized and indexed by the standard ingestion pipeline), replace an existing document in place, remove documents, and list knowledge bases or their documents.

Category: Data & Storage
Tool Name: knowledge_base
Version: 1

Appearance: Icon: lucide-BookOpen | Color: #8B5CF6

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool does not require any credentials.

Operations

OperationValueDescription
Add DocumentaddDocumentExtract, summarize and index a new document
Update DocumentupdateDocumentReplace an existing document’s content, keeping its ID
Remove DocumentremoveDocumentDelete a document by ID or file name
Create Knowledge BasecreateKnowledgeBaseCreate a new (empty) knowledge base
Delete Knowledge BasedeleteKnowledgeBasePermanently delete a knowledge base and its content
List Knowledge BaseslistKnowledgeBasesList this user’s knowledge bases
List DocumentslistDocumentsList the documents in a knowledge base

Parameters

List Knowledge Bases takes no parameters of its own — see All Operations.

Add Document (addDocument)

ParameterTypeRequiredDefaultDescription
Knowledge BasestringYesThe knowledge base ID or its exact name. Supports expressions like {{ $json.kbId }}.
Content SourceoptionsNobinaryWhere the document content comes from.
Options: binary (a file from an upstream node — download, read file, S3, …), text (text or markdown built from the item)
Binary PropertystringNodataName of the binary property holding the file. (shown when Content Source is binary)
TextstringNoThe document content. Supports expressions like {{ $json.body }}. (shown when Content Source is text)
File Name (fileName)stringNodocument-{{ $index }}.mdFile name stored with the document. The EXTENSION selects the extractor (.md, .txt, .pdf, .docx, .xlsx, .csv, .html, images, audio, video). On Update Document, leave empty to keep the current name.
Regenerate Knowledge Base SummarybooleanNotrueRegenerate the knowledge-base-level summary once after the batch. Off is cheaper but leaves the summary stale, which searches will report.
Busy Wait (Seconds)numberNo120How long to wait for another writer (a KB manager upload or another node) to release this knowledge base.

Update Document (updateDocument)

ParameterTypeRequiredDefaultDescription
Knowledge BasestringYesThe knowledge base ID or its exact name. Supports expressions like {{ $json.kbId }}.
Content SourceoptionsNobinaryWhere the document content comes from.
Options: binary (a file from an upstream node — download, read file, S3, …), text (text or markdown built from the item)
Binary PropertystringNodataName of the binary property holding the file. (shown when Content Source is binary)
TextstringNoThe document content. Supports expressions like {{ $json.body }}. (shown when Content Source is text)
File Name (fileName)stringNodocument-{{ $index }}.mdFile name stored with the document. The EXTENSION selects the extractor (.md, .txt, .pdf, .docx, .xlsx, .csv, .html, images, audio, video). On Update Document, leave empty to keep the current name.
Document ID (docId)stringNoID of the document to replace. Supports expressions.
Regenerate Knowledge Base SummarybooleanNotrueRegenerate the knowledge-base-level summary once after the batch. Off is cheaper but leaves the summary stale, which searches will report.
Busy Wait (Seconds)numberNo120How long to wait for another writer (a KB manager upload or another node) to release this knowledge base.

Remove Document (removeDocument)

ParameterTypeRequiredDefaultDescription
Knowledge BasestringYesThe knowledge base ID or its exact name. Supports expressions like {{ $json.kbId }}.
Remove ByoptionsNodocIdHow to identify the document(s) to remove.
Options: docId, fileName (removes every document with this exact name)
Document ID (removeDocId)stringNoID of the document to remove. Supports expressions. (shown when Remove By is docId)
File Name (docFileName)stringNoExact file name of the document(s) to remove. Supports expressions. (shown when Remove By is fileName)
Fail If Not FoundbooleanNotrueError when no document matches. Turn off to report notFound and continue.
Regenerate Knowledge Base SummarybooleanNotrueRegenerate the knowledge-base-level summary once after the batch. Off is cheaper but leaves the summary stale, which searches will report.
Busy Wait (Seconds)numberNo120How long to wait for another writer (a KB manager upload or another node) to release this knowledge base.

Create Knowledge Base (createKnowledgeBase)

ParameterTypeRequiredDefaultDescription
NamestringYesName of the new knowledge base. Supports expressions.
DescriptionstringNoOptional description. It is given to the search agent as context.
If It Already ExistsoptionsNogetExistingWhat to do when a knowledge base with this name already exists.
Options: getExisting (return the existing one), create (create another), fail

Delete Knowledge Base (deleteKnowledgeBase)

ParameterTypeRequiredDefaultDescription
Knowledge BasestringYesThe knowledge base ID or its exact name. Supports expressions like {{ $json.kbId }}.
Confirm DeletionbooleanNofalseRequired. Deleting a knowledge base removes every document and its stored content permanently.
Unlink From AgentsbooleanNotrueAlso remove this knowledge base from any agent that references it.

List Documents (listDocuments)

ParameterTypeRequiredDefaultDescription
Knowledge BasestringYesThe knowledge base ID or its exact name. Supports expressions like {{ $json.kbId }}.
Include SummariesbooleanNofalseInclude each document’s generated summary in the listing.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo5Items prepared concurrently. Writes to a knowledge base are always serialized.

Output Data

One output item per input item. The result is written to knowledgeBase on the output item; the rest of the item JSON passes through unchanged, and binary data is forwarded.

Every result carries operation, kbId and kbName, plus kbSummaryRegenerated when the knowledge base summary was rebuilt during that run. The remaining fields depend on the operation:

OperationFields on knowledgeBase
addDocumentdocId, fileName, tokenCount, pages, summary, condensedSummary — or skipped: true with reason: "unchanged" and the existing docId when the content is already in the knowledge base
updateDocumentdocId (unchanged), fileName, tokenCount, pages, summary, condensedSummary, replaced: true, previousFileName
removeDocumentremoved: [{ docId, fileName }] — or removed: [] with notFound: true and a message when nothing matched and Fail If Not Found is off
createKnowledgeBasekbId, name, description, status, documentCount, totalTokens, created (false when an existing knowledge base was returned)
deleteKnowledgeBasekbId, name, unlinkedAgents (the agent IDs the knowledge base was removed from), and alreadyDeleted: true if the same knowledge base was targeted more than once in the run
listKnowledgeBasesknowledgeBases[] (kbId, name, description, status, documentCount, totalTokens, kbSummary, updatedAt, health) and count
listDocumentsdocuments[] (docId, fileName, fileType, tokenCount, pages, status, plus summary and condensedSummary when Include Summaries is on) and count

Reference the result downstream by expression, e.g. {{ $json.knowledgeBase.docId }}.

Usage Examples

  • add this PDF to the Product Manuals knowledge base
  • store the scraped article as a document in my knowledge base
  • create a knowledge base for support tickets if it does not exist
  • remove the outdated document from the knowledge base
  • list the documents in a knowledge base

Example Configuration

Add a downloaded PDF to a knowledge base:

{
  "type": "knowledge_base",
  "parameters": {
    "operation": "addDocument",
    "knowledgeBase": "Product Manuals",
    "contentSource": "binary",
    "binaryPropertyName": "data",
    "fileName": "{{ $json.title }}.pdf"
  }
}

Store scraped text as a markdown document:

{
  "type": "knowledge_base",
  "parameters": {
    "operation": "addDocument",
    "knowledgeBase": "kb_1765432100000_ab12cd34",
    "contentSource": "text",
    "text": "# {{ $json.title }}\n\n{{ $json.body }}",
    "fileName": "{{ $json.slug }}.md",
    "regenerateSummary": true
  }
}

Create the knowledge base only if it does not exist yet:

{
  "type": "knowledge_base",
  "parameters": {
    "operation": "createKnowledgeBase",
    "name": "Support Tickets {{ $json.year }}",
    "description": "Resolved tickets, one document per ticket",
    "ifExists": "getExisting"
  }
}

Remove superseded documents by file name:

{
  "type": "knowledge_base",
  "parameters": {
    "operation": "removeDocument",
    "knowledgeBase": "Product Manuals",
    "removeBy": "fileName",
    "docFileName": "{{ $json.oldFile }}",
    "failIfMissing": false
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Manages knowledge bases and their documents from a workflow. Creates or deletes a knowledge base, adds a document from binary data or text (the file is extracted to markdown, summarized and indexed exactly like a KB manager upload), replaces an existing document in place keeping its docId, removes documents by id or file name, and lists knowledge bases or documents. Use it to keep a knowledge base fed by a pipeline — scrape or download content, then add it — and pair it with Search Knowledge Base to read the results back. Adding and updating cost LLM tokens (summarization); documents whose content is unchanged are skipped automatically.

Behavior notes

  • Batching. All items targeting the same knowledge base are applied in ONE pass: one content-bundle rebuild and one KB-summary regeneration per KB per node run, not per document.
  • Duplicate content is skipped. Identity is the sha256 of the file bytes, never the file name. Re-adding unchanged content returns skipped: true, reason: "unchanged" and costs no tokens.
  • updateDocument keeps the docId, so existing citations stay valid.
  • Lists return an array on one item — use a Split Out node on knowledgeBase.knowledgeBases or knowledgeBase.documents to fan out.
  • Cost. Adding/updating runs extraction (OCR/vision/transcription for images, audio and video) plus a multi-pass summarizer; these tokens are metered to the workflow owner. Removing and listing cost nothing unless the KB summary is regenerated.

Frequently asked questions

Does an update break existing citations?

No — replacing a document keeps its docId, so anything referencing it stays valid. That is the difference between updating and deleting then re-adding.

Will re-adding the same content cost tokens again?

No. Identity is the sha256 of the file bytes, not the file name, so unchanged content is skipped and reported as such rather than being re-summarised.

Does it need credentials?

No. Knowledge bases belong to the workflow's owner, so the node resolves the user from the run rather than taking a credential.

How do I read the results back?

Pair it with Search Knowledge Base, which runs an agentic search over the same base and returns findings with an answer.

Build with the Knowledge Base node

Drop it into a workflow, wire it to an agent, or call it on a schedule.

Open BusyBot

Last updated . Spotted something wrong? Tell us.