Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 85 additions & 18 deletions _vector-search/ai-search/building-agentic-search-flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
---

# Configuring agentic search

**Introduced 3.3**
{: .label .label-purple }

This is an experimental UI feature. For updates on the progress of the feature or if you want to leave feedback, join the discussion on the [OpenSearch forum](https://forum.opensearch.org/).
{: .warning}

[Agentic search]({{site.url}}{{site.baseurl}}/vector-search/ai-search/agentic-search/) lets you ask questions in natural language and have OpenSearch agents plan and execute the retrieval automatically. OpenSearch Dashboards offers an intuitive UI for configuring agents, equipping agents with different tools, and executing agentic searches.
[Agentic search]({{site.url}}{{site.baseurl}}/vector-search/ai-search/agentic-search/) lets you ask questions in natural language and have OpenSearch agents plan and execute the retrieval automatically. OpenSearch Dashboards offers an intuitive UI for configuring agents, equipping agents with different tools, executing agentic searches, and instructions for how to use agentic search in your downstream applications.

![Agentic search editor]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-editor.png)

## Prerequisites

Expand All @@ -27,25 +30,89 @@

Ensure that you have a sufficient number of documents in your cluster to reasonably evaluate your agentic searches. For more information, see [Agentic search]({{site.url}}{{site.baseurl}}/vector-search/ai-search/agentic-search/).

## Example: Product search with GPT-5
## Accessing the plugin

To access the plugin, go to **OpenSearch Dashboards** and select **OpenSearch Plugins** > **AI Search Flows** from the top menu.

## Configuring agents

Agents are very customizable and can be configured in many different ways depending on your target use case. The following image shows a fully-configured conversational agent.

![Agent configuration]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agent-configuration.png)

### Agent types

`Flow` agents are optimized for speed and simplicity in query generation. `Conversational` agents can be configured with more tools and functionality for deeper thinking. Agent types can only be configured **once** during agent creation.

This example uses a deployed OpenAI GPT-5 model described in [this documentation]({{site.url}}{{site.baseurl}}/vector-search/ai-search/agentic-search/agent-customization/#gpt-5-recommended).
When configuring `Flow` agents, certain models may require manually adding an appropriate `response_filter` in the **Query Planning** tool. For more details, see [Register a flow agent]({{site.url}}{{site.baseurl}}/vector-search/ai-search/agentic-search/flow-agent/#step-4-register-a-flow-agent). Currently, only `OpenAI` and `Amazon Bedrock Converse` are supported. If you would like native support for other endpoints, please open a [GitHub issue](https://github.com/opensearch-project/dashboards-flow-framework/issues).

Check warning on line 47 in _vector-search/ai-search/building-agentic-search-flows.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Please] Using 'please' is unnecessary. Remove. Raw Output: {"message": "[OpenSearch.Please] Using 'please' is unnecessary. Remove.", "location": {"path": "_vector-search/ai-search/building-agentic-search-flows.md", "range": {"start": {"line": 47, "column": 422}}}, "severity": "WARNING"}
{: .note}

To build and test your agentic search workflow in OpenSearch Dashboards, follow these steps:
### Models

Models can be optimized for different scenarios: cost-efficient, fast inference versus resource-intensive, deep-thinking approaches. For a list of tested, compatible models, see [Model configuration]({{site.url}}{{site.baseurl}}/vector-search/ai-search/agentic-search/agent-customization/#model-configuration).

Check warning on line 52 in _vector-search/ai-search/building-agentic-search-flows.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.LatinismsSubstitution] Use 'compared to or compared with' instead of 'versus'. Raw Output: {"message": "[OpenSearch.LatinismsSubstitution] Use 'compared to or compared with' instead of 'versus'.", "location": {"path": "_vector-search/ai-search/building-agentic-search-flows.md", "range": {"start": {"line": 52, "column": 81}}}, "severity": "WARNING"}

### Tools

Agents must have the **Query Planning** tool enabled for executing agentic searches. Query generation can be entirely LLM-generated (default), or can be steered to select from a list of available search templates. Search templates can be useful for maintaining control over the queries generated, and forces the model to leverage known, working, and performant queries.
![Search templates]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-search-template.png)

