[ML] Agent Builder: Opt-in flow#244532
Conversation
e observable with Chat Experience setting
687127d to
451ce43
Compare
451ce43 to
5efe4b5
Compare
This reverts commit c756dc5.
(and other ducumentation changes like adding links) There will be a follow-up PR with these changes. |
💚 Build Succeeded
Metrics [docs]Module Count
Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
async chunk count
ESLint disabled line counts
Total ESLint disabled count
History
cc @KodeRad |
…ocumentation (#245749) ## Summary This PR adds a new `Documentation` section to the `GenAI Settings` page for managing the installation of documentation assets like the [Elastic Documentation](https://www.elastic.co/docs/reference/kibana/configuration-reference/ai-assistant-settings) used by the [Product Docs Platform Tool](#242598) and the Security Labs content used by the `security.security_labs_search` tool Design issue: elastic/ai-enhancements#77 <p align="center"> <img width="700" src="https://github.com/user-attachments/assets/46d7805e-5ef1-4213-8ec9-25875a4f039d" /> </p> > [!NOTE] > Security Labs content is not yet served up by the product docs CDN, so it is currently a disabled placeholder until I work #244946 next. We can hide this item for now if that is preferred. ### Implementation notes * The `product_docs` API's are called directly from the client instead of plumbing a new AB API. In support of this, the `llm_product_doc` privilege was added to the `ONECHAT_FEATURE_ID`. If this is not desired, we can remove this addition and plumb a dedicated API. * This UI section should be conditionally visible based on if the Agent Builder experience is enabled/feature is available. ~I need to confirm, but I believe this is coming in #244532 This functionality has been added. * Client hooks for managing product docs were added to `/ai_infra/product_doc_base` instead of `gen_ai_settings`. I originally had them in the setting public code, but figured they made more sense alongside the product docs. Happy to change is there is preference here. * As previously discussed, we're only supporting installing ELSER embeddings at the moment. ~We'll probably want to update the Platform Docs tool do instruct the model to do query re-writing to english in support of this.~ This is done in: #245259 * This uses the same product docs API as the O11y/Security Assistants, so there is no compatibility issues when switching the AB experience on/off or using the old assistants. * RBAC support provided such that documentation management actions are disabled unless the user has `agentBuilder['all']` Kibana feature privileges. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [X] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [X] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) _PR developed with Cursor + Opus 4.5_ --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
## Summary Implements: elastic/ml-team#1755 This PR: - Register a new **AI Chat Experience** setting located in **Stack Management - > GenAI Settings** This setting has two options: **Classic AI Assistant** and **AI Agent** - Adds Feature Flag that shows/hides **AI Chat Experience** setting. - it also controls visibility of the `OnechatNavControl` (AI Agent button) - it can be activated by adding below snippet to the `kibana.dev.yml` ``` feature_flags.overrides: aiAssistant.aiAgents.enabled: true ``` - Add AI Agent card to the Selection modal (that is activated by clicking on AI Assistant button on non-solution page) - Adds shared Confirmation modal. - It appears after the user choose AI Agent (Selection modal / GenAI Settings) - it will be used by at least one other team - reason for it being a shared component - Adds and updates unit tests ### Recording https://github.com/user-attachments/assets/edf0125a-36a9-48f4-89da-8e4d75d67366 ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [x] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Viduni Wickramarachchi <viduni.wickramarachchi@elastic.co>
…ocumentation (elastic#245749) ## Summary This PR adds a new `Documentation` section to the `GenAI Settings` page for managing the installation of documentation assets like the [Elastic Documentation](https://www.elastic.co/docs/reference/kibana/configuration-reference/ai-assistant-settings) used by the [Product Docs Platform Tool](elastic#242598) and the Security Labs content used by the `security.security_labs_search` tool Design issue: elastic/ai-enhancements#77 <p align="center"> <img width="700" src="https://github.com/user-attachments/assets/46d7805e-5ef1-4213-8ec9-25875a4f039d" /> </p> > [!NOTE] > Security Labs content is not yet served up by the product docs CDN, so it is currently a disabled placeholder until I work elastic#244946 next. We can hide this item for now if that is preferred. ### Implementation notes * The `product_docs` API's are called directly from the client instead of plumbing a new AB API. In support of this, the `llm_product_doc` privilege was added to the `ONECHAT_FEATURE_ID`. If this is not desired, we can remove this addition and plumb a dedicated API. * This UI section should be conditionally visible based on if the Agent Builder experience is enabled/feature is available. ~I need to confirm, but I believe this is coming in elastic#244532 This functionality has been added. * Client hooks for managing product docs were added to `/ai_infra/product_doc_base` instead of `gen_ai_settings`. I originally had them in the setting public code, but figured they made more sense alongside the product docs. Happy to change is there is preference here. * As previously discussed, we're only supporting installing ELSER embeddings at the moment. ~We'll probably want to update the Platform Docs tool do instruct the model to do query re-writing to english in support of this.~ This is done in: elastic#245259 * This uses the same product docs API as the O11y/Security Assistants, so there is no compatibility issues when switching the AB experience on/off or using the old assistants. * RBAC support provided such that documentation management actions are disabled unless the user has `agentBuilder['all']` Kibana feature privileges. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [X] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [X] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [X] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) _PR developed with Cursor + Opus 4.5_ --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
…rless and Solution view (#246303) ## Summary Implements: elastic/ml-team#1755 Follow up to: #244532 The goal of this PR is to make Chat Experience in Elasticsearch serverless/solution view default to Agent instead of Classic Assistants. Implementation details: - Serverless is configured via `serverless.es.yml` file - Second argument in `coreStart.settings.client.get$<AIChatExperience>` was removed as it was overriding provided configuration. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ...
…uires all privileges (#246311) ## Summary Implements: elastic/ml-team#1755 Follow up to: #244532 The goal of this PR is to make Chat Experience visible only for users who have all privileges. This is `Agent` and at least one Classic Assistant. - AI Agent card in Selection modal is now disabled based on user's capabilities to manage agents, not only view them - `DocumentationSection` is now displayed only if Chat Experience is present and Agent is chosen To test it you have to activate feature flag in `kibana.dev.yml` ``` feature_flags.overrides: aiAssistant.aiAgents.enabled: true ``` ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ...
…ssistant side bar setting on serverless (#246534) ## Summary Follow up to: #244532 This PR: - Hides AI Assistant side bar setting when Chat Experience is set to Agent - for Elasticsearch Serverless - for Observability Serverless - fixes the issue with AI Assistant button in nav bar on Elasticsearch serverless - it threw `use_agent_builder_opt_in.ts:24 Uncaught TypeError: Cannot read properties of undefined (reading 'onechat')` becasue `onechat` plugin was not available at the time Summarize your PR. If it involves visual changes include a screenshot or gif. ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
|
For now, apply the @nastasha-solomon will check Serverless release notes and 9.3 Kibana release notes when this feature is exposed in Serverless and final 9.3 build. |
## Summary Implements: elastic/ml-team#1755 Follow up to: #244532 The goal of this PR is to: - add missing documentation links - create more space between settings in `GenAI Settings` page - adding `(Beta)` to `AI Agent` drop-down Chat Experience option - update messages - fix: show documentation section to users with only Agent privileges To test it you have to activate feature flag in `kibana.dev.yml` ``` feature_flags.overrides: aiAssistant.aiAgents.enabled: true ``` #### Screenshots <img width="1476" height="1289" alt="Screenshot 2025-12-15 at 10 35 09" src="https://github.com/user-attachments/assets/0bbee106-e95e-42b3-9a1e-400bce228aa4" /> <img width="1472" height="1288" alt="Screenshot 2025-12-15 at 11 27 36" src="https://github.com/user-attachments/assets/70a2febe-c7da-487d-b890-7a7b90db3a7d" /> <img width="793" height="406" alt="Screenshot 2025-12-15 at 10 35 18" src="https://github.com/user-attachments/assets/5f249663-c4fd-40aa-9435-68ae3be4841d" /> <img width="791" height="453" alt="Screenshot 2025-12-15 at 10 33 59" src="https://github.com/user-attachments/assets/8947b697-4b15-4356-8cb9-734a0fc7973d" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md) - [ ] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [ ] If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker) - [ ] This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations. - [ ] [Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed - [ ] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [ ] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ### Identify risks Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss. Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging. - [ ] [See some risk examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) - [ ] ... --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Summary
Implements: https://github.com/elastic/ml-team/issues/1755
This PR:
Register a new AI Chat Experience setting located in Stack Management - > GenAI Settings
This setting has two options: Classic AI Assistant and AI Agent
Adds Feature Flag that shows/hides AI Chat Experience setting.
OnechatNavControl(AI Agent button)kibana.dev.ymlAdd AI Agent card to the Selection modal (that is activated by clicking on AI Assistant button on non-solution page)
Adds shared Confirmation modal.
Adds and updates unit tests
Recording
ai-agent-opt-in-flow.mp4
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.Identify risks
Does this PR introduce any risks? For example, consider risks like hard to test bugs, performance regression, potential of data loss.
Describe the risk, its severity, and mitigation for each identified risk. Invite stakeholders and evaluate how to proceed before merging.