Movatterモバイル変換


[0]ホーム

URL:


Loading
  1. Elastic Docs/
  2. Explore and analyze/
  3. AI-powered features/
  4. Agent Builder/
  5. Tools

Create and manage custom tools in Elastic Agent Builder

You can extend the built-in tool catalog with your own custom tool definitions. Custom tools offer flexibility in how they interact with your data. This flexibility allows you to create tools that match your specific use cases and data access patterns.

Elastic Agent Builder supports several tool types:

  • ES|QL tools: Execute pre-defined ES|QL queries with parameterized inputs for precise, repeatable data retrieval.
  • Index search tools: Scope searches to specific indices or patterns. The LLM dynamically constructs queries based on user requests.
  • MCP tools: Connect to external Model Context Protocol servers, enabling agents to use remote tools and services.
  • Workflow tools: Call pre-defined Workflows directly from the agent chat.

You can create custom tools in the Kibana UI.

To create a custom tool in the UI:

  1. Navigate to theTools section on theAgents page in Kibana.
  2. ClickNew tool.
New tool button for creating custom tools
  1. Fill in the required fields:

    • ID: Enter a unique identifier for your tool (e.g.,get_customer_orders). Agents use this ID to reference the tool. Refer toNaming conventions for recommended patterns.
    • Name: Enter a descriptive name for your tool.
    • Description: Write a clear explanation of what the tool does and when it should be used. Refer toWriting effective tool descriptions for guidance.
    • Type: Choose a tool type from the list.
    • Parameters: For tools with ES|QL queries, define any parameters your query needs.
    • Labels: (Optional) Add labels to categorize and organize your tools.
  2. Choose how to save your tool:

    • SelectSave to create the tool.
    • SelectSave and test to create the tool and immediately open the testing interface
    Save and Save and test buttons for tool creation

Create custom tools with API

You can also create and manage tools programmatically. To learn more, refer toTools API.

Test your tools

Before assigning tools to agents, verify they work correctly by testing them. Testing helps ensure your tool returns useful results and handles parameters correctly.

If you didn't selectSave and test immediately:

  1. Find your tool in the Tools list.
  2. Click the test icon (play button) associated with your tool.
Test icon (play button) for running tool tests
×Test icon (play button) for running tool tests
  1. Enter test data based on your tool type:
    • For ES|QL tools with parameters: Enter realistic test values for each parameter in theInputs section.
    • For Index search tools: Enter a sample search query to test the search functionality.
  2. SelectSubmit to run the test.
  3. Review the Response section to verify:
    • The tool executes without errors.
    • Results are returned in the expected format.
    • The data matches your expectations.

Assign tools to agents

To start using a custom tool, you must assign it to acustom agent.

  1. Navigate to the agent configuration page.
  2. Select theTools tab.
  3. Add the desired tools to the agent.
  4. Save the agent configuration.

Best practices

Follow these guidelines to create tools that agents can use effectively.

Naming conventions

The Tool ID is a critical identifier. Use a namespace prefix to group tools logically, which helps the LLM understand tool relationships and prevents naming collisions.

Recommended pattern:domain.action_entity orsystem.function

Examples:

Writing effective tool descriptions

A strong description explains what the tool does, when to use it, and what limitations exist. Include these components:

Tip

Not sure whether logic belongs in a tool description or in the agent's custom instructions? Refer toCustom instructions, tool descriptions, or user input.

Example: Customer support (retrieval)

Example: Finance (data fetching)

Additional tips

Related pages


[8]ページ先頭

©2009-2026 Movatter.jp