Other pre-built tools are available for `Conversational` agents, including **Search Index**, **List Index**, **Index Mapping**, and **Web Search**. Enable these to extend your agent's capabilities.

### MCP servers

Integrate with MCP servers to let `Conversational` agents access more external tools. Limit which tools the agents can access by configuring filters under **Tool filters** for each server. For more information, see [Using external MCP servers]({{site.url}}{{site.baseurl}}/vector-search/ai-search/agentic-search/mcp-server).

## Running agentic searches

Test how the agents perform with different indices and different search queries. Collapse the **Configure agent** panel to focus on executing searches and analyzing the results. The following image shows a search for **mens blue shirts** against an index **demo_amazon_fashion** with relevant result images.

Check failure on line 67 in _vector-search/ai-search/building-agentic-search-flows.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Spelling] Error: mens. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks. Raw Output: {"message": "[OpenSearch.Spelling] Error: mens. If you are referencing a setting, variable, format, function, or repository, surround it with tic marks.", "location": {"path": "_vector-search/ai-search/building-agentic-search-flows.md", "range": {"start": {"line": 67, "column": 220}}}, "severity": "ERROR"}

Check failure on line 67 in _vector-search/ai-search/building-agentic-search-flows.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'. Raw Output: {"message": "[OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'.", "location": {"path": "_vector-search/ai-search/building-agentic-search-flows.md", "range": {"start": {"line": 67, "column": 44}}}, "severity": "ERROR"}

![Agent configuration]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-configuration.png)

1. Go to **OpenSearch Dashboards** and select **OpenSearch Plugins** > **AI Search Flows** from the top menu.
1. On the **Workflows** page, select the **New workflow** tab, as shown in the following image. In the **Agentic Search** template, select **Create**.
### Index

Try out different indices in your cluster. Select the **Inspect** button to view the index details. For `Conversational` agents, you can default to **All indices** and let the agent decide.

Check failure on line 73 in _vector-search/ai-search/building-agentic-search-flows.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'. Raw Output: {"message": "[OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'.", "location": {"path": "_vector-search/ai-search/building-agentic-search-flows.md", "range": {"start": {"line": 73, "column": 155}}}, "severity": "ERROR"}

Check failure on line 73 in _vector-search/ai-search/building-agentic-search-flows.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'. Raw Output: {"message": "[OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'.", "location": {"path": "_vector-search/ai-search/building-agentic-search-flows.md", "range": {"start": {"line": 73, "column": 19}}}, "severity": "ERROR"}

### Agent

Try out different agents you've created. Select the **Inspect** button to view the agent details.

### Query

Try out different natural language queries. You can also specify query fields for the agent to focus on in your selected index. To edit the full `agentic` search query directly, toggle to the **JSON** view. For `Conversational` agents, select **Continue conversation** after a search to persist the context for future searches. Select **Clear conversation** to discard any past context and start a new conversation.

### Running searches

Select **Search** to execute an agentic search. This may take several seconds for the agent to reason about the query, analyze the indices and their mappings, and any other tool orchestration and execution the agent decides to do. If it's taking too long, or you want to try a new search, you can select **Stop**.

Check failure on line 85 in _vector-search/ai-search/building-agentic-search-flows.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'. Raw Output: {"message": "[OpenSearch.SubstitutionsError] Use 'indexes' instead of 'indices'.", "location": {"path": "_vector-search/ai-search/building-agentic-search-flows.md", "range": {"start": {"line": 85, "column": 132}}}, "severity": "ERROR"}

Once the search is completed, under **Generated query**, view the query domain-specific language (DSL) that the agent generated and ran against your cluster. Under **Search results**, view the search response. Depending on the response, you may see different tabs available, such as **Aggregations** if the response contains aggregations, or **Visual hits** if the documents contain images. **Raw response** will always be available. If the search was executed with a `Conversational` agent, you can select **View agent summary** to get a step-by-step breakdown of the agent's actions, including the sequence of tools it used and why.

### Using in your application

Select **Export** to view all of the underlying resources needed for leveraging agentic search in your downstream application, including the agent and search pipeline details.

