Loading

Workflow tools in Elastic Agent Builder

Workflow tools enable agents to trigger Elastic Workflows directly from a conversation and use their output. This is ideal for offloading tasks from the LLM that require a deterministic, repeatable sequence of actions.

Note

This page explains how to trigger a workflow in an agent conversation. If you want to use an agent within a workflow step, refer to Call agents from workflows.

Before you begin:

  • Familiarize yourself with the core concepts of Elastic Workflows.
  • Enable the Workflows feature in Advanced settings.
  • Ensure you have the correct privileges to create and run workflows.
  • Create at least one workflow.

Follow these steps to configure a workflow tool:

  1. Navigate to Agents > More > View all tools > New tool.
Screenshot of creating a new workflow tool.
  1. Select Workflow as the tool type.
  2. Select a workflow from the drop down list.
  3. Fill in the configuration fields.
  4. Click Save.

The Workflow tools have the following configuration settings:

Tool ID
A unique identifier for the tool.
Description
A natural language explanation of what the tool does. The agent uses this description to decide when to call the tool.
Example: "Use this tool when the user asks to investigate an alert regarding the payment service."
Workflow
The specific Elastic Workflow to execute. Selecting a workflow automatically pulls its definition into the tool configuration.
Inputs
The parameters required by the workflow. These are automatically detected from the inputs section of the selected workflow's YAML definition. The agent will attempt to extract values for these inputs from the user's chat message.
Labels (Optional)
Tags used to organize and filter tools within the Elastic Agent Builder UI.

Once you've created a workflow tool, you must assign it to an agent to make it available in chat.

To assign a tool to an agent:

  1. Navigate to Agents.
  2. Select your agent.
  3. Select More > Edit Agent > Tools
  4. Assign the workflow tool by selecting the checkbox.
  5. Click Save.

To test your workflow tool, open the Agent chat UI and ask a question that triggers the workflow.

The agent:

  • extracts the necessary parameters from the conversation
  • runs the workflow
  • returns the workflow's final output to the chat

Expand the Completed reasoning section to trace the execution steps and inspect the raw workflow output.

Screenshot of reasoning steps of agent builder.

The elastic/workflows GitHub repo contains more than 50 examples you can use as a starting point.