Skip to content

[One Workflow] Replace workflows:aiAgent:enabled with agentBuilder:experimentalFeatures#261330

Merged
Kiryous merged 9 commits into
elastic:mainfrom
Kiryous:16652-replace-ai-agent-setting
Apr 7, 2026
Merged

[One Workflow] Replace workflows:aiAgent:enabled with agentBuilder:experimentalFeatures#261330
Kiryous merged 9 commits into
elastic:mainfrom
Kiryous:16652-replace-ai-agent-setting

Conversation

@Kiryous
Copy link
Copy Markdown
Contributor

@Kiryous Kiryous commented Apr 6, 2026

Closes https://github.com/elastic/security-team/issues/16652

Summary

Drops the custom workflows:aiAgent:enabled UI setting and unifies NL2Workflow gating under agentBuilder:experimentalFeatures.

  • Switch all 8 tool availability handlers to AGENT_BUILDER_EXPERIMENTAL_FEATURES_SETTING_ID
  • Make client-side AI integration reactive (get$ + first()) so toggling the setting registers attachment renderers without a page reload
  • Gate useAgentBuilderIntegration via useUiSetting so the AI Agent button dynamically shows/hides
  • Remove the old constant, setting registration, telemetry schema entries, and serverless allowlist entries
  • Keep experimental: true on workflow-authoring skill (both gates needed)

Setting disabled

Screenshot 2026-04-06 at 16 07 54 Screenshot 2026-04-06 at 16 07 59 Screenshot 2026-04-06 at 16 09 52

Setting enabled

Screenshot 2026-04-06 at 15 11 58 Screenshot 2026-04-06 at 15 12 05 Screenshot 2026-04-06 at 16 10 16

Toggle without reload

Screen.Recording.2026-04-06.at.16.11.42.mov

…eatures

Drop the custom `workflows:aiAgent:enabled` UI setting and use Agent
Builder's `agentBuilder:experimentalFeatures` to gate NL2Workflow
features (workflow authoring tools, skill visibility, and client-side
AI integration bootstrap).

- Update all 8 tool availability handlers to check
  `AGENT_BUILDER_EXPERIMENTAL_FEATURES_SETTING_ID`
- Make client-side AI integration reactive via `get$` + `first()` so
  toggling the setting registers attachment renderers without a page
  reload
- Gate `useAgentBuilderIntegration` hook on `useUiSetting` for the
  experimental flag so the AI Agent button and editor bridge
  dynamically show/hide
- Remove `WORKFLOWS_AI_AGENT_SETTING_ID` constant, setting
  registration, telemetry schema entries, and serverless project
  allowlist entries
- Keep `experimental: true` on `workflow-authoring` skill (gated by
  the same setting via skill registry)

Closes elastic/security-team#16652

Made-with: Cursor
@Kiryous Kiryous added Team:One Workflow Team label for One Workflow (Workflow automation) release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Apr 6, 2026
@Kiryous Kiryous self-assigned this Apr 6, 2026
@Kiryous Kiryous marked this pull request as ready for review April 6, 2026 13:11
@Kiryous Kiryous requested review from a team as code owners April 6, 2026 13:11
Copy link
Copy Markdown
Contributor

@AlejandroFrndz AlejandroFrndz left a comment

Choose a reason for hiding this comment

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

@obs-presentation code changes LGTM

Copy link
Copy Markdown

@leathekd leathekd left a comment

Choose a reason for hiding this comment

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

Schema LGTM

@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] Jest Tests #5 / buildEsqlFetchSubscribe changing a ES|QL query with no transformational commands should not change state when loading and finished if index pattern and columns are the same

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
workflowsManagement 1668 1669 +1

Public APIs missing comments

Total count of every public API that lacks a comment. Target amount is 0. Run node scripts/build_api_docs --plugin [yourplugin] --stats comments for more detailed information.

id before after diff
@kbn/workflows 558 557 -1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
workflowsManagement 2.3MB 2.3MB +54.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
workflowsManagement 28.0KB 28.2KB +141.0B
Unknown metric groups

API count

id before after diff
@kbn/workflows 664 663 -1

History

cc @Kiryous

Comment thread src/platform/plugins/shared/workflows_management/public/plugin.ts Outdated
Copy link
Copy Markdown
Contributor

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

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

LGTM

@Kiryous Kiryous merged commit 6868ae2 into elastic:main Apr 7, 2026
19 checks passed
mbondyra added a commit to Heenawter/kibana that referenced this pull request Apr 7, 2026
* commit 'bfc2446fdbcba2b3183f4518817c9757198c95ef':
  [Cascade] make cascade layout enabled by default (elastic#260698)
  [Dashboard Agent] Extract safe dashboard attachment integration refactors (elastic#261422)
  [One Workflow] Replace workflows:aiAgent:enabled with agentBuilder:experimentalFeatures (elastic#261330)
  [EDR Workflows] Osquery: hide query code from dropdown and show Elastic for automated Run By (elastic#261394)
  [Observability Onboarding] Add data detection & loading indicators to onboarding flows  (elastic#257870)
  [Significant events] Format event count with locale-aware number separators (elastic#261570)
  [Fleet] Fix deprecated filter in browse integrations (elastic#261459)
  [Lens as code] Split `xyStateSchema` config (elastic#261089)
  [Data Views as Code] Use `ref_id` and add metadata in data views schemas (elastic#261181)

Made-with: Cursor

# Conflicts:
#	x-pack/platform/packages/shared/dashboard-agent/dashboard-agent-common/types.ts
mbondyra added a commit to mbondyra/kibana that referenced this pull request Apr 7, 2026
…r-uid-to-id

* commit '6868ae2f195462f1f6809a6a544114f54e48239e':
  [One Workflow] Replace workflows:aiAgent:enabled with agentBuilder:experimentalFeatures (elastic#261330)
  [EDR Workflows] Osquery: hide query code from dropdown and show Elastic for automated Run By (elastic#261394)
  [Observability Onboarding] Add data detection & loading indicators to onboarding flows  (elastic#257870)
  [Significant events] Format event count with locale-aware number separators (elastic#261570)
  [Fleet] Fix deprecated filter in browse integrations (elastic#261459)
  [Lens as code] Split `xyStateSchema` config (elastic#261089)
  [Data Views as Code] Use `ref_id` and add metadata in data views schemas (elastic#261181)
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 release_note:skip Skip the PR/issue when compiling release notes Team:One Workflow Team label for One Workflow (Workflow automation) v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.