Loading...
Loading...
Create and manage Agent Builder agents and custom tools in Kibana. Use when asked to create, update, delete, test, or inspect agents or tools in Agent Builder.
npx skill4agent add elastic/agent-skills kibana-agent-builder| Variable | Required | Description |
|---|---|---|
| Yes | Kibana base URL (e.g., |
| No | API key for authentication (preferred) |
| No | Username for basic auth (falls back to |
| No | Password for basic auth (falls back to |
| No | Kibana space ID (omit for default space) |
| No | Set to |
KIBANA_API_KEYKIBANA_USERNAMEKIBANA_PASSWORDnode skills/kibana/agent-builder/scripts/agent-builder.js list-toolsKIBANA_URLplatform.core.node skills/kibana/agent-builder/scripts/agent-builder.js list-agents$ARGUMENTS$ARGUMENTSnode skills/kibana/agent-builder/scripts/agent-builder.js create-agent \
--name "<agent_name>" \
--description "<description>" \
--instructions "<system_instructions>" \
--tool-ids "<tool_id_1>,<tool_id_2>,<tool_id_3>"--name--tool-ids--description--instructionsnode skills/kibana/agent-builder/scripts/agent-builder.js list-agentsnode skills/kibana/agent-builder/scripts/agent-builder.js get-agent --id "<agent_id>"node skills/kibana/agent-builder/scripts/agent-builder.js update-agent \
--id "<agent_id>" \
--description "<new_description>" \
--instructions "<new_instructions>" \
--tool-ids "<tool_id_1>,<tool_id_2>"--ididnameAPI constraint: PUT only accepts,description, andconfiguration. Includingtags,id, ornamecauses a 400 error.type
node skills/kibana/agent-builder/scripts/agent-builder.js delete-agent --id "<agent_id>"node skills/kibana/agent-builder/scripts/agent-builder.js chat \
--id "<agent_id>" \
--message "<user_message>"POST /api/agent_builder/converse/asyncagent_idinput[Reasoning][Tool Call][Tool Result][Response]--conversation-id?param_nametypedescriptionstringintegerfloatbooleandatearray{
"id": "campaign_revenue_by_region",
"type": "esql",
"description": "Calculates confirmed revenue for a region by quarter.",
"configuration": {
"query": "FROM finance-orders-* | WHERE order_status == \"completed\" AND region == ?region | STATS total_revenue = SUM(amount) BY quarter | LIMIT 10",
"params": {
"region": {
"type": "string",
"description": "Region code, e.g. 'US', 'EU', 'APAC'"
}
}
}
}{
"id": "customer_feedback_search",
"type": "index_search",
"description": "Searches customer feedback and support tickets.",
"configuration": {
"pattern": "customer-feedback-*"
}
}{
"id": "investigate-alert-workflow",
"type": "workflow",
"description": "Triggers automated alert investigation.",
"configuration": {
"workflow_id": "security-alert-investigation"
}
}inputsRead these before creating tools — violations cause 400 errors.
idtypedescriptionconfigurationtagsnameparams"params": {}typedescriptiondefaultoptional"pattern""index""index"descriptionconfigurationtagsidtypenode skills/kibana/agent-builder/scripts/agent-builder.js list-custom-toolsnode skills/kibana/agent-builder/scripts/agent-builder.js get-tool --id "<tool_id>"node skills/kibana/agent-builder/scripts/agent-builder.js create-tool \
--id "<tool_id>" \
--type "esql" \
--description "<description>" \
--query "<esql_query>" \
--params '{"region": {"type": "string", "description": "Region code"}}'node skills/kibana/agent-builder/scripts/agent-builder.js create-tool \
--id "<tool_id>" \
--type "index_search" \
--description "<description>" \
--pattern "my-index-*"node skills/kibana/agent-builder/scripts/agent-builder.js create-tool \
--id "<tool_id>" \
--type "workflow" \
--description "<description>" \
--workflow-id "my-workflow-name"node skills/kibana/agent-builder/scripts/agent-builder.js update-tool \
--id "<tool_id>" \
--description "<new_description>" \
--query "<new_query>"descriptionconfigurationtagsidtypenode skills/kibana/agent-builder/scripts/agent-builder.js delete-tool --id "<tool_id>"node skills/kibana/agent-builder/scripts/agent-builder.js test-tool \
--id "<tool_id>" \
--params '{"region": "US"}'POST /api/agent_builder/tools/_executeUser: /kibana-agent-builder sales-helperplatform.core.searchplatform.core.list_indicesesql-sales-dataesql-sales-dataplatform.core.searchplatform.core.list_indices--name "sales-helper" --tool-ids "esql-sales-data,platform.core.search,platform.core.list_indices"User: Update the sales-helper agent to focus on the APAC regionget-agent --id "sales-helper"update-agent --id "sales-helper" --instructions "Focus on APAC sales data. Use esql-sales-data for queries."get-agent --id "sales-helper"User: Ask sales-helper what the top revenue products arechat --id "sales-helper" --message "What are the top revenue products?"User: Create a tool that shows billing complaints by category for the last N dayselasticsearch-esqlnode skills/kibana/agent-builder/scripts/agent-builder.js create-tool \
--id "billing_complaint_summary" \
--type "esql" \
--description "Returns billing complaints grouped by sub-category for the last N days." \
--query "FROM customer-feedback-* | WHERE @timestamp >= NOW() - ?days::integer * 1d AND MATCH(feedback_text, 'billing') | STATS count = COUNT(*) BY sub_category | SORT count DESC | LIMIT 10" \
--params '{"days": {"type": "integer", "description": "Number of days to look back"}}'test-tool --id "billing_complaint_summary" --params '{"days": 30}'User: Create a tool to search support transcriptsnode skills/kibana/agent-builder/scripts/agent-builder.js create-tool \
--id "transcript_search" \
--type "index_search" \
--description "Searches support call transcripts by topic, agent, or customer issue." \
--pattern "support-transcripts"references/architecture-guide.mdreferences/use-cases.mdelasticsearch-esqlsecurity-workflowslist-toolslist-agentslist-toolsKIBANA_SPACE_IDdelete-agentdelete-tool| LIMIT Ncustomer-feedback-**KEEPtest-tool"params": {}