Skip to content

Conversation

@rbrtj
Copy link
Contributor

@rbrtj rbrtj commented Jul 9, 2025

Resolves: #224922
This PR:

  • Introduces a new AI section in Stack Management
  • Moves all AI Assistant management pages out of the Kibana section into the new AI setion.
  • Introduces the genAISettings plugin with a GenAI Settings page under the new AI section to manage generic configurations like connectors and feature visibility.
  • AI Assistants settings now depend on the aiAssistantManagementSelection setting instead of the availability of individual assistants.
  • Enabled read mode for Security and Observability/Search assistant settings based on the setting above ^

It appears that the Assistant settings cannot directly rely on the AI Assistant Settings privilege. There are still ongoing discussions about whether we should remove the AI Assistant Settings privilege or take a different approach. With that in mind, I reverted some changes in this PR to just create a new section and move AI Assistants under it, along with adding the new GenAI Settings page. I left the existing privileges checks as they are, they will be updated once the discussions are resolved.

image

AI Assistants scenarios with different privileges:

  1. Management > AI Assistant Settings - All/Read
    Security Assistant and Observability Assistant - All
image
  1. Management > AI Assistant Settings - All/Read,
    Security Assistant and Observability Assistant - none
image
  1. Management > AI Assistant Settings - None
image
  1. No Enterprise license.
    Currently buggy, will be fixed by [Obs AI Assistant] Remove assistant settings page for basic licenses #230036
image

TBD:

  • Manage Connectors should apply filters, however, the connectors page does not currently save filters in the URL state.
  • In solution views, take the user directly to the individual Assistant settings - I've decided to hold off on this until the ongoing privilege discussions are resolved, as the implementation may vary depending on the outcome.

@rbrtj
Copy link
Contributor Author

rbrtj commented Jul 9, 2025

/ci

rbrtj and others added 20 commits July 10, 2025 16:50
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/streams --include-path /api/fleet --include-path /api/dashboards --include-path /api/saved_objects/_import --include-path /api/saved_objects/_export --include-path /api/maintenance_window --update'
@github-actions
Copy link
Contributor

github-actions bot commented Jul 17, 2025

🔍 Preview links for changed docs

@rbrtj rbrtj added the ci:cloud-deploy Create or update a Cloud deployment label Jul 17, 2025
onClick={() => navigateToApp('management', { path: 'ai/genAiSettings' })}
data-test-subj="genAiSettingsButton"
>
{i18n.GEN_AI_SETTINGS_BUTTON}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to add a check on the GenAI settings button in the o11y / security AI Assistant settings page, and only show it if the user has access to content on the new GenAI settings page i.e. All / None on Connectors and / or ability to manage Spaces.

Currently for a user with a custom role (no ability to manage Spaces) and None for connectors, the link redirects to the Stack Management landing page - not ideal, but not a blocker.

Screen.Recording.2025-08-06.at.15.23.32.mov

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added privilege checks for GenAI Settings button in 39b1bf9
Also improved the GenAI Settings app to require 'All' permissions for Connectors, as having the Manage Connectors button enabled without actually being able to manage them (only view with e.g. Read permission) didn't seem correct.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes in 39b1bf9 work well for users with 'None' for Connectors.

For users with Read on Connectors, I think it could be useful to keep that link so that they can see if they have a Gen AI connector configured. The button text should be 'View connectors' rather than 'Manage connectors' and I'd make a small tweak to the description to say In order to use the AI Assistant you must have a Generative AI connector. Not essential, but I think it would be a nice to have.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in cc08d9e

@rbrtj rbrtj requested a review from peteharverson August 7, 2025 14:06
<p>
<FormattedMessage
id="genAiSettings.aiConnectorDescriptionWithLink"
defaultMessage={`A large language model (LLM) is required to power the AI Assistant and AI-powered features. By default, Elastic uses its {elasticManagedLlm} connector ({link}) when no custom connectors are available. When available, Elastic uses the last used custom connector.${
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some users don't have access to the Elastic Managed LLM.

The current implementation (in main) checks whether the Elastic Managed LLM is available and adjusts the description accordingly.
See

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in 74e1628

@rbrtj rbrtj requested a review from viduni94 August 8, 2025 13:36
Copy link
Contributor

@viduni94 viduni94 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

nit:
Should it be Enable or disable AI-powered features in Space settings?
in the Spaces settings sounds a little odd.

nit:
Also for the button, would Go to Space Settings be more appropriate since we are directing the user to the active space settings page and not to the Spaces page? Before this change we were directing the users to the Spaces page, hence why it said Go to Spaces. I know this must have been the case in the design. But i'll leave it up to you.

Everything else looks good to me. Approved!

Copy link
Member

@dmlemeshko dmlemeshko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x-pack/platform/test/functional/config.base.ts
x-pack/test/functional/config.base.js

changes LGTM

@elasticmachine
Copy link
Contributor

⏳ Build in-progress

  • Buildkite Build
  • Commit: cc08d9e
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-227289-cc08d9ec7ad9

History

cc @rbrtj

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested latest changes and LGTM

@angorayc
Copy link
Contributor

Hi, May I confirm this scenario please?
Here was the Kibana feature I had.
Are we relying on Management > AI Assistant settings to enable the assistant settings or individual settings like Observability > Observability AI Assistant or Security > Elastic AI Assistant?
Screenshot 2025-08-11 at 17 26 07
Screenshot 2025-08-11 at 17 26 16
Screenshot 2025-08-11 at 17 26 28

@rbrtj
Copy link
Contributor Author

rbrtj commented Aug 12, 2025

Hi, May I confirm this scenario please? Here was the Kibana feature I had. Are we relying on Management > AI Assistant settings to enable the assistant settings or individual settings like Observability > Observability AI Assistant or Security > Elastic AI Assistant? Screenshot 2025-08-11 at 17 26 07 Screenshot 2025-08-11 at 17 26 16 Screenshot 2025-08-11 at 17 26 28

Hi!
Management > AI Assistant settings is responsible only for displaying the AI Assistants page. To properly access an assistants settings, you need either Observability > Observability AI Assistant or Security > Elastic AI Assistant. The initial idea was to move these privileges so that the Management > AI Assistant settings would be responsible for all settings (both page itself and individual assistant settings), but we can't do that. The current plan (not yet fully confirmed) for future iterations is to remove Management > AI Assistant settings entirely and derive page availability directly from the Observability and Security assistants settings. Your scenario seems correct

Copy link
Contributor

@angorayc angorayc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for implementing this feature!

@rbrtj rbrtj merged commit 7252237 into elastic:main Aug 12, 2025
13 checks passed
@viduni94
Copy link
Contributor

@rbrtj QQ: Since the default LLM connector selection would happen in the GenAI Settings page, should this be backported to everything 8.18.x onwards?

NicholasPeretti pushed a commit to NicholasPeretti/kibana that referenced this pull request Aug 18, 2025
Resolves: elastic#224922
This PR:
* Introduces a new `AI` section in Stack Management
* Moves all AI Assistant management pages out of the `Kibana` section
into the new `AI` setion.
* Introduces the `genAISettings` plugin with a `GenAI Settings` page
under the new `AI` section to manage generic configurations like
connectors and feature visibility.
* ~~AI Assistants settings now depend on the
`aiAssistantManagementSelection` setting instead of the availability of
individual assistants.~~
* ~~Enabled read mode for Security and Observability/Search assistant
settings based on the setting above ^~~

It appears that the Assistant settings cannot directly rely on the `AI
Assistant Settings` privilege. There are still ongoing discussions about
whether we should remove the `AI Assistant Settings` privilege or take a
different approach. With that in mind, I reverted some changes in this
PR to just create a new section and move `AI Assistants` under it, along
with adding the new `GenAI Settings` page. I left the existing
privileges checks as they are, they will be updated once the discussions
are resolved.

<img width="1477" height="954" alt="image"
src="https://github.com/user-attachments/assets/8b50bcbc-28df-42fa-82c5-5a8c262b2c9f"
/>

### `AI Assistants` scenarios with different privileges:
1. `Management > AI Assistant Settings` - All/Read
`Security Assistant` and `Observability Assistant` - All

<img width="1717" height="1363" alt="image"
src="https://github.com/user-attachments/assets/dcea9c33-4f2d-4ea4-818e-ba6ffaf1a812"
/>


2. `Management > AI Assistant Settings` - All/Read, 
`Security Assistant` and `Observability Assistant` - none

<img width="1716" height="1357" alt="image"
src="https://github.com/user-attachments/assets/6b26e954-e201-475b-bee9-4a7ca20bd120"
/>

3. `Management > AI Assistant Settings` - None

<img width="1719" height="1313" alt="image"
src="https://github.com/user-attachments/assets/9c38ecc1-693b-4c3b-8c09-f227ba539202"
/>

4. No `Enterprise` license.
Currently buggy, will be fixed by
elastic#230036

<img width="1718" height="1356" alt="image"
src="https://github.com/user-attachments/assets/39e07e33-baa3-4eaf-8fa4-c31895605517"
/>





TBD:
- [ ] Manage Connectors should apply filters, however, the connectors
page does not currently save filters in the URL state.
- [ ] In solution views, take the user directly to the individual
Assistant settings - I've decided to hold off on this until the ongoing
privilege discussions are resolved, as the implementation may vary
depending on the outcome.

---------

Co-authored-by: kibanamachine <[email protected]>
qn895 pushed a commit to qn895/kibana that referenced this pull request Aug 26, 2025
Resolves: elastic#224922
This PR:
* Introduces a new `AI` section in Stack Management
* Moves all AI Assistant management pages out of the `Kibana` section
into the new `AI` setion.
* Introduces the `genAISettings` plugin with a `GenAI Settings` page
under the new `AI` section to manage generic configurations like
connectors and feature visibility.
* ~~AI Assistants settings now depend on the
`aiAssistantManagementSelection` setting instead of the availability of
individual assistants.~~
* ~~Enabled read mode for Security and Observability/Search assistant
settings based on the setting above ^~~

It appears that the Assistant settings cannot directly rely on the `AI
Assistant Settings` privilege. There are still ongoing discussions about
whether we should remove the `AI Assistant Settings` privilege or take a
different approach. With that in mind, I reverted some changes in this
PR to just create a new section and move `AI Assistants` under it, along
with adding the new `GenAI Settings` page. I left the existing
privileges checks as they are, they will be updated once the discussions
are resolved.

<img width="1477" height="954" alt="image"
src="https://github.com/user-attachments/assets/8b50bcbc-28df-42fa-82c5-5a8c262b2c9f"
/>

### `AI Assistants` scenarios with different privileges:
1. `Management > AI Assistant Settings` - All/Read
`Security Assistant` and `Observability Assistant` - All

<img width="1717" height="1363" alt="image"
src="https://github.com/user-attachments/assets/dcea9c33-4f2d-4ea4-818e-ba6ffaf1a812"
/>


2. `Management > AI Assistant Settings` - All/Read, 
`Security Assistant` and `Observability Assistant` - none

<img width="1716" height="1357" alt="image"
src="https://github.com/user-attachments/assets/6b26e954-e201-475b-bee9-4a7ca20bd120"
/>

3. `Management > AI Assistant Settings` - None

<img width="1719" height="1313" alt="image"
src="https://github.com/user-attachments/assets/9c38ecc1-693b-4c3b-8c09-f227ba539202"
/>

4. No `Enterprise` license.
Currently buggy, will be fixed by
elastic#230036

<img width="1718" height="1356" alt="image"
src="https://github.com/user-attachments/assets/39e07e33-baa3-4eaf-8fa4-c31895605517"
/>





TBD:
- [ ] Manage Connectors should apply filters, however, the connectors
page does not currently save filters in the URL state.
- [ ] In solution views, take the user directly to the individual
Assistant settings - I've decided to hold off on this until the ongoing
privilege discussions are resolved, as the implementation may vary
depending on the outcome.

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:project-deploy-observability Create an Observability project :ml release_note:feature Makes this part of the condensed release notes Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. Team:AI Infra Platform AppEx AI Infrastructure Team t// Team:ML Team label for ML (also use :ml) t// Team:Obs AI Assistant Observability AI Assistant v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ML] Add an AI settings section into Stack Management