Type to search.

Create an agent

Base URL
https://{kibana_url}
  • POST /api/agent_builder/agents
  • POST /s/{space_id}/api/agent_builder/agents
Auth The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 9.2 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Create a new agent. Use this endpoint to define the agent's behavior, appearance, and capabilities through comprehensive configuration options. To learn more about agents, refer to the agents documentation.

Required privileges

Privileges agentBuilder:manageAgents

Path parameters

space_id string optional

An identifier for the space. If space_id is not provided in the URL, the default space is used. Refer to Spaces for more information.

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

avatar_color string

Optional hex color code for the agent avatar.

avatar_symbol string

Optional symbol/initials for the agent avatar.

configuration object required

Configuration settings for the agent.

ai_indices string[] · max items: 100

Array of AI indices to associate with the agent.

connector_ids string[] · max items: 100

Array of connector IDs to associate with the agent.

enable_elastic_capabilities boolean

When true, enables built-in Elastic capabilities for the agent.

instructions string

Optional system instructions that define the agent behavior.

plugin_ids string[] · max items: 100

Array of plugin IDs to assign to the agent.

post_execution_workflow_ids string[] · max items: 100
skill_ids string[] · max items: 100

Array of skill IDs to be available to the agent.

subagent_ids string[] · max items: 50 The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Planned We plan to add this functionality in a future Elastic Stack update. Subject to changes. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Allowlist of subagent IDs this agent may spawn. Missing or empty disables the run_subagent tool. Use '_self' to enable self-fork.

tools object[] required
tool_ids string[] required

Array of tool IDs that the agent can use.

workflow_ids string[] · max items: 100
description string required

Description of what the agent does.

id string required

Unique identifier for the agent.

labels string[]

Optional labels for categorizing and organizing agents.

name string required

Display name for the agent.

Response

200

Indicates a successful response

application/json