[9.4] [One workflow] 🐞 Include registered triggers in agent builder experience (#270221)#271431
[9.4] [One workflow] 🐞 Include registered triggers in agent builder experience (#270221)#271431yngrdyn wants to merge 8 commits into
Conversation
…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, 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. |
|
A documentation preview will be available soon. Request a new doc build by commenting
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. |
|
@yngrdyn, this PR increases one or more page-load bundle sizes by 15% or more:
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. |
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
History
|
Backport
This will backport the following commits from
mainto9.4:Questions ?
Please refer to the Backport tool documentation