Use an AI index

Use an AI index to retrieve reusable context generated from source data. Applications can call the Context Engine APIs directly. Agents call the same operations through tools that their integration provides, such as the built-in Elastic Agent Builder tools or LangChain tools that wrap the APIs. These paths reduce repeated source data discovery and interpretation.

Use the following guides to retrieve context through an agent or application:

Goal Start here
Retrieve context directly or compare the available query modes Retrieve context from an AI index
Configure and test an agent that uses an AI index Configure agents to use an AI index
Use an AI index with an Elastic Agent Builder agent Use Context Engine with Elastic Agent Builder
Query an AI index from LangChain or LangGraph Query AI indices from LangChain

Each supported access path lists the AI indices available to the caller, describes the relevant AI index, and queries it for Knowledge Indicators (KIs). This discovery-first flow provides the correct backing index, field names, and available context instead of requiring the agent or application to guess them. For the complete workflow, refer to Retrieve context from an AI index.

The following pages provide reference and maintenance guidance: