Skip to main content
The Rust SDK is in alpha. The API is stable, but some interfaces may change based on feedback.
DeepResearch plans, searches, verifies, and writes a cited report. Tasks run async - create one, then poll or wait for the result.
For the conceptual overview, search configuration, and best practices, see the DeepResearch Guide. This page is the Rust SDK method reference.

Wire up Valyu DeepResearch (autonomous research agent) with the Rust SDK (alpha).

Open in Cursor

Basic usage

Research modes

Use the enum variants DeepResearchMode::Fast, ::Standard, ::Heavy, ::Max. The legacy ::Lite variant maps to standard. Max requires at least $15 in available credits.

Builder pattern

Use DeepResearchCreateRequest for full control, then call client.deepresearch_create(&request):
In production, prefer webhooks over polling. The webhook_secret is returned only once on create - store it securely:

Reference

input (impl Into<String>, required) - research query or task description.
DeepResearchSearchConfig (passed via with_search()) controls which sources are queried. Request-level parameters are enforced and cannot be overridden by the agent.
Source presets: web, academic, finance, health, medical, chemistry, genomics, physics, patent, transportation, politics, legal, cybersecurity, environment, automotive, compliance, pulse. You can also pass dataset ids, domains, or collection:<name>. Date filters apply to both publication and event dates. See the DeepResearch Guide for full detail.
Up to 10 deliverables per task (csv, xlsx, pptx, docx, pdf), generated after research completes. Supported file types: PDFs, images (PNG, JPEG, WebP), and documents.
deepresearch_wait errors when the task is cancelled or the timeout is exceeded - use a longer timeout for heavy/max mode.