Skip to content

[One workflow] 🐞 Include registered triggers in agent builder experience#270221

Merged
yngrdyn merged 5 commits into
elastic:mainfrom
yngrdyn:17218-one-workflow-extend-get_trigger_definitions-tool-to-include-custom-trigger-types
May 22, 2026
Merged

[One workflow] 🐞 Include registered triggers in agent builder experience#270221
yngrdyn merged 5 commits into
elastic:mainfrom
yngrdyn:17218-one-workflow-extend-get_trigger_definitions-tool-to-include-custom-trigger-types

Conversation

@yngrdyn
Copy link
Copy Markdown
Contributor

@yngrdyn yngrdyn commented May 20, 2026

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

Summary

Extends the workflow agent platform.workflows.get_trigger_definitions tool (and workflow-gen get_trigger_definitions) so agents see built-in triggers (manual, scheduled, alert) plus event-driven triggers from workflows_extensions (e.g. cases.caseUpdated), each with jsonSchema, eventContextSchema, and examples where applicable.

UI verification prompt

List all workflow triggers

or

I need a workflow that will alert me every time a cases status changes

or

Create a workflow that would alert me in slack eveytime a workflow fails

Any of those prompts should include the use of event-driven triggers

🎥 Demo

Screen.Recording.2026-05-20.at.16.53.02.mov

@yngrdyn yngrdyn self-assigned this May 20, 2026
@yngrdyn yngrdyn requested review from a team as code owners May 20, 2026 14:53
@yngrdyn yngrdyn added bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.4.0 v9.4.1 v9.4.2 labels May 20, 2026
@botelastic botelastic Bot added the Team:One Workflow Team label for One Workflow (Workflow automation) label May 20, 2026
@yngrdyn yngrdyn changed the title [One workflow] Include registered triggers in agent builder experience [One workflow] 🐞 Include registered triggers in agent builder experience May 20, 2026
@Kiryous Kiryous self-requested a review May 21, 2026 09:14
Copy link
Copy Markdown
Contributor

@Kiryous Kiryous left a comment

Choose a reason for hiding this comment

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

LGTM with two comments

… the server side as well. Leaving PublicDefinition thin
@yngrdyn yngrdyn requested a review from a team as a code owner May 22, 2026 12:41
@yngrdyn yngrdyn enabled auto-merge (squash) May 22, 2026 12:50
@kibanamachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Async chunks

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

id before after diff
cases 2.4MB 2.4MB +17.6KB
workflowsExtensions 54.9KB 52.8KB -2.1KB
total +15.5KB

Page load bundle

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

id before after diff
workflowsExtensions 38.2KB 40.2KB +2.0KB

History

cc @yngrdyn

@yngrdyn yngrdyn merged commit 828e215 into elastic:main May 22, 2026
32 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.4

https://github.com/elastic/kibana/actions/runs/26293133711

@kibanamachine
Copy link
Copy Markdown
Contributor

💔 All backports failed

Status Branch Result
9.4 Backport failed because of merge conflicts

Manual backport

To create the backport manually run:

node scripts/backport --pr 270221

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 25, 2026
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 270221 locally
cc: @yngrdyn

yngrdyn added a commit that referenced this pull request May 26, 2026
Following #270221, I introduced
properties to `CommonTrigerDef` mistakenly as optional, now they are
properly required
jcger pushed a commit that referenced this pull request May 26, 2026
…nce (#270221)

Closes elastic/security-team#17218.

## Summary

Extends the workflow agent `platform.workflows.get_trigger_definitions`
tool (and workflow-gen `get_trigger_definitions`) so agents see
**built-in triggers** (`manual`, `scheduled`, `alert`) **plus**
event-driven triggers from `workflows_extensions` (e.g.
`cases.caseUpdated`), each with `jsonSchema`, `eventContextSchema`, and
examples where applicable.

## UI verification prompt

```
List all workflow triggers
```
or
```
I need a workflow that will alert me every time a cases status changes
```
or
```
Create a workflow that would alert me in slack eveytime a workflow fails
```

Any of those prompts should include the use of event-driven triggers

## 🎥 Demo


https://github.com/user-attachments/assets/1a08f47a-929a-4928-9ffd-da4fa8fa00c8
@kibanamachine
Copy link
Copy Markdown
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 270221 locally
cc: @yngrdyn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport missing Added to PRs automatically when the are determined to be missing a backport. backport:version Backport to applied version labels bug Fixes for quality problems that affect the customer experience release_note:skip Skip the PR/issue when compiling release notes Team:One Workflow Team label for One Workflow (Workflow automation) v9.4.0 v9.4.1 v9.4.2 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants