﻿---
title: Context Engine
description: Learn how AI indices, sources, automations, and Knowledge Indicators make context available to agents.
url: https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/8505/explore-analyze/ai-features/context-engine
products:
  - Elastic Documentation
  - Elastic Observability
  - Elastic Security
  - Elasticsearch
  - Kibana
applies_to:
  - Elastic Cloud Serverless: Experimental
  - Elastic Stack: Planned
---

# Context Engine
Context Engine helps you turn enterprise data into reusable context for agents and applications. By investing in useful context up front, you reduce the time and tokens agents spend repeatedly finding and interpreting the same information and help them answer recurring questions more consistently. Because that context is stored as Knowledge Indicators (KIs), you can review and improve it over time.
You organize context around a specific subject or set of questions, generate KIs from relevant data, and make that knowledge available to an agent.

## How Context Engine works

To build and use context with Context Engine:
<stepper>
  <step title="Create an AI index">
    Create an [AI index](/elastic/docs-content/pull/8505/explore-analyze/ai-features/context-engine/concepts#ai-indices) for a defined area of context.
  </step>

  <step title="Add source data">
    Add one or more [sources](/elastic/docs-content/pull/8505/explore-analyze/ai-features/context-engine/concepts#sources) that contain the relevant data.
  </step>

  <step title="Generate Knowledge Indicators">
    Configure [automations](/elastic/docs-content/pull/8505/explore-analyze/ai-features/context-engine/concepts#automations-and-workflows), implemented as [Elastic Workflows](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/8505/explore-analyze/workflows), to generate and refresh [KIs](/elastic/docs-content/pull/8505/explore-analyze/ai-features/context-engine/concepts#knowledge-indicators) from those sources.
  </step>

  <step title="Make the context available">
    Make the AI index available to an [agent or application](/elastic/docs-content/pull/8505/explore-analyze/ai-features/context-engine/concepts#agents-and-applications).
  </step>

  <step title="Configure context retrieval">
    Configure the agent or application with the appropriate [tools and instructions](/elastic/docs-content/pull/8505/explore-analyze/ai-features/context-engine/concepts#tools-system-instructions-and-skills) to retrieve KIs as context and query source data when current detail is required.
  </step>
</stepper>


## Get started with Context Engine

Follow [Get started with Context Engine](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/8505/explore-analyze/ai-features/context-engine/quickstart) to create an AI index from existing Elasticsearch data, generate your first KI, and test how an Elastic Agent Builder agent uses it.

## Context Engine concepts

Learn how AI indices, sources, automations, KIs, and agent access fit together in [Context Engine concepts](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/8505/explore-analyze/ai-features/context-engine/concepts).

## Build and maintain an AI index

Learn how to choose source data, select a KI generation strategy, review automations, and maintain useful context in [Build and maintain an AI index](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/8505/explore-analyze/ai-features/context-engine/build-and-maintain-ai-index).

## Use Context Engine with agents

Learn how to [use Context Engine with agents](https://docs-v3-preview.elastic.dev/elastic/docs-content/pull/8505/explore-analyze/ai-features/context-engine/use-context-engine-with-agents), including Elastic Agent Builder agents and agents built with LangChain.