langchain-elasticsearch
An integration package connecting Elasticsearch and LangChain
Decision gist · record as of 2026-08-14
Yes. The package has low install friction, active maintenance, permissive MIT licensing, no known vulnerabilities, and fills a clear integration gap for LangChain users who need Elasticsearch-backed storage and caching. Install it if you are building a LangChain application that requires persistent vector storage, retrieval, or LLM/embedding caching with Elasticsearch.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running Elasticsearch deployment (Elastic Cloud or Docker); you must provide valid Elasticsearch credentials (Cloud ID and API key or es_url).
- Low friction install with only two runtime dependencies (elasticsearch and langchain-core).
- The package is actively maintained with a recent commit on 2026-06-26 and has been in active development since 2024-02-27.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
last release 2025-12-16 (241 days) · last repo commit 2026-06-26 · 77 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 352,711 downloads/mo, #7,311 on PyPI
Alternatives
Verify before relying
pip install langchain-elasticsearch
from langchain_elasticsearch import ElasticsearchStore
vectorstore = ElasticsearchStore(
es_cloud_id="your-cloud-id",
es_api_key="your-api-key",
index_name="your-index-name",
embeddings=embeddings,
)- Whether ElasticsearchStore, ElasticsearchRetriever, and ElasticsearchEmbeddings support all LangChain vector store and retriever interfaces.
- Performance characteristics and scalability limits for large-scale embedding and retrieval workloads.
- Compatibility matrix with specific Elasticsearch server versions.
What it is and what it does
langchain-elasticsearch is a LangChain integration package that bridges Elasticsearch and LangChain applications. It provides multiple components: ElasticsearchStore for vector storage and similarity search, ElasticsearchRetriever for custom query logic, ElasticsearchEmbeddings for generating embeddings using Elasticsearch-deployed models, ElasticsearchChatMessageHistory for persisting conversation state, and caching layers (ElasticsearchCache and ElasticsearchEmbeddingsCache) for reducing LLM and embedding costs.
The package depends on elasticsearch and langchain-core as its runtime dependencies. It supports Python 3.10 through 3.12 and is designed for developers building LangChain applications that need persistent, searchable storage and caching backed by Elasticsearch. Setup requires either an Elastic Cloud deployment or a self-hosted Elasticsearch instance with appropriate credentials.
Use it for
- Store and retrieve document embeddings in Elasticsearch for semantic search within a LangChain application.
- Implement custom retrieval logic using ElasticsearchRetriever with fuzzy matching or other advanced Elasticsearch queries.
- Cache LLM responses in Elasticsearch to reduce API costs and latency for repeated queries.
- Persist chat conversation history across sessions using Elasticsearch as the backend store.
- Generate embeddings on-demand using models deployed within an Elasticsearch cluster.
- Cache embedding computations to avoid recomputing vectors for identical inputs.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package has low install friction, active maintenance, permissive MIT licensing, no known vulnerabilities, and fills a clear integration gap for LangChain users who need Elasticsearch-backed storage and caching. Install it if you are building a LangChain application that requires persistent vector storage, retrieval, or LLM/embedding caching with Elasticsearch.
Install
langchain-elasticsearch on PyPI
Before you install
Low friction install with only two runtime dependencies (elasticsearch and langchain-core). The package is actively maintained with a recent commit on 2026-06-26 and has been in active development since 2024-02-27.
Requires a running Elasticsearch deployment (Elastic Cloud or Docker); you must provide valid Elasticsearch credentials (Cloud ID and API key or es_url).
License in practice
MIT license permits commercial and private use with minimal restrictions; you may use, modify, and distribute this package freely provided you include the license notice.
Quickstart
pip install langchain-elasticsearch
from langchain_elasticsearch import ElasticsearchStore
vectorstore = ElasticsearchStore(
es_cloud_id="your-cloud-id",
es_api_key="your-api-key",
index_name="your-index-name",
embeddings=embeddings,
)
Verify before relying
- Whether ElasticsearchStore, ElasticsearchRetriever, and ElasticsearchEmbeddings support all LangChain vector store and retriever interfaces.
- Performance characteristics and scalability limits for large-scale embedding and retrieval workloads.
- Compatibility matrix with specific Elasticsearch server versions.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release <4.0,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packageselasticsearchlangchain-core |
| Maintenance | Actively maintained 241 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 352,711 / month, #7,311 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12 |
Evidence: langchain_elasticsearch-1.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “elasticsearch langchain integration”
- langchain-elasticsearchIntegrates Elasticsearch with LangChain to provide vector storage,…
- apache-airflow-providers-elasticsearchIntegrates Elasticsearch with Apache Airflow, providing operators,…
- CMRESHandlerProvides a Python logging handler that sends log records directly to…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also langchain-mongodb · langchain-redis · langchain-weaviate · langchain-baseten · langchain-pinecone · langchain-plaid · langchain-milvus · langchain-qdrant · llama-index-embeddings-langchain · ragstack-ai-knowledge-store