跳到主要内容
版本:最新版

Data and Storage

Semantic Router can run without an external vector database, but several optional capabilities persist or share data. Choose stores by capability, durability, scale, and data-handling policy rather than by product name alone.

What may be stored

CapabilityTypical dataWhy it is stored
Response cacheRequest representation and prior responseReuse a previous answer for an equivalent request.
Agentic memoryEmbedded memories and metadataRetrieve relevant information across turns or sessions.
Vector storeDocuments, chunks, embeddings, and file metadataSupport retrieval and uploaded knowledge.
Router ReplayRoute metadata and, when enabled, bounded request and response bodiesInspect and evaluate routing behavior.
Response APIRecent response recordsRetrieve generated responses through the management surface.

These stores have different privacy and retention implications. A local model route is not end-to-end private if its prompts or responses are written to an unapproved shared store.

Available guides

Valkey

Valkey Agentic Memory describes a Redis-compatible, single-service option with vector search. It is useful for smaller deployments or teams that already operate Valkey.

Qdrant

Qdrant covers Docker and Kubernetes deployment plus Router bindings. It can back semantic cache, memory, vector-store, and replay configurations.

Milvus

Milvus covers persistent vector storage, Kubernetes deployment, monitoring, migration, and recovery. It is suited to larger or shared vector collections, but has more operational dependencies than a single-service store.

In-memory stores

In-memory backends are useful for local experiments and short-lived caches. They do not provide restart durability or cross-replica sharing. Do not infer that ephemeral means insensitive: content remains readable within the running process and may still appear in logs or diagnostics.

Selection questions

Before enabling a store, decide:

  1. Which Router capability will use it?
  2. Must data survive a Router restart?
  3. Must several Router replicas share the same state?
  4. What request or response content can be captured?
  5. What are the retention, deletion, encryption, and access requirements?
  6. Who backs up and restores the service?

Then configure the shared store under global.stores or the relevant service block, and enable only the route plugins that need it. See Stores and Tools for the canonical configuration surface.