![Agentic search export]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-export.png)

## Example: Product search with GPT-5

This example uses a deployed OpenAI GPT-5 model described in [this documentation]({{site.url}}{{site.baseurl}}/vector-search/ai-search/agentic-search/agent-customization/#gpt-5-recommended), and an index generated from [Fashion Product Images Dataset](https://www.kaggle.com/datasets/paramaggarwal/fashion-product-images-dataset).
{: .note}

1. Navigate to the **AI Search Flows** plugin. On the **Workflows** page, select the **New workflow** tab, as shown in the following image. In the **Agentic Search** template, select **Create**.
![New workflow page]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/new-workflow-page.png)
1. Provide a unique workflow **Name** and an optional **Description**, as shown in the following image. Then select **Create** to create your workflow. You are automatically directed to the workflow editor, where you can begin configuring the agent.
![Quick configure modal]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-quick-configure-modal.png)
1. Under **Configure agent**, select **Create new agent**, as shown in the following image. Once you configure an agent, you can select or update existing agents. For full agent customization, toggle to the `JSON` view and edit directly.
![Agentic search workflow editor]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-editor.png)
1. Under **Agent**, enter a unique **Name** and **Description** for the agent, as shown in the following image. Under **Tools** > **Query Planning** > **Query planning model**, select **OpenAI GPT-5**. Then select **Create agent**.
![Agent configuration]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agent-configuration.png)
1. Under **Test flow** > **Index**, select the index you'd like to search, as shown in the following image. Under **Test flow** > **Query**, enter a natural language query. Optionally, specify query fields for the agent to search in your selected index. To edit the full `agentic` search query directly, toggle to the `JSON` view. Then select **Search**. The agent may take several seconds to execute.
![Agent searching]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agent-searching.png)
1. Under **Generated query**, view the query domain-specific language (DSL) that the agent generated and ran against your cluster.
![Agent query]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-agent-query.png)
1. Under **Search results**, select **Raw response**, the formatted table of **Hits**, or **Aggregations** to view the results.
![Search results]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-results.png)
2. Provide a unique workflow **Name** and an optional **Description**, as shown in the following image. Then select **Create** to create your workflow. You are automatically directed to the workflow editor, where you can begin configuring the agent.
![Quick configure modal]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-quick-configure-modal.png)
3. Under **Configure agent**, select **Create new agent**. Enter a unique **Name**, optionally provide a **Description**, and under **Model**, select the deployed **OpenAI GPT-5** model. Finally, select **Create agent** at the bottom.
![Agentic search configuration]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-example-configuration.png)
4. Under **Agentic search**, select the index you'd like to search against. The agent will already be selected.
5. Under **Query**, enter a natural language query about your data. Select **Search** to run an agentic search.
![Agentic search]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-example-search.png)
6. View the agent's generated query, the search hits, and agent summary.
![Agentic search results]({{site.url}}{{site.baseurl}}/images/dashboards-flow-framework/agentic-search-example-search-results.png)

## Next steps

- Learn more about Agentic Search [here]({{site.url}}{{site.baseurl}}/vector-search/ai-search/agentic-search/)
- Learn more about agents [here]({{site.url}}{{site.baseurl}}/ml-commons-plugin/agents-tools/agents/index/)
- Join the discussion on the [OpenSearch forum](https://forum.opensearch.org/)
- For any issues or bugs found, please open an issue on [GitHub](https://github.com/opensearch-project/dashboards-flow-framework)

Check warning on line 117 in _vector-search/ai-search/building-agentic-search-flows.md

View workflow job for this annotation

GitHub Actions / style-job

[vale] reported by reviewdog 🐶 [OpenSearch.Please] Using 'please' is unnecessary. Remove. Raw Output: {"message": "[OpenSearch.Please] Using 'please' is unnecessary. Remove.", "location": {"path": "_vector-search/ai-search/building-agentic-search-flows.md", "range": {"start": {"line": 117, "column": 33}}}, "severity": "WARNING"}
- TODO link to blog
Binary file modified images/dashboards-flow-framework/agent-configuration.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/dashboards-flow-framework/agentic-search-editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading