Skip to content

[9.4] [One workflow] 🐞 Include registered triggers in agent builder experience (#270221)#271431

Open
yngrdyn wants to merge 8 commits into
elastic:9.4from
yngrdyn:backport/9.4/pr-270221
Open

[9.4] [One workflow] 🐞 Include registered triggers in agent builder experience (#270221)#271431
yngrdyn wants to merge 8 commits into
elastic:9.4from
yngrdyn:backport/9.4/pr-270221

Conversation

@yngrdyn
Copy link
Copy Markdown
Contributor

@yngrdyn yngrdyn commented May 27, 2026

Backport

This will backport the following commits from main to 9.4:

Questions ?

Please refer to the Backport tool documentation

…nce (elastic#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
(cherry picked from commit 828e215)

# Conflicts:
#	src/platform/plugins/shared/workflows_management/server/agent_builder/tools/get_trigger_definitions_tool.ts
#	src/platform/plugins/shared/workflows_management/server/api/workflows_management_api.ts
#	src/platform/plugins/shared/workflows_management/server/services/workflow_validation_service.test.ts
#	src/platform/plugins/shared/workflows_management/server/services/workflow_validation_service.ts
#	x-pack/platform/packages/shared/agent-builder/agent-builder-workflow-gen/generate_workflow/tools/lookup.ts
#	x-pack/platform/packages/shared/agent-builder/agent-builder-workflow-gen/generate_workflow/tools/tools.test.ts
#	x-pack/platform/packages/shared/agent-builder/agent-builder-workflow-gen/generate_workflow/tools/tools.ts
#	x-pack/platform/plugins/shared/agent_builder_workflows/server/plugin.ts
#	x-pack/platform/plugins/shared/cases/common/workflows/triggers/index.ts
#	x-pack/platform/plugins/shared/cases/public/workflows/triggers/attachments_added.ts
#	x-pack/platform/plugins/shared/cases/public/workflows/triggers/case_created.ts
#	x-pack/platform/plugins/shared/cases/public/workflows/triggers/case_status_updated.ts
#	x-pack/platform/plugins/shared/cases/public/workflows/triggers/case_updated.ts
#	x-pack/platform/plugins/shared/cases/public/workflows/triggers/comments_added.ts
@yngrdyn yngrdyn added the backport This PR is a backport of another PR label May 27, 2026
@yngrdyn yngrdyn enabled auto-merge (squash) May 27, 2026 11:56
@github-actions
Copy link
Copy Markdown
Contributor

@yngrdyn, it looks like you're updating the parameters for a rule type!

Please review the guidelines for making additive changes to rule type parameters and determine if your changes require an intermediate release.

@github-actions
Copy link
Copy Markdown
Contributor

A documentation preview will be available soon.

Request a new doc build by commenting
  • Rebuild this PR: run docs-build
  • Rebuild this PR and all Elastic docs: run docs-build rebuild

run docs-build is much faster than run docs-build rebuild. A rebuild should only be needed in rare situations.

If your PR continues to fail for an unknown reason, the doc build pipeline may be broken. Elastic employees can check the pipeline status here.

@kibanamachine kibanamachine requested a review from janmonschke May 27, 2026 11:58
@yngrdyn yngrdyn requested a review from kibanamachine as a code owner May 27, 2026 12:27
@botelastic botelastic Bot added the Team:One Workflow Team label for One Workflow (Workflow automation) label May 27, 2026
@yngrdyn yngrdyn removed the request for review from janmonschke May 27, 2026 12:30
@github-actions
Copy link
Copy Markdown
Contributor

@yngrdyn, this PR increases one or more page-load bundle sizes by 15% or more:

Plugin Before (bytes) After (bytes) Change
workflowsExtensions 38,894 44,875 +15.4%

Large bundle size increases can affect page load performance. Consider whether dependencies can be lazy-loaded or code split to reduce the bundle.

See the bundle optimization guide for tips.

@kibanamachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

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
workflowsExtensions 54.8KB 52.7KB -2.1KB

Page load bundle

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

id before after diff
workflowsExtensions 37.8KB 39.8KB +2.0KB
Unknown metric groups

API count

id before after diff
workflowsExtensions 140 152 +12

History

@yngrdyn yngrdyn disabled auto-merge May 27, 2026 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR Team:One Workflow Team label for One Workflow (Workflow automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants