Implementation:ANative Lab EvoAgentX SearchToolkits
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Tools, Search |
| Last Updated | 2026-10-21 00:00 GMT |
Overview
Concrete tools for web search across multiple providers including Exa, SerpAPI, Serper, DuckDuckGo, Google, and Wikipedia.
Description
EvoAgentX provides multiple search toolkits, all extending SearchBase:
- ExaSearchToolkit — Uses Exa API (`exa-py`) for AI-powered semantic web search. Requires API key from env. Provides semantic search, similarity search, and content retrieval.
- SerpAPISearchToolkit — Uses SerpAPI for Google/Bing search. Provides structured results including organic results, knowledge graph, and answer box. Supports pagination and location parameters.
- SerperAPISearchToolkit — Uses Serper API for Google search. Lower cost alternative to SerpAPI. Provides organic results, news, images, and places.
- DDGSSearchToolkit — DuckDuckGo search toolkit (from `search_ddgs.py`, MANUAL_REVIEW approved).
- GoogleSearchToolkit — Google Custom Search toolkit (from `search_google.py`, MANUAL_REVIEW approved).
- GoogleFreeSearchToolkit — Free Google search toolkit (from `search_google_f.py`, MANUAL_REVIEW approved).
- WikipediaSearchToolkit — Wikipedia search toolkit (from `search_wiki.py`, MANUAL_REVIEW approved).
Usage
- Semantic search: Use `ExaSearchToolkit` for AI-powered semantic web search.
- Structured search: Use `SerpAPISearchToolkit` for structured Google/Bing results.
- Cost-effective search: Use `SerperAPISearchToolkit` for lower-cost Google search.
- Free search: Use `DDGSSearchToolkit`, `GoogleFreeSearchToolkit`, or `WikipediaSearchToolkit` for no-cost search.
Code Reference
Source Location
- Repository: EvoAgentX
- Exa File: evoagentx/tools/search_exa.py (L1-434)
- SerpAPI File: evoagentx/tools/search_serpapi.py (L1-473)
- Serper File: evoagentx/tools/search_serperapi.py (L1-422)
- DDGS File: evoagentx/tools/search_ddgs.py (L1-187)
- Google File: evoagentx/tools/search_google.py (L1-168)
- GoogleFree File: evoagentx/tools/search_google_f.py (L1-141)
- Wikipedia File: evoagentx/tools/search_wiki.py (L1-169)
Signature
class ExaSearchToolkit(SearchBase, Toolkit):
def __init__(self, api_key: Optional[str] = None, ...)
class SerpAPISearchToolkit(SearchBase, Toolkit):
def __init__(self, api_key: Optional[str] = None, ...)
class SerperAPISearchToolkit(SearchBase, Toolkit):
def __init__(self, api_key: Optional[str] = None, ...)
class DDGSSearchToolkit(Toolkit):
def __init__(self, ...)
class GoogleSearchToolkit(Toolkit):
def __init__(self, api_key: str, cx: str, ...)
class GoogleFreeSearchToolkit(Toolkit):
def __init__(self, ...)
class WikipediaSearchToolkit(Toolkit):
def __init__(self, ...)
Import
from evoagentx.tools.search_exa import ExaSearchToolkit
from evoagentx.tools.search_serpapi import SerpAPISearchToolkit
from evoagentx.tools.search_serperapi import SerperAPISearchToolkit
from evoagentx.tools.search_ddgs import DDGSSearchToolkit
from evoagentx.tools.search_google import GoogleSearchToolkit
from evoagentx.tools.search_google_f import GoogleFreeSearchToolkit
from evoagentx.tools.search_wiki import WikipediaSearchToolkit
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| query | str | Yes | Search query |
| num_search_pages | int | No | Number of results (default 5) |
| api_key | str | Yes (paid) | API key from env var |
Outputs
| Name | Type | Description |
|---|---|---|
| search returns | List[dict] | Search results with title, link, content |
Usage Examples
Exa Semantic Search
from evoagentx.tools.search_exa import ExaSearchToolkit
toolkit = ExaSearchToolkit(api_key="your-exa-key")
# Attach to an agent for semantic web search
DuckDuckGo Free Search
from evoagentx.tools.search_ddgs import DDGSSearchToolkit
toolkit = DDGSSearchToolkit() # No API key required
# Attach to an agent for free web search
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment