Loading

Model configuration in Elastic Agent Builder

Elastic Agent Builder uses large language models (LLMs) to power agent reasoning and decision-making.

For model performance for Observability and Elastic Security, refer to Configure access to LLMs. The Recommended models section focuses on Elastic Agent Builder.

For Elastic Cloud Serverless projects and Elastic Cloud Hosted deployments, Elastic Agent Builder uses Elastic Managed LLMs running on the Elastic Inference Service (EIS). This managed service requires zero setup.

You can get started with zero setup using Elastic Managed LLMs. These are built-in LLMs running on the Elastic Inference Service (EIS). This managed service requires no additional API key management.

Note

Learn more about Elastic Managed LLMs and pricing.

These deployments do not include a preconfigured model. To use Elastic Agent Builder, you have two options:

Use the model selector in the chat interface to switch between available models. The selector displays all configured models, including preconfigured models (on Elastic Cloud Hosted and Elastic Cloud Serverless) and any custom inference endpoints or connectors you set up.

To learn more, refer to select a different model.

Model selector dropdown in the chat interface

When you call an agent through the Converse API, you can override the agent's configured model for that request. Pass one of the following in the request body:

Both parameters route the request to the same underlying model and are mutually exclusive. If you send both, the request fails with a 400 error. If you omit both, the agent uses its default model.

For an example request, refer to Route a request to a specific model.

To change which model is used by default:

  1. Search for Model management / Feature settings in the global search field.
  2. Select your preferred model from the Default model dropdown.
  3. Save your changes.

The Feature settings page also provides per-feature model configuration, allowing you to assign specific models to individual AI capabilities across your deployment. This enables more granular control over model selection.

To change which model is used by default:

  1. Search for GenAI Settings in the global search field.
  2. Select your preferred connector from the Default AI Connector dropdown.
  3. Save your changes.

For more information about these settings, refer to Manage access to AI features.

To give you faster responses at a lower token cost, Elastic Agent Builder automatically routes some low-effort, latency-sensitive operations to a fast model instead of your default model. A fast model is a smaller, high-throughput model that returns results more quickly than a frontier reasoning model.

This routing is automatic and cannot be turned off. You do not need to configure anything to benefit from it. Your default model still handles agent reasoning, tool selection, and response synthesis.

Elastic Agent Builder uses the fast model for well-scoped tasks that do not need deep reasoning, such as ES|QL query generation and conversation title generation.

On Elastic Cloud Serverless projects and Elastic Cloud Hosted deployments, the fast model is preconfigured through Elastic Managed LLMs on the Elastic Inference Service (EIS), with no setup. Claude Haiku 4.5 is one example. The latency improvement is most noticeable on Elastic Cloud Serverless.

On Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed deployments, there is no preconfigured fast model unless you connect to EIS through Cloud Connect. Without it, fast model routing falls back to your default model.

Elastic Agent Builder uses a recommended Elastic Managed LLM for fast routing. When more than one recommended fast model is available, such as Claude Haiku 4.5 and Google Gemini Flash, it uses the first one. To prefer a specific model, open the Feature settings page, go to the Agent Builder section, and order the models under Fast models so your preferred one is at the top. To find this page, refer to Change the default model.

In 9.5, only recommended Elastic Managed LLMs are used for fast routing. Assigning a custom or non-recommended model has no effect on the fast model.

Main models and Fast models cards in the Agent Builder section of the Feature settings page

If no fast model is available, Elastic Agent Builder uses your default model instead. Fast model routing is an optimization, so a missing fast model reduces the latency benefit but does not cause errors.

You can configure additional models for Elastic Agent Builder in two ways:

Configure an inference endpoint for your model provider. The endpoint must support the chat_completion task type.

Choose based on how the model is hosted:

If you prefer not to use the UI, you can also create endpoints with the inference APIs. See Create models programmatically.

To use additional models that aren't preconfigured, create a connector for your model provider.

  1. Find connectors under Alerts and Insights / Connectors in the global search bar.

  2. Select Create Connector and select your model provider.

  3. Configure the connector with your API credentials and preferred model.

  4. Expand Additional settings and select chat_completion as the task type.

    Additional settings expanded showing chat_completion task type selected
Tip

For detailed instructions on creating connectors, refer to Connectors.

To learn about preconfigured connectors, refer to preconfigured connectors.

You can create either an inference endpoint or a connector through the API:

You can connect a locally hosted LLM to Elastic using the OpenAI connector. This requires your local LLM to be compatible with the OpenAI API format.

For detailed setup instructions, refer to the OpenAI connector documentation.

Elastic Agent Builder requires models with strong reasoning and tool-calling capabilities. State-of-the-art models perform significantly better than smaller or older models.

Agent Builder relies on advanced LLM capabilities including:

  • Function calling: Models must accurately select appropriate tools and construct valid parameters from natural language requests.
  • Multi-step reasoning: Agents need to plan, execute, and adapt based on tool results across multiple iterations.
  • Structured output: Models must produce properly formatted responses that the agent framework can parse.

While Elastic Agent Builder can be configured to use LLMs from many different vendors, not all LLMs are robust enough for reliable agent workflows.

The following models are known to work well with Elastic Agent Builder. These categories represent a spectrum from maximum reasoning capability to maximum throughput. Choose based on your latency, cost, and complexity requirements.

Category Model examples Use cases Trade-offs
Extended reasoning - Gemini 3.1 Pro
- Claude 4.6 Opus
Open-ended exploration, multi-step planning, complex analysis, and ES|QL-heavy dashboard generation Higher latency and cost. Best for latency-insensitive, batch, async, or dashboard workflows that need fewer corrections.
Balanced performance - GPT-5.2
- Claude 4.6 Sonnet
General-purpose agents requiring reliable tool orchestration and data retrieval and synthesis Moderate cost. Suitable for real-time and interactive use. For ES|QL-heavy dashboard generation, use an extended reasoning model.
High throughput - Claude 4.5 Haiku
- Gemini 3.0 Flash
Latency-sensitive pipelines and high-concurrency scenarios with well-scoped tasks Lower reasoning depth. Ideal for high-volume workloads with well-defined tasks.
Note

Elastic Agent Builder automatically routes some low-effort tasks to a high-throughput model. Refer to Fast model for low-effort tasks.

Tip

For agents working with large documents or conversation histories, consider models with extended context windows. For example, Claude 4.6 Sonnet and Gemini 3.1 Pro support up to 1M tokens. Check your model provider's documentation for specific context limits.

Note

For dashboards and visualizations, choose a higher-tier model when the workflow depends on complex ES|QL generation. Current testing shows Claude 4.6 Opus generates more reliable dashboard ES|QL than Claude 4.6 Sonnet.

Smaller or less capable models may produce errors like:

Error: Invalid function call syntax
		
Error executing agent: No tool calls found in the response.
		

Although any chat-completion-compatible model can technically be configured, use state-of-the-art models for reliable agent performance.

Note

Smaller or "mini" model variants are not recommended for Elastic Agent Builder as they lack the necessary capabilities for reliable agent workflows.