Agent BrainsAgent Brains
n8n

AgentBrains Knowledge Base

Create, retrieve, list, relate, filter, and update Knowledge Base documents and categories from n8n.

AgentBrains Knowledge Base

Use this node when an n8n workflow must work with exact Knowledge Base records instead of broad semantic search. This page reflects n8n-nodes-agent-brains version 3.3.0.

Resources and operations

The node exposes Knowledge Base resources through one AgentBrains node.

ResourceWhat it maps toAvailable operations
DocumentKnowledge Base entities/documentsCreate, Get, Get Many, Get Related Entities, Get by Category Type, Get All Documents, Update
CategoryKnowledge Base categoriesCreate, Get, Get Many, Get by Type, Update
ImagesAttachments and media linked to entitiesGet Many, Get
Company DataHigh-level company profile fieldsDirect fetch without an operation selector

Relationship type and category type values appear where they are used as filters or operation inputs, but they are not standalone resources in the node.

Document operations

Select Knowledge Base as the node, then select Document as the resource.

OperationUse it forRequired fieldsOptional fields and filters
CreateCreate a new Knowledge Base entity/document.document name and category fields shown by the nodecontent/details, source, SKU, tags, status, attachments, relations
GetRetrieve one document/entity.document/entity IDfield selection and filters shown by the node
Get ManyList matching documents/entities.nonecategory IDs, search, recursive, fields, SKU, source, tags
Get Related EntitiesRetrieve entities related to one source entity.document/entity IDrelationship type
Get by Category TypeQuery documents by category alias/type.category type selected in the nodefields, search, SKU, source, tags
Get All DocumentsRetrieve all available documents, optionally merged.nonemerge documents and filtering fields shown by the node
UpdateUpdate an existing document/entity by ID.document/entity IDat least one update field

Document Create creates a new Knowledge Base entity. Document Update changes an existing entity by ID. Update operations require the ID and at least one field to change.

Category operations

Select Knowledge Base as the node, then select Category as the resource.

OperationUse it forRequired fieldsOptional fields and filters
CreateCreate a new category.name, description, category type/alias, and policy fields shown by the nodeparent category and permissions if exposed by the node
GetRetrieve one category.category ID or key field shown by the noderecursive/details options shown by the node
Get ManyList matching categories.nonecategory alias, policy, parent, search, fields, extended
Get by TypeList categories by category type/alias.category type selected in the nodefilters shown by the node
UpdateUpdate an existing category by ID.category IDat least one update field

Category Create creates a new category. Category Update changes an existing category by ID. Update operations require the ID and at least one field to change.

Images and metadata

ParameterUsed inDescription
IDGetFetch a single attachment by ID.
Additional FieldsGet ManyRestrict the response fields for image records.

Output behavior

The node returns slightly different shapes depending on the operation:

Operation typeOutput shape
Single record operationsA normal object for the document, category, image, or company data
List operationsAn object with an items array or the list shape returned by the API
Get All Documents with Merge Documents enabledA single object with mergedContent and documentCount
Create/Update operationsThe created or updated record returned by AgentBrains

Practical examples

Create a new document

Select:

  • Resource: Document
  • Operation: Create
  • Name: document name
  • Category: category ID or category selected in the node
  • Optional fields: content/details, source, SKU, tags, status, attachments, or relations

The workflow creates a new Knowledge Base entity/document.

Update an existing document

Select:

  • Resource: Document
  • Operation: Update
  • ID: document/entity ID
  • At least one field to update, such as name, content/details, source, SKU, tags, status, attachments, or relations

The workflow updates that existing Knowledge Base entity.

Retrieve a strict source document

Select:

  • Resource: Document
  • Operation: Get Many
  • Category Names or IDs: a folder like instruction manuals or support policies
  • Search: an exact product or topic phrase

This is the best setup when the answer should come from a known document family and not from broad semantic search.

Build one prompt from many documents

Select:

  • Resource: Document
  • Operation: Get All Documents
  • Merge Documents: enabled

This produces one combined body of content that can be sent into an LLM or stored as a downstream artifact.

Select:

  • Resource: Document
  • Operation: Get Related Entities
  • ID: source entity ID
  • Additional Fields → Type: optional relationship type

This is useful for recommendation, upsell, troubleshooting, or related-document flows.

Create or update a category

For a new category, select Category → Create and fill the required category fields. For an existing category, select Category → Update, pass the category ID, and set at least one field to update.

API concepts behind the node

The node maps to the public Knowledge Base API:

  • /knowledge-base/entities and related entity routes for Document operations
  • /knowledge-base/categories and related category routes for Category operations
  • /knowledge-base/attachments for image/attachment retrieval
  • /company/info for company context

Knowledge Base vs RAG

Use this node when you know what should be fetched or changed. Use AgentBrains RAG when the agent only knows the user intent and must semantically search across an index first.

On this page