Build a TaskSpecParam dict from pydantic classes / schemas / text.
Mirrors the helper used in https://docs.parallel.ai/task-api/examples/task-enrichment.
Extract citations, low-confidence fields, and interaction_id.
Saves Task-API consumers the boilerplate of walking the result shape to
pull out per-field citations, find which fields the model wasn't sure
about, and grab the interaction_id for multi-turn chaining.
Works on results from :class:ParallelTaskRunTool,
:class:ParallelDeepResearch, and individual entries from
:class:ParallelTaskGroup / :class:ParallelEnrichment batches.
Verify a Parallel webhook signature (Standard Webhooks scheme).
Parallel signs webhook payloads using HMAC-SHA256 over
"<webhook-id>.<webhook-timestamp>.<body>", base64-encoded
with padding. The signature is delivered as the webhook-signature
header (possibly with multiple space-delimited v1,<sig> entries).
See https://docs.parallel.ai/resources/webhook-setup.
The verification flow is:
tolerance_seconds from now
(replay protection).v1,<sig> entry in the header.Settings for excerpt extraction.
Fetch policy for cache vs live content.
Settings for full content extraction.
Domain allow/deny lists and freshness floor for web research.
Apex-domain semantics: include nature.com, not https://www.nature.com.
Wildcards permitted (e.g. .org).
Parallel Web chat model integration.
This integration connects to Parallel's Chat API, which provides real-time web research capabilities through an OpenAI-compatible interface.
Parallel Extract Tool.
Calls Parallel's Extract API to pull clean, structured content from web pages. Returns a compact summary string the LLM sees and the full structured response as a tool artifact.
One entry in the FindAll exclude_list.
One boolean condition the API uses to filter candidates.
The pair (name, description) names a True/False question the API answers per candidate; only candidates with all conditions True are returned.
Run a Parallel FindAll discovery and return the matched candidates.
FindAll discovers entities from the web that satisfy a natural-language objective plus a set of boolean match conditions. Useful for lead generation, market mapping, and entity enumeration.
Webhook config for a Parallel monitor.
Per the create-monitor API, the webhook object is {url, event_types}.
The signing secret is configured at the org webhook-endpoint level (in
the Parallel dashboard), not per-monitor — see
:func:langchain_parallel.tasks.verify_webhook for verification.
Manage scheduled web monitors via the Parallel Monitor API (alpha).
Each method is a thin wrapper around an HTTP call. Returned dicts are the API response bodies as-is.
LangChain retriever that returns Parallel Search results as Documents.
Drops in to any RAG pipeline that expects a BaseRetriever. Each
Document.page_content is the joined excerpt list from one Parallel
result; metadata carries url, title, publish_date, search_id,
the original excerpts list, and the query that produced it.
Parallel Search tool with web research capabilities.
This tool calls Parallel's Search API, which streamlines the traditional
search -> scrape -> extract pipeline into a single API call. It supports
natural-language objectives, keyword queries, domain filters, two modes
(basic, advanced), location targeting, and async usage.
One BYOMCP server description for a Task Run.
Mirrors :class:parallel.types.McpServerParam so callers don't have to
import from the SDK directly.
High-level Runnable for Parallel deep-research tasks.
Defaults to the pro-fast processor -- the -fast variant of
pro ("Exploratory web research") at 2-5x the speed for similar
accuracy. Drop the -fast suffix (processor="pro", 2-10 min)
or step up to processor="ultra" (5-25 min) for the most thorough
multi-source investigative reports. For shorter, enrichment-style
structured tasks, use :class:ParallelEnrichment or pass
processor="core-fast" here.
Always returns the full basis (citations + reasoning + confidence)
on the result; lower friction than wiring up
:class:ParallelTaskRunTool manually when all you want is "do deep
research on this question."
High-level Runnable for the structured-batch enrichment pattern.
Wraps :class:ParallelTaskGroup with a default_task_spec so callers
can pass a list of records (pydantic instances or dicts) and get back a
list of enriched output dicts. Mirrors the canonical enrichment pattern
documented at
https://docs.parallel.ai/task-api/examples/task-enrichment.
Defaults to the core processor (the docs' recommendation for
enrichment workflows).
Batch task runner backed by the Task Group API.
Use when you have a list of inputs and want them all processed in parallel. Returns a list of result dicts in the same order as the input list.
Run a single Parallel Task synchronously and return the structured result.
This is the agent-friendly path: an LLM calls the tool with input, the
tool blocks until the Parallel Task Run completes, and returns a dict
containing the output, citations (basis), and run metadata.
For long-running deep-research tasks, prefer :class:ParallelDeepResearch,
which is a :class:~langchain_core.runnables.Runnable and returns the same
result shape.
Parallel Extract Tool for LangChain.
ParallelWeb tools.
LangChain integration for Parallel's Monitor API (alpha).
The Monitor API runs scheduled web queries and emits webhook events when
results change. As of parallel-web 0.5.1 the SDK does not expose this
surface, so this module talks to /v1alpha/monitors directly via httpx.
The Monitor API is currently in alpha; endpoints and shapes may change without notice. Track https://docs.parallel.ai/monitor-api/monitor-quickstart for updates.
LangChain integration for Parallel's Task API.
Four primary surfaces:
ParallelTaskRunTool — agent-callable tool that runs a single
Parallel Task synchronously (via client.task_run.execute) and
returns the structured result with citations.ParallelDeepResearch — high-level :class:~langchain_core.runnables.Runnable
wrapper for deep-research tasks. Defaults to the core processor and
always returns the full basis (citations + reasoning + confidence).ParallelTaskGroup — batch executor backed by the Task Group
API. The general building block for fan-out/fan-in workloads.ParallelEnrichment — the structured-batch counterpart to
:class:ParallelDeepResearch. A typed Runnable that enriches a list
of records against a pydantic input/output schema using the Task
Group API under the hood.Helpers: :func:build_task_spec constructs a Task Spec dict from
pydantic classes; :func:verify_webhook validates HMAC signatures on
incoming Parallel webhooks.
LangChain retrievers backed by the Parallel Search API.
LangChain integration for Parallel's FindAll API.
FindAll discovers entities from the web that match a natural-language objective plus a set of boolean match conditions. Returns a ranked list of candidates with citations.
Parallel Web chat model integration.
This module provides the ChatParallelWeb class for interacting with Parallel's Chat API through an OpenAI-compatible interface.