Skip to main content
The local backend stores knowledge in an in-memory vector index from LlamaIndex. Knowledge text is embedded by an embedding model, written to an in-process vector index, and retrieved by similarity. It requires no external service, is the default backend for KnowledgeBase, and is ideal for local debugging and quick validation.
Data lives only in process memory and is lost when the program exits. Use a persistent backend in production.

When to use

  • Local debugging, teaching, or quickly validating a RAG flow;
  • No external vector store required — only an embedding model.

Dependencies

Usage

You can also pass embedding config explicitly via backend_config:

Parameters

Constructor parameters

backend_config supports the following settings:

Embedding config

embedding_config is an EmbeddingModelConfig with env prefix MODEL_EMBEDDING_:

Environment variables

The local backend depends only on an embedding model and requires no database connection config. Text is automatically split into chunks by file type before embedding.
Last modified on September 19, 2026