﻿---
title: Use an AI index
description: Learn how to retrieve context from an AI index through the Context Engine APIs, tools, and supported integrations.
url: https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/use-an-ai-index
products:
  - Elastic Documentation
  - Elastic Observability
  - Elastic Security
  - Elasticsearch
  - Kibana
applies_to:
  - Elastic Cloud Serverless: Experimental
  - Elastic Stack: Planned
---

# Use an AI index
<important>
  This page is currently hidden from the documentation navigation.The following Context Engine pages are live:
  - [Landing page](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine)
    - [Context Engine quickstart](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/quickstart)
  - [Context Engine concepts](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/concepts)
  - [Build and maintain an AI index](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/build-and-maintain-ai-index)
    - [Create and manage AI indices](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/create-and-manage-ai-indices)
  - [Add and manage sources](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/add-and-manage-sources)
  - [Create and manage automations](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/create-and-manage-automations)
  - [Evaluate and improve KIs](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/evaluate-and-improve-knowledge-indicators)
  - [Use an AI index](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/use-an-ai-index)
    - [Retrieve context](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/retrieve-context-from-ai-index)
  - [Configure agents to use an AI index](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/use-context-engine-with-agents)
    - [Use Context Engine with Agent Builder](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/use-context-engine-with-agent-builder)
  - [Query AI indices from LangChain](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/langchain-integration)
  - [Context Engine APIs](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/context-engine-api)
</important>

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.

## Query and integration options

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](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/retrieve-context-from-ai-index)                    |
| Configure and test an agent that uses an AI index              | [Configure agents to use an AI index](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/use-context-engine-with-agents)                  |
| Use an AI index with an Elastic Agent Builder agent            | [Use Context Engine with Elastic Agent Builder](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/use-context-engine-with-agent-builder) |
| Query an AI index from LangChain or LangGraph                  | [Query AI indices from LangChain](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/langchain-integration)                               |


## How retrieval works

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](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/retrieve-context-from-ai-index).

## Related pages

The following pages provide reference and maintenance guidance:
- [Context Engine APIs](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/context-engine-api) lists the available operations and links to their complete Kibana API reference.
- [Evaluate and improve Knowledge Indicators](https://www.elastic.co/elastic/docs-builder/docs/4384/explore-analyze/ai-features/context-engine/evaluate-and-improve-knowledge-indicators) explains how to test retrieved context and improve its automations.