Skip to main content
Knowledge bases hold documents that are chunked and embedded so agents can retrieve grounded context.

How it works

  1. Create a knowledge base.
  2. Add documents (title + text). Each document is chunked (~1000 chars) and every chunk is embedded.
  3. Retrieval runs a cosine-similarity search over the chunks with pgvector.
Embeddings are produced by a self-hosted embedder (bge-small-en-v1.5, 384-dim), so no external embeddings key is required.

From the CLI

From an agent

Add a tool with the built-in key knowledge_search and reference it from an agent node. At run time the agent calls knowledge_search(query), which embeds the query and returns the top matching chunks for the model to answer from.

API

  • POST /v1/knowledge - create a base
  • POST /v1/knowledge/{kb}/documents - ingest a document
  • POST /v1/knowledge/search - search chunks
See the API overview.