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.
| Resource | What it maps to | Available operations |
|---|---|---|
| Document | Knowledge Base entities/documents | Create, Get, Get Many, Get Related Entities, Get by Category Type, Get All Documents, Update |
| Category | Knowledge Base categories | Create, Get, Get Many, Get by Type, Update |
| Images | Attachments and media linked to entities | Get Many, Get |
| Company Data | High-level company profile fields | Direct 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.
| Operation | Use it for | Required fields | Optional fields and filters |
|---|---|---|---|
| Create | Create a new Knowledge Base entity/document. | document name and category fields shown by the node | content/details, source, SKU, tags, status, attachments, relations |
| Get | Retrieve one document/entity. | document/entity ID | field selection and filters shown by the node |
| Get Many | List matching documents/entities. | none | category IDs, search, recursive, fields, SKU, source, tags |
| Get Related Entities | Retrieve entities related to one source entity. | document/entity ID | relationship type |
| Get by Category Type | Query documents by category alias/type. | category type selected in the node | fields, search, SKU, source, tags |
| Get All Documents | Retrieve all available documents, optionally merged. | none | merge documents and filtering fields shown by the node |
| Update | Update an existing document/entity by ID. | document/entity ID | at 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.
| Operation | Use it for | Required fields | Optional fields and filters |
|---|---|---|---|
| Create | Create a new category. | name, description, category type/alias, and policy fields shown by the node | parent category and permissions if exposed by the node |
| Get | Retrieve one category. | category ID or key field shown by the node | recursive/details options shown by the node |
| Get Many | List matching categories. | none | category alias, policy, parent, search, fields, extended |
| Get by Type | List categories by category type/alias. | category type selected in the node | filters shown by the node |
| Update | Update an existing category by ID. | category ID | at 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
| Parameter | Used in | Description |
|---|---|---|
| ID | Get | Fetch a single attachment by ID. |
| Additional Fields | Get Many | Restrict the response fields for image records. |
Output behavior
The node returns slightly different shapes depending on the operation:
| Operation type | Output shape |
|---|---|
| Single record operations | A normal object for the document, category, image, or company data |
| List operations | An object with an items array or the list shape returned by the API |
| Get All Documents with Merge Documents enabled | A single object with mergedContent and documentCount |
| Create/Update operations | The 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.
Find all related items
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/entitiesand related entity routes for Document operations/knowledge-base/categoriesand related category routes for Category operations/knowledge-base/attachmentsfor image/attachment retrieval/company/infofor 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.