LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangGraph
  • Web
  • Channels
  • Pregel
  • Prebuilt
  • Remote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
  • Ui
  • Client
  • Auth
  • React
  • Logging
  • React Ui
  • Utils
  • Server
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
  • Store
LangGraph Checkpoint Redis
  • Shallow
  • Store
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
  • Cli
LangGraph API
LangGraph CLI
LangGraph CUA
  • Utils
LangGraph Supervisor
LangGraph Swarm
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangGraph
WebChannelsPregelPrebuiltRemote
React SDK
Vue SDK
Svelte SDK
Angular SDK
LangGraph SDK
UiClientAuthReactLoggingReact UiUtilsServer
LangGraph Checkpoint
LangGraph Checkpoint MongoDB
LangGraph Checkpoint Postgres
Store
LangGraph Checkpoint Redis
ShallowStore
LangGraph Checkpoint SQLite
LangGraph Checkpoint Validation
Cli
LangGraph API
LangGraph CLI
LangGraph CUA
Utils
LangGraph Supervisor
LangGraph Swarm
Language
Theme
JavaScript@langchain/langgraph-checkpoint-mongodbIndexConfig
Type●Since v0.0

IndexConfig

Copy
IndexConfig

Properties

View source on GitHub
property
dims: number
property
embeddingKey: string
property
filters: string[]
property
modality: string
property
model: string
property
name: string
property
path: string
property
similarityFunction: "cosine" | "euclidean" | "dotProduct"

Configuration for MongoDB vector search index.

Two modes depending on whether embeddings is provided on the store:

Manual embedding — embeddings is set on MongoDBStoreParams. The store computes vectors via embedDocuments() / embedQuery() and stores float arrays in the embedding field. Requires dims and similarityFunction.

Auto embedding — no embeddings on MongoDBStoreParams. MongoDB generates embeddings server-side via Voyage AI using the configured model. The store does not write an embedding field — MongoDB reads the source text directly from the field specified by path (e.g. "value.content"). Requires model and path.

Embedding dimensionality. Required for manual embedding so that the vector search index can be created with the correct number of dimensions. Not required for auto embedding, where the model determines dimensionality.

Sub-field of value to embed (e.g. "content"). If omitted, the entire value object is serialized and embedded.

Additional filter fields to declare in the vector search index.

Modality for auto embedding (default: "text").

Voyage AI model name for auto embedding (e.g. "voyage-4", "voyage-4-lite", "voyage-4-large", "voyage-code-3"). Required for auto embedding. MongoDB uses this model to generate embeddings server-side.

Vector search index name

Field path used in the $vectorSearch stage and vector search index definition.

  • For manual embedding: the field where the store writes computed vectors. Defaults to "embedding".
  • For auto embedding: the field containing the source text that MongoDB will embed server-side (e.g. "value.content"). Required for auto embedding.

Similarity function (default: "cosine"). Required for manual embedding.