LangChain and Elasticsearch accelerate time to build AI retrieval agents

Elastic and LangChain are excited to announce the release of a new LangGraph retrieval agent template, designed to simplify the development of Generative AI (GenAI) agentic applications that require agents to use Elasticsearch for agentic retrieval. This template comes pre-configured to use Elasticsearch, allowing developers to build agents with LangChain and Elasticsearch quickly.

To get started right away, access the project on Github: https://github.com/langchain-ai/retrieval-agent-template

What is LangGraph?

LangGraph helps developers build stateful, multi-actor applications with LLMs, used to create agent and multi-agent workflows. There are a few new concepts to learn, like cycles, branching, and persistence – these allow developers to implement loops, conditions, and error handling mechanisms in applications. This makes LangGraph a great choice for creating complex workflows, where agents can pause for user input or correction. For more details you can check the Intro to LangGraph course on LangChain Academy.

The new Retrieval Agent Template focuses on question-answering tasks by leveraging knowledge retrieval with Elasticsearch. Users can set up agents capable of retrieving relevant information based on natural language queries. The template provides an easy, configurable interface to Elasticsearch, making it a great starting point for developers looking to build search retrieval-based agents​. 

About LangGraph’s default Elasticsearch template

Elasticsearch Vector Database Capabilities: The template leverages Elasticsearch’s Vector Storage and Search capabilities to enable more precise and relevant knowledge retrieval. 

Retrieval Agent Capability: This enables an agent to use Retrieval-Augmented Generation (RAG), helping Large Language Models (LLMs) provide more accurate and context-rich answers by retrieving the most relevant information from data stored within Elasticsearch.

Integration with LangGraph Studio: With LangGraph Studio, developers can better understand and build complex agentic applications. It provides intuitive visualization and debugging tools in a user-friendly interface, making it easier to develop, optimize, and troubleshoot AI applications.

Get building

Elastic and LangChain are excited to give developers a headstart building the next generation of intelligent, knowledge-driven AI agents using this template.

Access the retrieval agent template on GitHub, or visit Search Labs for cookbooks using Elasticsearch and LangChain. Happy searching agenting! 

Ready to try this out on your own? Start a free trial.

Elasticsearch has integrations for tools from LangChain, Cohere and more. Join our Beyond RAG Basics webinar to build your next GenAI app!

Recommended Articles
Vertex AI integration with Elasticsearch open inference API brings reranking to your RAG applications
Generative AIVector Database

Vertex AI integration with Elasticsearch open inference API brings reranking to your RAG applications

Google Cloud customers can use Vertex AI embeddings and reranking models with Elasticsearch and take advantage of Vertex AI’s fully-managed, unified AI development platform for building generative AI apps.

Tim Grein

Adding AI summaries to your site with Elastic
How ToGenerative AIVector Database

Adding AI summaries to your site with Elastic

How to add an AI summary box along with the search results to enrich your search experience.

Gustavo Llermaly

Understanding BSI IT Grundschutz: A recipe for GenAI powered search on your (private) PDF treasure
Vector DatabaseGenerative AI

Understanding BSI IT Grundschutz: A recipe for GenAI powered search on your (private) PDF treasure

An easy approach to create embeddings for and apply semantic GenAI powered search (RAG) to documents as part of the BSI IT Grundschutz using Elastic's new semantic_text field type and the Playground in Elastic.

Christine Komander

Unlocking multilingual insights: translating datasets with Python, LangChain, and Vector Database
How ToGenerative AIVector Database

Unlocking multilingual insights: translating datasets with Python, LangChain, and Vector Database

Learn how to translate a dataset from one language to another and use Elastic's vector database capabilities to gain more insights.

Jessica Garson

A tutorial on building local agent using LangGraph, LLaMA3 and Elasticsearch vector store from scratch
How ToGenerative AIVector Database

A tutorial on building local agent using LangGraph, LLaMA3 and Elasticsearch vector store from scratch

This article will provide a detailed tutorial on implementing a local, reliable agent using LangGraph, combining concepts from Adaptive RAG, Corrective RAG, and Self-RAG papers, and integrating Langchain, Elasticsearch Vector Store, Tavily AI for web search, and LLaMA3 via Ollama.

Pratik Rana