npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-agent-knowledge-block

v1.0.0

Published

A read-only static knowledge block that can be used as a tool by n8n AI Agents.

Downloads

19

Readme

n8n-nodes-agent-knowledge-block

Agent Knowledge Block is a read-only n8n Community Node for storing static knowledge, rules, policies, prices, booking instructions, and similar reference text directly in a workflow.

The node works as a normal n8n node and is also marked with usableAsTool: true, so it can be connected to an n8n AI Agent as a Tool. It does not call external APIs, use a database, require credentials, or provide any write, update, or delete operation.

Requirements

  • Node.js 22 or newer
  • A modern n8n version that supports Community Nodes as AI Agent tools

Installation

Install from npm

After the package is published:

npm install n8n-nodes-agent-knowledge-block

You can also install it from Settings > Community Nodes in n8n by entering:

n8n-nodes-agent-knowledge-block

Restart n8n after installation if your deployment does not restart automatically.

Install a local build

From this package directory:

npm install
npm run build
npm pack

Then, in the directory where n8n is installed:

npm install /absolute/path/to/n8n-nodes-agent-knowledge-block-1.0.0.tgz

Restart n8n, then search the node picker for Agent Knowledge Block.

Node Fields

| Field | Purpose | | --- | --- | | Block Name | A short identifier for the knowledge block | | Tool Description | Tells the AI Agent when it should call this tool | | Knowledge Text | The static, read-only text exposed by the node | | Output Mode | Returns either the full text or summary metadata |

Use as a Normal Node

  1. Add Agent Knowledge Block to a workflow.
  2. Connect a preceding node to its main input.
  3. Enter a block name and paste the static content into Knowledge Text.
  4. Choose Full Text or Summary Metadata Only.
  5. Execute the workflow.

The node emits one clean JSON item for each incoming item. It never changes the stored text.

Use as an AI Agent Tool

  1. Add an AI Agent node to the workflow.
  2. Add Agent Knowledge Block from the Agent's Tool connector.
  3. Set Tool Description to clearly explain the topic and when the Agent should read it.
  4. Paste the source material into Knowledge Text.
  5. Keep Output Mode set to Full Text when the Agent needs the content.
  6. Connect the Agent to your preferred chat model and run the workflow.

The toolDescription parameter is used by n8n as the tool description. The Agent receives the knowledge only when it chooses to call the tool.

Recommended AI Agent system message:

Use the Agent Knowledge Block tool when you need to read stored rules, policies, prices, booking instructions, or any static knowledge. Do not guess if the answer should come from the knowledge block.

Example Output

With Output Mode set to Full Text:

{
  "blockName": "booking_policy",
  "knowledgeText": "Bookings may be rescheduled up to 24 hours before arrival.",
  "characterCount": 58,
  "wordCount": 10,
  "source": "agent_knowledge_block",
  "readOnly": true
}

With Output Mode set to Summary Metadata Only:

{
  "blockName": "booking_policy",
  "characterCount": 58,
  "wordCount": 10,
  "source": "agent_knowledge_block",
  "readOnly": true,
  "message": "Knowledge block exists and is available for reading."
}

When Knowledge Text is empty:

{
  "blockName": "booking_policy",
  "knowledgeText": "",
  "characterCount": 0,
  "wordCount": 0,
  "source": "agent_knowledge_block",
  "readOnly": true,
  "warning": "Knowledge Text is empty."
}

Token Usage

Using the node as a Tool can reduce the size of the Agent's main system prompt. The knowledge text is sent to the Agent only when the Agent calls the tool, instead of being included in every request. Tool results still consume model context tokens when called, and very large blocks must fit within the selected model's context window.

Development

Install dependencies:

npm install

Build:

npm run build

Lint:

npm run lint

Run tests:

npm test

Start n8n with the local node development loader:

npm run dev

The development command prints the local n8n URL and rebuilds the node while files change.

Security and Data Handling

  • No credentials are defined or required.
  • No network requests are made.
  • No database is used.
  • No secrets or API keys are included.
  • No create, update, overwrite, or delete operation exists.
  • Anyone who can view or export the workflow can view the stored knowledge text, so do not use this node as a secret store.

License

MIT