Introducing Elastic’s Agent Builder

Introducing Elastic Agent Builder, a framework to easily build reliable, context-driven AI agents in Elasticsearch with your data.

Generative AI offers the incredible promise to drive efficiency and offer better customer experiences, which is why every enterprise and startup is launching chatbots and agents. But in order for AI agents to be useful, developers need to deal with internal, and often messy data, and do more than just retrieving and passing that data to the LLM. They need to implement the practices of Context Engineering - a system to get the right tools and context to agents so they provide accurate answers and take reliable actions. Implementing this is a massive challenge for developers to build with high quality, security, and reliability.

With deep, long-term investment in search relevance, retrieval-augmented generation, and vector database, Elasticsearch already offers many strong context-engineering primitives. Today we’re excited to announce the launch of Elastic AI Agent Builder. Agent Builder provides a complete set of capabilities to significantly simplify the approach to interacting with and building context-driven AI Agents leveraging the power of Elasticsearch.

Elastic AI Agent Builder

Agent Builder provides an out of the box conversational agent to allow you to immediately start chatting with any data in Elasticsearch - or from external sources through integrations - with a full experience built in Kibana and accessible via API. Developers can also customize their tools to search specific indexes or use ES|QL for business logic, relevance tuning, or personalization. It has the ability to transform natural language into intuitive, piped, multi-step ES|QL, giving the agent the power to do analytical and hybrid semantic search. Finally, developers can compose custom Agents based on a set of user defined instructions and configurable set of available tools, and these Agents can be interacted with via chat in Kibana or via APIs, MCP and A2A.

Agent Builder core capabilities

Agent Builder allows you to:

  1. Immediately Chat with Your Data: Agent Builder includes a built-in, native conversational agent. Right out of the box, you can ask questions and interact with any data you have in Elasticsearch, turning your data into an active, conversational partner.
  2. Leverage Intelligent built-in Tools for Relevance: Agent Builder comes with a set of built-in tools including a powerful search capability that selects the right index, understands the structure of that data, translates natural language into optimized semantic, hybrid or structured queries, and returns only the most relevant context to the LLM.
  3. Build Custom Tools: Create your own custom tools that give the agent new skills, harnessing the full power of Elasticsearch’s query language (ES|QL) to precisely control what data is used for context. This gives you granular control over the relevance, accuracy, and security of your agent's responses.
  4. Define Custom Agents: Go beyond the built-in agent by defining your own from the ground up. You control the agent’s entire persona with a custom system prompt, decide exactly which tools it can access, and configure its specific security profile to meet your needs.
  5. Integrate with external Agents & Apps: In addition to full API support, Agent Builder provides native MCP and A2A integration, making it easy to bring the relevance and context engineering power of Elasticsearch Tools & Agents to any external agents, frameworks and custom applications.
  6. Additional capabilities
  • Built in visualizations for chat with editable chart types and ability to add to Dashboards
  • Full Agent tracing with to view and edit query results in Discover, with logging coming soon
  • Model flexibility for users to configure Agent Builder with any preferred LLM provider

Get Started with Agent Builder

There are four quick ways to start interacting or building your first agent using native Elastic AI Agent, creating custom tools, configuring agents and integrating externally with APIs. Below is a high-level overview and you can get started with an Elastic Cloud Trial.

Chat Natively

In Kibana, go to Agents in the side navigation (if not visible, enable with the steps here), then click on the native chat interface and use the default Elastic AI Agent to naturally interact with and analyze data. This agent leverages a set of built-in tools that enable the Agent to analyze and reason over indexes, mappings, queries to provide an accurate grounded answer. These tools include:

  1. A powerful search tool that iterates through steps to identify the right index to search, understand the structure of that index, formulate the most effective queries, and return the most relevant context to the LLM.
  2. Tools for generating and executing ES|QL from natural language. This allows for natural language search and analysis over any data in ES, including generation of queries with advanced features like JOINs.
  3. A tool for selecting the most relevant index for a task. In environments where they may be multiple data sources with differing purposes, the index_explorer can help identify for the agent which indices to work with, reducing noise and cost

Use the text input area to chat with an agent in real time. By default, you chat with the built-in Elastic AI Agent.

This agent uses its built-in capabilities to analyze your data, understand its structure and infer your intent to provide accurate and relevant answers.

The same interaction can be done using the agent builder API by simply issuing requests, this allows you to entirely separate applications on top of Agent Builder.

Create a Custom Tool

Tools represent executable capabilities like search, index exploration, or custom ES|QL logic that the agent can use to fulfill user requests. Default tools included in Elasticsearch are (platform.core.search, platform.core.list_indices, platform.core.get_index_mapping, platform.core.get_document_by_id)

Custom tools give the ability to align the Agents capabilities to specific business logic and needs.

