---
title: Local Knowledge
description: Connect one of your on-device knowledge bases to an AI agent or the Indexer
---

Connect one of your on-device knowledge bases to an AI agent or the Indexer.

## What it does

Local Knowledge is not a step on its own: it has no output port and never runs by itself. You plug it into the **Knowledge** slot of another node, and that node uses the [knowledge base](/app/knowledge-bases/overview/) you pick here.

* On a [RAG Agent](/nodes/builtin/ai/aiagents/ragnode/), [Q\&A Agent](/nodes/builtin/ai/aiagents/qanode/) or [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/), the agent searches the knowledge base for passages and answers from them.
* On an [Indexer](/nodes/builtin/ai/aiagents/indexernode/), new text is written into the knowledge base.

Everything is stored and searched in your browser. If the chosen knowledge base does not exist on this device, the run stops with an error instead of quietly finding nothing.

## When to use it

* Answer questions from your own documents, notes or saved pages with an agent.
* Fill a knowledge base from a workflow, for example with pages loaded on a schedule.
* To add documents by hand instead, use the [knowledge bases page](/app/knowledge-bases/overview/#add-sources); no workflow is needed.

## Inputs and settings

The picker shows, for each knowledge base:

* its number of passages and the embedding model it was built with;
* its privacy badge, **Cloud OK** or **Device only** (see [Privacy](/app/knowledge-bases/overview/#privacy-cloud-ok-or-device-only));
* whether it is **empty** or still **indexing** (with a percentage).

Use **New knowledge base** to create one without leaving the canvas, and **Open selected** to open the chosen knowledge base's page.

How the agent searches (number of passages, most similar or diverse, keywords and meaning, minimum relevance, metadata filter, device-only behaviour) is set on the agent node, not here. See [RAG Agent](/nodes/builtin/ai/aiagents/ragnode/).

## Outputs

This node has no output port. It plugs into a slot on another node instead of passing items along.

* **Knowledge** slot of [Tools Agent](/nodes/builtin/ai/aiagents/toolsagentnode/), [Q\&A Agent](/nodes/builtin/ai/aiagents/qanode/), [RAG Agent](/nodes/builtin/ai/aiagents/ragnode/), [Indexer](/nodes/builtin/ai/aiagents/indexernode/)

The passages found show up on the agent's output, for example in `sources` on the Q\&A Agent.

## Dependencies and credentials

**Embeddings** is optional. A knowledge base that already has content is always searched with its own model, so you only need it to choose the model of a new, empty knowledge base. See below.

## Embedding models

Each knowledge base **remembers the embedding model it was built with**, and is always searched and filled with that model. Vectors from different models can't be compared, so they are never mixed.

* **New knowledge bases** use the on-device **all-MiniLM-L6-v2** model, unless another embeddings node is connected on the first run. That model is then recorded on the knowledge base.
* **Older knowledge bases** (created before they remembered their model) keep the **Universal Sentence Encoder** they were built with, so existing results stay correct.
* **Mismatched embeddings**: when the connected Embeddings node is a different model than the knowledge base's, the node settings show a callout before you run, because the connected embeddings won't be used. Choose:

  * **Disconnect it**: removes the connection; the knowledge base keeps its own model.
  * **Re-embed with …**: opens the knowledge base's settings to [move it to the connected model](/app/knowledge-bases/overview/#change-the-search-engine-re-embed).

  If you run anyway, the knowledge base's own model is used and the run log has a warning.

If a knowledge base was built with a cloud embeddings node (for example [OpenAI](/nodes/builtin/ai/aidependencies/embeddings/openai/)), connect that same node, or re-embed it with an on-device model.

## Example workflow

1. [Get Selected Text](/nodes/extension/getselectedtext/) reads a question you highlighted, with **Output field name** `text`.
2. [Q\&A Agent](/nodes/builtin/ai/aiagents/qanode/) with **Prompt** `{{ $input.text }}` and an [OpenAI](/nodes/builtin/ai/aidependencies/llm/openai/) model on its **Model** slot.
3. Local Knowledge connected to the Q\&A Agent's **Knowledge** slot, with **Knowledge base** set to `Product handbook`.
4. [Display Markdown](/nodes/extension/displaymarkdown/) with **Content** `{{ $input.response }}`.

To fill the same knowledge base from a workflow, connect another Local Knowledge node to the **Knowledge** slot of an [Indexer](/nodes/builtin/ai/aiagents/indexernode/).

## Common issues

* **"Knowledge parameter is required".** No knowledge base is picked. Choose one in **Knowledge base**.
* **"Knowledge base "…" doesn't exist on this device…".** The knowledge base was deleted, or the workflow comes from another device or browser. Pick a knowledge base in this node, or [import the knowledge base file (.awkb)](/app/knowledge-bases/export-import-backup/#import-a-file) first. When you import a workflow, AWFlow offers to [map its knowledge bases](/app/knowledge-bases/export-import-backup/#importing-a-workflow-that-uses-knowledge-bases).
* **"Model mismatch" warning in the run log.** The connected embeddings differ from the knowledge base's model, so its own model was used. Disconnect the embeddings or re-embed the knowledge base.
* **"… was built with … embeddings. Connect that embeddings node to use it."** The knowledge base uses a cloud embeddings model. Connect it, or re-embed on this device.
* **"… is on this device only, but … is a cloud model."** The knowledge base is **Device only** and the agent uses a cloud model. Use an on-device model, change the knowledge base's privacy, or set the agent's **Device-only knowledge with a cloud model** option to **Answer without it**.

## Related nodes

* [Indexer](/nodes/builtin/ai/aiagents/indexernode/): write text into a knowledge base.
* [RAG Agent](/nodes/builtin/ai/aiagents/ragnode/) and [Q\&A Agent](/nodes/builtin/ai/aiagents/qanode/): answer from a knowledge base.
* [Local Embeddings](/nodes/builtin/ai/aidependencies/embeddings/localembeddings/): an on-device embedding model.