Get an AI Index
Base URL
https://{kibana_url}
Auth
Stack
Planned
The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.
Availability
Planned
We plan to add this functionality in a future Elastic Stack update. Subject to changes.
Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.
This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.
Fetches an AI Index by ID from the current space, including the ES|QL query derived from each trace.
Returns a 404 response when Context Engine is turned off in this space (contextEngine:enabled).
For more information, refer to the Context Engine documentation .
Privileges
contextEngine:read
Expand all
space_id
string
optional
An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.
aiIndexId
string · min length: 1 · max length: 256
required
The unique identifier of the AI Index.
automations
object []
required
Automations associated with the AI Index.
−
Hide 2 properties
type
enum
required
Values:
workflow
value
string
required
The workflow ID.
date_created
string
required
ISO 8601 timestamp of when the AI Index was created.
date_modified
string
required
ISO 8601 timestamp of when the AI Index was last modified.
description
string
Human-readable description of the AI Index.
dest
object
required
The data stream or index that backs the AI Index.
−
Hide 2 properties
type
enum
required
The type of the backing store.
Values:
data_stream
index
value
string
required
The data stream or index the AI Index is attached to.
feedback_analysis
object
The recurring feedback analysis, which reads agent signals and proposes improvement actions for the AI Index.
+
Show 6 properties
agent_id
string
Agent Builder agent ID that runs the analysis.
allowed_actions
enum []
Improvement actions the analysis may propose.
Values:
add_ki
edit_ki
remove_ki
add_workflow
edit_workflow
remove_workflow
add_source
edit_source
remove_source
enabled
boolean
required
Whether the recurring feedback analysis is desired to run.
schedule
object
When the analysis runs.
+
Show 1 property
interval
string
required
How often to analyze, for example 1h.
signal_filter
string
KQL narrowing which signals the analysis reads.
signal_time_range
union anyOf
Any of:
−
Hide 2 properties
type
enum
required
Values:
relative
from
string
required
Date math relative to now, for example now-30d.
−
Hide 2 properties
type
enum
required
Values:
absolute
from
string
required
ISO 8601 date to analyze signals since.
id
string
required
The unique identifier of the AI Index.
managed
boolean
required
Whether the AI Index is managed by a plugin and therefore immutable.
memory_enabled
boolean
required
Whether this AI Index accepts memory writes.
sources
object []
required
Additional sources that provide context for the AI Index.
−
Hide 2 properties
type
enum
required
esql for an ES|QL query, or connector for a data connector.
Values:
esql
connector
value
string
required
An ES|QL query for esql, or a connector ID for connector.
traces
object []
required
Trace sources linked to this AI Index, each with its derived ES|QL query.
−
Hide 3 properties
query
string
required
The ES|QL query derived from this trace source at read time.
type
enum
required
elastic_agent for an Agent Builder agent, index for an index or data stream name or pattern, or esql for an ES|QL query.
Values:
elastic_agent
index
esql
value
string
required
The trace source value.
404
No AI Index with the given ID exists in the current space, or Context Engine is turned off in this space.
application/json
error
string
The HTTP status text.
message
string
required
A human-readable error message.
statusCode
number
The HTTP status code.
Thank you for your feedback.
Base URL
https://{kibana_url}
Examples
Request
Console
1 / 2 languages
‹
›
1
GET kbn:/api/context_engine/ai_index/customer_support
1
2
3
curl \
-X GET "https://${KIBANA_URL}/api/context_engine/ai_index/customer_support" \
-H "Authorization: ApiKey ${API_KEY}"
Response
Example response returning an AI Index by ID
Show more
Context Engine is turned off in this space
Show more
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"automations": [
{
"type": "workflow",
"value": "8f1c2d3e-4b5a-6c7d-8e9f-0a1b2c3d4e5f"
}
],
"date_created": "2026-09-22T12:00:00.000Z",
"date_modified": "2026-09-22T12:00:00.000Z",
"description": "Knowledge about customer support cases.",
"dest": {
"type": "data_stream",
"value": "ai-index-ds-customer-support"
},
"id": "customer_support",
"managed": false,
"memory_enabled": true,
"sources": [
{
"type": "esql",
"value": "FROM support-cases | LIMIT 100"
}
],
"traces": [
{
"query": "FROM traces-agent_builder.otel-default\n| WHERE attributes.gen_ai.agent.id IN (\u0022elastic-ai-agent\u0022)",
"type": "elastic_agent",
"value": "elastic-ai-agent"
}
]
}
1
2
3
4
5
{
"error": "Not Found",
"message": "Not Found",
"statusCode": 404
}