In Kibana, go to Agents -> Manage tools, then click New Tool. There are two types of tools: Index Search, for when you want to scope general search capabilities to specific indices and provide more information to the LLM about the index and the data it contains and ES|QL, to define tools with explicit ES|QL queries for implementing custom business logic and fine-tuning relevance.

For both tool types, start with a meaningful description, since it helps both humans and agents understand how the tool works.

For Index Search:

  1. Add target patterns that match indices in your deployment

For ES|QL:

  1. Define ES|QL Query: Create a new tool using Elasticsearch Query Language to access, prepare and run inference on data. For example write an ES|QL query that correlates datasets using LOOKUP JOIN to connect indices
  2. Add ES|QL Parameters: Introduce guarded variables like ?time_duration to safely constrain LLM-generated inputs while preserving flexibility.
  3. Validate query: Run the tool via save & test

Create a New Agent

A custom Agent allows you to define how the Agent should respond to user requests and leverage the tools and data sources it has access to.

In Kibana, go to Agents, then click New Agent. Give your agent a unique Agent ID, set the Display Name and add a brief Description. You can also automate the same process using the Agent Builder API. Send a POST request to /api/agent_builder/agents

  1. Define Custom Instructions: Start by crafting a precise prompt that guides the agent’s operations. The prompt is embedded directly into the agent configuration, so every response follows the same logic, tone, and workflow. See examples of starter prompts here.
  2. Assign Tools: Specify the tools the agent is allowed to call. Limiting tool access ensures security and reliability, preventing the agent from invoking unintended operations while keeping it effective within its defined domain.
  3. Chat: Use the agent interface or embed with APIs to chat with the custom agent.

Integrate with the API, MCP, or A2A

Agent Builder is built on a set of APIs, allowing you to integrate this functionality directly into your own applications, CI/CD pipelines, or automation scripts.The three core endpoints you'll work with are:

  • /api/agent_builder/tools: The endpoint for creating, listing, and managing the reusable skills your agents can use.
  • /api/agent_builder/agents: The endpoint for defining your agent personas, including their all-important instructions and tool assignments.
  • /api/agent_builder/converse: The endpoint for interacting with your agents, starting conversations, and getting answers.
    • The converse API returns the full thinking and reasoning steps as well as the results of any queries allowing you to recreate or add to the experience as needed.

Finally you can interact with any of the tools over MCP. Agent Builder exposes an MCP endpoint that includes any of the built-in and custom tools to be used with any MCP client. Most MCP clients (such as Claude Desktop, Cursor, VS Code, etc.) have similar configuration patterns. To connect to your Elastic instance, you need to provide your Kibana URL and API key in the client's configuration file, typically in the format described here.

For more detailed information on getting started read this blog, check out the accompanying Jupyter Notebook available here in our GitHub repo and on demand workshop.

Availability

Agent Builder is available now as a tech preview. Get started with an Elastic Cloud Trial, and check out the documentation for Agent Builder here.

We’ve got lots more to come soon, excited to share, happy (agent) building!

Ready to try this out on your own? Start a free trial.

Want to get Elastic certified? Find out when the next Elasticsearch Engineer training is running!

Related content

Building agentic applications with Elasticsearch and Microsoft’s Agent Framework

October 24, 2025

Building agentic applications with Elasticsearch and Microsoft’s Agent Framework

Learn how to use Microsoft Agent Framework with Elasticsearch to build an agentic application that extracts ecommerce data from Elasticsearch client libraries using ES|QL.

Elastic MCP server: Expose Agent Builder tools to any AI agent

October 20, 2025

Elastic MCP server: Expose Agent Builder tools to any AI agent

Discover how to use the built-in Elastic MCP server in Agent Builder to securely extend any AI agent with access to your private data and custom tools.

AI Agent evaluation: How Elastic tests agentic frameworks

October 13, 2025

AI Agent evaluation: How Elastic tests agentic frameworks

Learn how we evaluate and test changes to an agentic system before releasing them to Elastic users to ensure accurate and verifiable results.

Creating an AI agent with n8n and MCP

October 10, 2025

Creating an AI agent with n8n and MCP

Exploring how to build a trend analytics agent with n8n while leveraging the Elasticsearch MCP server.

Connecting Elastic Agents to Gemini Enterprise via A2A protocol

October 9, 2025

Connecting Elastic Agents to Gemini Enterprise via A2A protocol

Learn how to use Agent Builder to expose your custom Elastic Agent to external services like Gemini Enterprise with the A2A protocol.

Ready to build state of the art search experiences?

Sufficiently advanced search isn’t achieved with the efforts of one. Elasticsearch is powered by data scientists, ML ops, engineers, and many more who are just as passionate about search as your are. Let’s connect and work together to build the magical search experience that will get you the results you want.

Try it yourself