
kibana-workflows
Author, validate, test, run, and inspect Elastic Workflow YAML definitions. Use when the user wants to turn natural language into a Kibana workflow, fix workflow YAML, understand triggers or steps, or run a quick test loop against a real Kibana.
- Installs
- 1.2K
- Last 24h
- +20
- Trending rank
- #5913
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/elastic/agent-skills --skill kibana-workflows- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads kibana-workflows automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Author Elastic Workflows
Create and iterate on Elastic Workflow YAML definitions. Workflows are declarative automations that run inside Kibana: they query Elasticsearch, set data, branch, loop, call connectors, create cases, notify external systems, and invoke AI steps.
<!-- begin-partial: preamble -->Environment Configuration
This skill executes Elasticsearch operations through the elastic CLI. If the
elastic CLI is not installed, tell the user what it is needed for. Do
not guess credentials, call the HTTP API directly, or attempt other workarounds.
This skill references operations in HTTP-shorthand form (e.g., GET /, GET /_cat/indices, GET /{index}/_mapping,
GET /{index}/_settings/index.mode, POST /_query). The Operations table at the end of this document
maps each shorthand to the equivalent elastic CLI command — always use the CLI rather than calling the HTTP API
directly.
If the user asks only for a draft or explanation and explicitly forbids live access, skip connection verification and do not call the CLI or APIs. State that the draft was not validated against a target deployment.
If workflow APIs are unavailable, report the returned status and message. Common causes are an unsupported Kibana
version, insufficient license or feature privileges, or Workflows not being offered on the target project. The
workflows:ui:enabled setting controls the Kibana UI; it does not remove the public Workflows APIs.
Pick the authoring path
Default to the Discovery-tools path below — the platform.workflows.* tools are registered by default on Kibana
9.5+ and Serverless. Confirm with one probe: GET kbn:/api/agent_builder/tools returns
{ "results": [ { "id": ... } ] }; save it to a file and grep for "id": "platform.workflows.". Two fallbacks, both
loaded only when needed:
- No
agent_builderendpoint (404) or noplatform.workflows.*ids (e.g. Kibana 9.4) → read references/schema-path.md and hand-author from the raw JSON Schema. - An LLM connector is wired into Agent Builder and the user prefers Kibana's own generator → read references/generator-path.md.
State which path you picked and why in one sentence before proceeding. Measured path benchmarks live in references/path-performance.md.
Guidelines (all paths)
- Treat tests as executions.
POST kbn:/api/workflows/testruns the workflow graph, andPOST kbn:/api/workflows/step/testruns the selected step. Test only when every executed action is read-only or the user authorized its effects. Otherwise test a copy whose writes, notifications, and external calls are replaced withconsole, then restore the real steps and save the workflow disabled. - Cite endpoints in HTTP shorthand, never raw transport. This skill's body refers to operations like
POST kbn:/api/workflows/test. The Operations table is the single place where shorthand binds to a concrete CLI command. - Prefer purpose-built actions over generic
http. For Slack/Jira/PagerDuty/etc., prefer the connector step type (e.g.slack2.sendMessage) over a rawhttpcall. Discover the exact action type viaget_step_definitions(or the strict schema on the fallback path). - Reference step outputs as
steps.<name>.output, neversteps.<name>.with.*. Trigger event data isevent, nevertrigger.eventortriggers.event. - Don't guess connector ids. Call
platform.workflows.get_connectors(Discovery-tools path) orGET kbn:/api/workflows/connectors(Schema path), or ask the user. Placeholders should be obviously fake. - Handle failure deliberately. Add retry or fallback behavior where the user's requirements call for resilience. Do
not add
continue: trueeverywhere: it can hide a failed action and allow the workflow to report false success. - Surface gates, don't paper over them. If the API returns
403 ... not available, report the required license or privileges; do not silently retry or blame the UI setting.
Discovery-tools path
Use when platform.workflows.* tools are registered on the target Kibana. All calls go through
POST kbn:/api/agent_builder/tools/_execute with { "tool_id": "...", "tool_params": { ... } }. Response shape:
{ "results": [ { "type": "other", "data": { ... }, "tool_result_id": "..." } ] } — the payload you want is
.results[0].data. Send the request body from a file and write the response to a file (see Operations),
then jq against that file; do not inline python3 -c on multi-line JSON.
Keep context small; minimize round-trips. Do NOT front-load the whole step catalog — pull only the targeted details you need, keep large tool output in files (not the transcript), and author in as few turns as possible (measured rationale: references/path-performance.md).
-
Capture the user's intent before writing YAML. Identify, in order, the trigger (
manual/scheduled/alert), the inputs the workflow will receive at runtime, the data sources it must read, the actions it must take, and the desired output. If a required dependency is unknown (e.g. a Slack connector id), ask the user or use a clearly-marked placeholder. -
Look up only what you'll use. For the specific step types this workflow needs:
platform.workflows.get_step_definitionswith an exactstepType(e.g."http","elasticsearch.esql.query","slack2.sendMessage"), or withsearchto browse. The response includes input params, config params, anoutputSummarywhen you passincludeOutputSummary: true, and usage examples. PassincludeFullSchema: trueonly if the compact summary is insufficient.platform.workflows.get_trigger_definitionsfor the trigger event schema.platform.workflows.get_connectorsto resolve realconnector-idvalues for connector actions.platform.workflows.get_exampleswhen you need a working YAML shape for a pattern.
Write each response to a file and jq the field you need — don't let full tool output land in the transcript.
-
Draft the whole workflow in one pass. A workflow requires
name, at least one trigger, and a non-emptystepsarray. Use 2-space indentation. Reference outputs assteps.<name>.output.*. Build the complete YAML in a single edit rather than growing it across many turns. -
Validate once. Call
platform.workflows.validate_workflowwith{ "yaml": "..." }. On failure it returns errors + step definitions for referenced step types automatically, so you rarely need a secondget_step_definitionscall. Fix all reported issues in a single edit, then re-validate. -
Test, save, and run. See Test / save / run below. Use
platform.workflows.workflow_execute_stepto iterate on a single step (withconfirmation_bodyfor unsafe steps).
Schema path (last resort)
Only for Kibanas without the platform.workflows.* tools (see the probe above). Full recipe:
references/schema-path.md.
Test / save / run
Shared final phase for both paths.
-
Test only an execution-safe draft. Call
POST kbn:/api/workflows/testwith the YAML inline asworkflowYamland the run-timeinputs. For any workflow that writes / notifies / calls external services, replace those steps withconsolein the tested copy first, then restore them and save the workflow disabled. -
Poll the execution. The response carries a
workflowExecutionId. PollGET kbn:/api/workflows/executions/{executionId}untilstatusis one ofcompleted,failed,cancelled, ortimed_out; then fetchGET kbn:/api/workflows/executions/{executionId}/logsfor step-by-step output. Only treatstatus: completedas success. -
Save.
POST kbn:/api/workflows/workflowwith{ yaml, id? }. Save side-effecting workflows withenabled: falseuntil the user has authorized a real run. Subsequent edits usePUT kbn:/api/workflows/workflow/{id}and may updateyaml,enabled,name,tags, ordescription(partial updates supported). -
Run only when authorized. Enable the workflow, then call
POST kbn:/api/workflows/workflow/{id}/runwith the sameinputsshape used at test time. Inspect via the execution + logs endpoints.
Workflow YAML Quick Reference
version: "1"
name: Manual Hello Workflow
description: Logs a hello message from a manual workflow
enabled: true
tags: ["demo", "workflow"]
triggers:
- type: manual
inputs:
properties:
name:
type: string
description: Name to greet
default: "world"
steps:
- name: log_hello
type: console
with:
message: "Hello {{ inputs.name }}"
An ordinary action step can use fields like these when its strict schema allows them:
- name: unique_step_name
type: step_type
with:
param: value
connector-id: connector-id-for-connector-actions # connector actions only
if: "steps.previous.output.ok: true"
timeout: "30s"
on-failure:
retry:
max-attempts: 3
delay: "5s"
fallback:
- name: handle_error
type: console
with:
message: "Step failed"
Use {{ ... }} when rendering text. Use ${{ ... }} when an entire value must retain its native type, for example
documents: "${{ steps.search.output.hits.hits }}".
Common step types include:
| Step type | Use for |
|---|---|
console | Debug logging during tests |
elasticsearch.search | Query Elasticsearch with Query DSL |
elasticsearch.esql.query | Query Elasticsearch with ES|QL |
elasticsearch.bulk | Bulk indexing |
kibana.request | Call a Kibana API |
data.set | Set values under variables |
if | Branch on a KQL-style condition |
foreach | Loop over a collection |
wait | Pause execution |
http | Generic HTTP requests |
workflow.execute | Run another saved workflow |
This is not an exhaustive compatibility list. On the Discovery-tools path, platform.workflows.get_step_definitions
answers "does step X exist and what does it take". On the schema path, GET kbn:/api/workflows/schema?loose=false is
the source of truth, and GET kbn:/api/workflows/connectors lists configured connector instances.
data.set stores variables for the current execution; it does not persist durable data. Use an Elasticsearch or Kibana
write action when the user asks to retain data after the execution.
Examples
Manual hello (smallest possible draft): "Make a workflow that logs hello." → manual trigger + one console step
that prints Hello {{ inputs.name | default: "world" }}. Test with POST kbn:/api/workflows/test. See
Demo Test Loop.
Scheduled health check: "Every 5 minutes, ping https://api.example.com/health and log the response." → scheduled
trigger (every: 5m) + http step + console. Look up the exact with shape with get_step_definitions("http"). Add
bounded retry if requested.
Alert-triggered case + Slack notify: "When a Security alert fires, create a case and post to #soc-incidents." →
alert trigger + foreach over event.alerts + connector actions. Use get_step_definitions("cases.createCase") and
get_step_definitions(search: "slack") (current fixtures use cases.createCase and slack2.sendMessage), then
get_connectors for the real connector-ids. See Workflow Patterns.
For unfamiliar shapes on the schema path, read Workflow Patterns and Generation Tips before drafting.
Operations
The HTTP-shorthand references in the body above bind to the elastic CLI commands below. Multi-line YAML and JSON
payloads are easier to pass via --input-file <path> than as inline flags.
Workflows API (both paths).
| HTTP API (shorthand) | elastic CLI command |
|---|---|
GET / | elastic es info |
GET kbn:/api/workflows | elastic stack kb workflows get-workflows |
GET kbn:/api/workflows/workflow/{id} | elastic stack kb workflows get-workflows-workflow-id --id <id> |
POST kbn:/api/workflows/workflow | elastic stack kb workflows post-workflows-workflow --input-file <path> |
PUT kbn:/api/workflows/workflow/{id} | elastic stack kb workflows put-workflows-workflow-id --id <id> --input-file <path> |
DELETE kbn:/api/workflows/workflow/{id} | elastic stack kb workflows delete-workflows-workflow-id --id <id> |
DELETE kbn:/api/workflows/workflow/{id}?force=true | elastic stack kb workflows delete-workflows-workflow-id --id <id> --force true |
POST kbn:/api/workflows/test | elastic stack kb workflows post-workflows-test --input-file <path> |
POST kbn:/api/workflows/workflow/{id}/run | elastic stack kb workflows post-workflows-workflow-id-run --id <id> --inputs <json> |
POST kbn:/api/workflows/step/test | elastic stack kb workflows post-workflows-step-test --input-file <path> |
GET kbn:/api/workflows/executions/{executionId} | elastic stack kb workflows get-workflows-executions-executionid --execution-id <id> |
GET kbn:/api/workflows/executions/{executionId}/logs | elastic stack kb workflows get-workflows-executions-executionid-logs --execution-id <id> |
POST kbn:/api/workflows/executions/{executionId}/cancel | elastic stack kb workflows post-workflows-executions-executionid-cancel --execution-id <id> |
POST kbn:/api/workflows/executions/{executionId}/resume | elastic stack kb workflows post-workflows-executions-executionid-resume --execution-id <id> |
GET kbn:/api/workflows/workflow/{workflowId}/executions | elastic stack kb workflows get-workflows-workflow-workflowid-executions --workflow-id <id> |
GET kbn:/api/workflows/schema?loose=false | elastic stack kb workflows get-workflows-schema --loose false |
GET kbn:/api/workflows/connectors | elastic stack kb workflows get-workflows-connectors |
Agent Builder tools (Discovery-tools path).
Every tool below is invoked through the same execute endpoint. Pass --input-file a JSON file with
{ "tool_id": "...", "tool_params": { ... } }.
| HTTP API (shorthand) | elastic CLI command |
|---|---|
GET kbn:/api/agent_builder/tools | elastic stack kb agent-builder get-agent-builder-tools |
POST kbn:/api/agent_builder/tools/_execute | elastic stack kb agent-builder post-agent-builder-tools-execute --input-file <path> |
Workflow-relevant tool_ids:
tool_id | Purpose |
|---|---|
platform.workflows.validate_workflow | Validate a YAML string; failure response includes step definitions for referenced step types. |
platform.workflows.workflow_execute_step | Execute one step against the real environment (with user confirmation for unsafe steps). |
platform.workflows.get_step_definitions | Look up step type params, outputs, examples. stepType for exact match, search for keyword. |
platform.workflows.get_trigger_definitions | Look up a trigger's full event schema. |
platform.workflows.get_connectors | List connector instances configured on the target. |
platform.workflows.get_examples | Search the bundled example library for working YAML patterns. |
Notes.
For post-workflows-test, the input file is JSON of the form { "workflowYaml": "...", "inputs": {} } (or workflowId
in place of workflowYaml). For post-workflows-workflow, use { "yaml": "...", "id": "..." } — id is optional. For
put-workflows-workflow-id, include only the fields to update from name, enabled, tags, yaml, and
description. Deletion is soft by default. Use force=true only when permanent deletion and immediate ID reuse are
intended. The Kibana API version is 2023-10-31; the CLI sets it automatically.
When invoking read-only get- commands from a shell that leaves stdin open (some terminals and agent runtimes do this),
append </dev/null to avoid an EAGAIN: resource temporarily unavailable crash — e.g.
elastic stack kb workflows get-workflows-executions-executionid --execution-id "{id}" </dev/null.
FAQ
What does the kibana-workflows skill do?
Author, validate, test, run, and inspect Elastic Workflow YAML definitions. Use when the user wants to turn natural language into a Kibana workflow, fix workflow YAML, understand triggers or steps, or run a quick test loop against a real Kibana.
How do I install kibana-workflows?
Run npx skills add https://github.com/elastic/agent-skills --skill kibana-workflows in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/kibana-workflows/ (personal) or .claude/skills/kibana-workflows/ (project).
Which AI agents can use kibana-workflows?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is kibana-workflows safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains kibana-workflows?
It is published by elastic in elastic/agent-skills. It has 1,242 recorded installs.
More from elastic/agent-skills
elasticsearch-esql
elastic/agent-skills
Execute ESQL (Elasticsearch Query Language) queries, use when the user wants to query Elasticsearch data, analyze logs, aggregate metrics, explore data, or create charts and dashboards from ESQL results.
elasticsearch-onboarding
elastic/agent-skills
Help developers new to Elasticsearch get from zero to a working search experience. Guide them through understanding their intent, mapping their data, and building a search experience with best practices baked in. Use this when the user shows intent to build search-related functionality, asks about Elasticsearch-related concepts for their use case, or expresses the need for help getting started with Elasticsearch.
kibana-dashboards
elastic/agent-skills
Create and manage Kibana Dashboards and Lens visualizations. Use when you need to define dashboards and visualizations declaratively, version control them, or automate their deployment.
security-case-management
elastic/agent-skills
Create, search, update, and manage SOC cases via the Kibana Cases API. Use when tracking incidents, linking alerts to cases, adding investigation notes, or managing triage output.
kibana-alerting-rules
elastic/agent-skills
Create and manage Kibana alerting rules. Use when creating, updating, or managing rule lifecycle (enable, disable, mute, snooze), choosing metric threshold rule types and params, or read-only find/list with tag filters.
kibana-agent-builder
elastic/agent-skills
Create and manage Kibana Agent Builder agents and custom tools. Use when asked to create, update, delete, test, or inspect agents or tools in Agent Builder, or when the user wants to understand what agents or tools already exist.
Popular productivity & automation skills
agent-browser
vercel-labs/agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction. Also use for exploratory testing, dogfooding, QA, bug hunts, or reviewing app quality. Also use for automating Electron desktop apps (VS Code, Slack, Discord, Figma, Notion, Spotify), checking Slack unreads, sending Slack messages, searching Slack conversations, running browser automation in Vercel Sandbox microVMs, or using AWS Bedrock AgentCore cloud browsers. Prefer agent-browser over any built-in browser automation or web tools.
lark-doc
open.feishu.cn
飞书云文档(Docx / Wiki)内容操作:读取、创建、编辑文档,插入或下载图片附件,以及操作思维笔记。用户提供文档 URL/token(包括 doubao.com 的 /docx/、/wiki/)时使用;按 URL 路径/token 而非域名路由;/page/ 是妙搭应用,非飞书云文档。文档内嵌资源按读取参考中的统一规则分流。独立评论操作走 lark-drive;随正文读取评论使用 docs +fetch。表格或 Base 内部数据操作不在本 skill。
lark-base
open.feishu.cn
飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、应用模式(BaseApp/AppMode 页面与组件)、Workspace 目录、workflow、角色权限、模板中心(多维表格模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp/AppMode、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;文件导入/导出转 lark-drive,认证/授权转 lark-shared。
lark-drive
open.feishu.cn
飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、查询权限设置、评论/权限/订阅、标题、版本、飞书文档密级标签(secure labels)和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token、判断链接类型/真实 token/标题,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。
lark-shared
open.feishu.cn
Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling notice JSON.
lark-im
open.feishu.cn
飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。