Repository navigation
docs: document the discover-data-analysis Agent Builder skill (#6684) - #6715
Merged
Merged
Conversation
Add a new "Analyze your data with AI" section to the Discover get-started page covering the discover-data-analysis skill, its ES|QL-only scope, auto-launch behavior, and the shape-specific guidance derived from the active context-aware profile (logs, metrics, traces). Register the skill in the Agent Builder built-in skills reference under Platform skills. Co-authored-by: Cursor <[email protected]>
Contributor
Elastic Docs AI PR menuCheck the box to run an AI review for this pull request.
Powered by GitHub Agentic Workflows and docs-actions. For more information, reach out to the docs team. |
Contributor
Contributor
✅ Elastic Docs Style Checker (Vale)No issues found on modified lines! The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale. |
Co-authored-by: Cursor <[email protected]>
stratoula
approved these changes
May 29, 2026
stratoula
left a comment
Contributor
There was a problem hiding this comment.
Thank you for adding this to the docs! It is not easily discoverable!
leemthompo
approved these changes
Jun 8, 2026
florent-leborgne
added a commit
that referenced
this pull request
Jun 19, 2026
…e and Discover AI analysis Now that #6715 has merged, add the deferred cross-links: the editor AI assistance section links to the Discover "Analyze your data with AI" feature, and that section links back to the editor AI assistance. Co-authored-by: Cursor <[email protected]>
florent-leborgne
added a commit
that referenced
this pull request
Jun 22, 2026
## Summary
Documents the AI-assisted authoring features in the {{esql}} editor
(preview in 9.5.0 and on Elastic Cloud Serverless) and consolidates all
LLM-backed query generation on the page into one coherent section.
### `explore-analyze/query-filter/languages/esql-kibana.md`
- Adds a top-level **Write and fix queries with AI** section
(`#esql-kibana-ai-assistance`, `preview 9.5+`) that groups every
LLM-backed entry point, with a scope-based orientation (whole query vs.
a single pipe vs. fixing errors) and a single shared requirements block
(Enterprise license + LLM connector). It has three subsections:
- **Generate a full query from natural language**
(`#esql-kibana-quick-search-nl`) — the search bar's natural-language
mode, moved here from the old search-bar section so all AI generation
lives together (anchor preserved).
- **Generate {{esql}} from a comment** (`#esql-kibana-ai-comment`,
closes #6552) — entry point, the order to follow (describe in a `//`
comment first, then press {kbd}`cmd+J`), in-editor hints, placeholder,
generating indicator, and **Keep** / **Undo** / **Replace** review
actions, with a screenshot.
- **Fix query errors with AI** (`#esql-kibana-ai-fix`, closes #6681) —
the **✨ Fix with AI** hover link and the **Replace** / **Undo** review
actions, with screenshots of the entry point and the proposed-fix review
state.
- Refocuses the former "Build queries with KQL or natural language"
section on KQL (now **Build ES|QL queries from KQL syntax**,
`#esql-kibana-quick-search`), flattening the KQL procedure and linking
out to the natural-language generator in the AI section.
- Adds a `cmd+J` / `ctrl+J` row to the **Keyboard shortcuts** table
(tagged `preview 9.5+`), pointing at the comment subsection.
- Adds a mini-TOC of the **Editor tools** subsections and explicit
heading anchors.
- Updates the page frontmatter `description` to mention AI assistance.
- In-editor hints are described in plain terms rather than quoting the
exact UI strings, which are still being refined upstream (see note
below).
### `explore-analyze/discover/discover-get-started.md`
- Adds a cross-link from Discover's **Analyze your data with AI**
section to the editor's AI assistance, completing the bidirectional link
with #6715. Together the two PRs cover the full AI-in-{{esql}} story:
this PR helps you write or fix the query, #6715 helps you analyze the
results.
## Source verification
All UI strings, shortcuts, and prerequisites verified at HEAD on
`elastic/kibana`, and confirmed against screenshots from a running
instance:
- Ghost hints —
`src/platform/packages/private/kbn-esql-editor/src/comment_to_esql/use_ghost_line_hint.ts`
- Generating indicator —
`src/platform/packages/private/kbn-esql-editor/src/editor_ai.styles.ts`
- Comment-flow review buttons (**Keep** / **Undo**, with **Keep** →
**Replace** in rewrite mode) —
`src/platform/packages/private/kbn-esql-editor/src/comment_to_esql/review_actions_widget.ts`
and `use_comment_to_esql.ts`
- Fix-flow review widget renders **Replace** / **Undo** (⌘⇧↵ / ⌘⇧⌫).
Note: `use_suggest_fix.ts` defines `Keep AI fix` / `Undo AI fix`, but
those are command-palette action labels; the visible buttons are the
shared review widget's **Replace** / **Undo**, as confirmed by
screenshot.
- **✨ Fix with AI** hover link —
`src/platform/packages/shared/kbn-monaco/src/languages/esql/lib/providers/hover_provider.ts`
- Enterprise license + LLM connector gate (shared by all features) —
`src/platform/packages/private/kbn-esql-editor/src/hooks/use_nl_to_esql_check.ts`
- ⌘+J / Ctrl+J keyboard shortcut —
`src/platform/packages/private/kbn-esql-editor/src/editor_footer/keyboard_shortcuts.tsx`
Reference PRs in `elastic/kibana`:
- elastic/kibana#256857 — `[ES|QL] Code completion driven by AI`
- elastic/kibana#269455 — `[ES|QL] Fixes with AI`
> **Related:** A follow-up Kibana PR (elastic/kibana#274210) rewords the
editor placeholder and the in-editor hints to make the "describe first,
then press ⌘+J" order clearer. This page intentionally paraphrases those
hints rather than quoting them, so it stays accurate regardless of the
exact final wording.
## Resolves
Closes #6552
Closes #6681
---
> **AI-generated draft** — created with Claude Opus 4.7.
> Review all generated content for factual accuracy before merging.
---------
Co-authored-by: Cursor <[email protected]>
Co-authored-by: Liam Thompson <[email protected]>
Co-authored-by: Arianna Laudazzi <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR addresses #6684 with the following changes:
explore-analyze/discover/discover-get-started.md: Add a new## Analyze your data with AIsection covering thediscover-data-analysisskill, the {{esql}}-only scope, the auto-attached query context, and the shape-specific guidance the agent receives when a context-aware profile (logs, metrics, traces) is active. Add a one-line pointer in the existing "Context-aware data exploration" section so readers landing there discover that the active profile also tailors AI deep analysis.explore-analyze/ai-features/agent-builder/builtin-skills-reference.md: Adddiscover-data-analysisto the Platform skills list with its assigned tools and the activation note, cross-linked to the new Discover section.explore-analyze/discover/try-esql.md: Add a one-line tip after "Refine an ES|QL query by interacting with the results table" pointing to the new AI deep analysis section, so readers learning ES|QL in Discover discover the feature too.Sibling PRs incorporated
The issue links elastic/kibana#267454 (context-aware playbook contributions). Triangulating against the implementation file at HEAD surfaced two additional sibling PRs that materially affect the user-facing behavior:
discover-data-analysisskill (9.5.0).Related work
This PR is complementary to #6714, which documents AI assistance inside the {{esql}} editor (generating {{esql}} from a
//comment withcmd+J, and the ✨ Fix with AI action on validation errors). Together the two PRs cover the full AI-in-{{esql}} story: #6714 helps you write or fix the query, this PR helps you analyze the results.The two PRs introduce new anchors that don't exist on main yet, so bidirectional cross-links between them are deferred. Whichever PR merges second should add the cross-link in a small follow-up commit before merge.
Resolves
Closes #6684