Skip to main content
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 TypeScript SDK method reference.

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

Open in Cursor

Basic usage

Research modes

The deprecated lite mode maps to standard. max requires at least $15 in available credits.

Output formats

You cannot mix a JSON Schema with markdown/pdf. TOON format also requires a JSON schema.

Waiting for completion

In production, prefer webhooks over polling. The webhook_secret is returned only once on create - store it immediately:

Reference

query (string, required) - research query or task description.
All tools are off by default. You enable them; the agent decides when to use them. Each accepts a boolean or { enabled: boolean, max_calls: number } (max_calls can only be lowered from the system default).
Generated screenshots and charts appear in result.images with image_type of "screenshot" or "chart". See Pricing for surcharges. Code execution is Python-only with a 30s default timeout (5-60s); screenshots are capped at 15 per task and 5 MB each.
Generate formatted documents from the research (max 10 per task, produced after research completes). Use simple strings or the typed Deliverable:
Each DeliverableResult has id, type, status, title, url (token-signed, expires), row_count/column_count (CSV/Excel), and error if failed.
Supported file types: PDFs, images (PNG, JPEG, WebP), and documents.
cost is the total price (base mode + tool surcharges); cost_breakdown itemizes it.
Follow-up instructions via update() are only accepted before the writing phase starts.

See also

DeepResearch Guide

Search config, webhooks, and use cases

Batch Processing

Run many research tasks in parallel

Human-in-the-loop

Pause at checkpoints to guide the agent

API Reference

REST endpoint documentation