Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add WebSearchTool to enable the web search capability in agent framework #538

Open
zane-neo opened this issue Mar 14, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@zane-neo
Copy link
Collaborator

zane-neo commented Mar 14, 2025

Background

With the recent surge of Deep Research, there's an increasing demand for AI systems to able to access to public web data to provide agent framework the capability to plan the task and steps.

A WebSearchTool should address this requirement and this tool should be generic enough so that can address different use cases for different users, so the tool should have below capabilities:

  1. The tool should able to support different search engine by default and in runtime.
  2. The tool should able to support different endpoint to perform the search against by default and in runtime.
  3. The tool's input should support various request body by default and in runtime.
  4. The tool's output should be structured to ensure it can encapsulate different responses of different endpoints.

Proposal

  1. Create an agent like below:
    POST /_plugins/_ml/agents/_register
{
  "name": "deep research agent",
  "type": "plan",
  "description": "this is a simple deep research agent",
  "llm": {
    "model_id": "LWoR8YwBW2B7Mkxs2gVc",
    "parameters": {
      "max_iteration": 5,
      "stop_when_no_tool_found": true,
      "response_filter": "$.completion"
    }
  },
  "tools": [
    {
      "type": "WebSearchTool",
      "name": "WebSearchTool",
      "parameters": {
        "search_engine": "google",
        "endpoint": "https://www.google.com"
      }
    }
  ],
  "app_type": "my_app"
}
  1. Execute the agent to solve a complex task:
    POST /_plugins/_ml/agents/{agent_id}
{
    "parameters": {
        "question": "I have an index my-index in my cluster and I want to change the index's one field `description` type from text to embedding type, how?"
    }
}
  1. During the agent runs, the agent might break the task into several steps, e.g.:
    step1: Use WebSearchTool to search embedding type in OpenSearch with search content embedding type in OpenSearch
    step2: Use WebSearchTool to search change index type in OpenSearch with search content change index type in OpenSearch.
    step3: Combine step1 and step2's result to figure out final solution to complete the task.

Then WebSearchTool will be leveraged to perform search task for step1 and step2 with different search content, and then in step3 the LLM can combine the results to generate a final solution.

@zane-neo zane-neo added enhancement New feature or request untriaged labels Mar 14, 2025
@zane-neo zane-neo self-assigned this Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant