Skip to main content
ParallelTools enable an Agent to perform AI-optimized web search and content extraction using Parallel’s APIs.

Prerequisites

The following example requires the parallel-web library and an API key which can be obtained from Parallel.
pip install -U parallel-web
export PARALLEL_API_KEY=***

Example

The following agent will search for information on AI agents and autonomous systems, then extract content from specific URLs:
cookbook/tools/parallel_tools.py
from agno.agent import Agent
from agno.tools.parallel import ParallelTools

agent = Agent(
    tools=[
        ParallelTools(
            enable_search=True,
            enable_extract=True,
            max_results=5,
            max_chars_per_result=8000,
        )
    ],
    markdown=True,
)

# Should use parallel_search
agent.print_response(
    "Search for the latest information on 'AI agents and autonomous systems' and summarize the key findings"
)

# Should use parallel_extract
agent.print_response(
    "Extract information about the product features from https://parallel.ai and https://docs.parallel.ai"
)

Toolkit Params

ParameterTypeDefaultDescription
api_keyOptional[str]NoneParallel API key. If not provided, will use PARALLEL_API_KEY environment variable.
enable_searchboolTrueEnable Search API functionality for AI-optimized web search.
enable_extractboolTrueEnable Extract API functionality for content extraction from URLs.
allboolFalseEnable all tools. Overrides individual flags when True.
max_resultsint10Default maximum number of results for search operations.
max_chars_per_resultint10000Default maximum characters per result for search operations.
beta_versionstr"search-extract-2025-10-10"Beta API version header.
modeOptional[str]NoneDefault search mode. Options: “one-shot” or “agentic”.
include_domainsOptional[List[str]]NoneDefault domains to restrict results to.
exclude_domainsOptional[List[str]]NoneDefault domains to exclude from results.
max_age_secondsOptional[int]NoneDefault cache age threshold. When set, minimum value is 600 seconds.
timeout_secondsOptional[float]NoneDefault timeout for content retrieval.
disable_cache_fallbackOptional[bool]NoneDefault cache fallback behavior.

Toolkit Functions

FunctionDescription
parallel_searchSearch the web using Parallel’s Search API with natural language objective. Parameters include objective (str) for natural-language description, search_queries (list) for traditional keyword queries, max_results (int) for maximum number of results, and max_chars_per_result (int) for maximum characters per result. Returns JSON formatted string with URLs, titles, publish dates, and relevant excerpts.
parallel_extractExtract content from specific URLs using Parallel’s Extract API. Parameters include urls (list) for URLs to extract from, objective (str) to guide extraction, search_queries (list) for targeting relevant content, excerpts (bool, default=True) to include text snippets, max_chars_per_excerpt (int) to limit excerpt characters, full_content (bool, default=False) to include complete page text, and max_chars_for_full_content (int) to limit full content characters. Returns JSON formatted string with extracted content in clean markdown format.

Developer Resources