
Valyu Cli
- 12 installs
- 10 repo stars
- Updated July 30, 2026
- valyuai/valyu-cli
Helps with ai & agent building tasks.
About
valyu-cli is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted development.
- valyu-cli
- AI & Agent Building
- AI-coding skill
Valyu Cli by the numbers
- 12 all-time installs (skills.sh)
- +2 installs in the week ending Aug 5, 2026 (Skillselion tracking)
- Ranked #11,618 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/valyuai/valyu-cli --skill valyu-cliAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 12 |
|---|---|
| repo stars | ★ 10 |
| Last updated | July 30, 2026 |
| Repository | valyuai/valyu-cli ↗ |
What it does
Helps with ai & agent building tasks.
Files
Valyu CLI
Terminal access to grounded, cited answers for knowledge work — DD briefs, earnings analyses, drug candidate shortlists, clinical trial trackers, ICP account lists, patent landscapes, and competitive research. Runs synchronously for quick lookups (search, answer, contents) and asynchronously for deeper workflows (deepresearch).
Command tree
valyu
├── search <type> <query> # one-shot search (web / paper / bio / finance / sec / patent / economics / news)
├── answer <query> # AI-synthesized answer with citations (streaming)
├── contents <urls...> # clean extraction from URLs (+ optional AI summary / structured schema)
├── deepresearch # async multi-step research agent
│ ├── create <query> [options] # with steering, deliverables, HITL, structured output
│ ├── list / status / watch
│ ├── update / cancel / delete / share
├── batch # parallel deepresearch jobs with shared config
├── sources # list available proprietary data sources
├── login / logout / whoami # auth
├── doctor # setup + connectivity check
├── upgrade # detect install source, show / run upgrade command
└── open # open platform / docs / API keys in browserAgent protocol (key patterns)
# Every command supports JSON output. Non-TTY auto-detects, -q forces it.
valyu search paper "GLP-1 obesity trials" -q
valyu deepresearch status <id> -q
# Stdin supported for: search, answer, contents, batch
echo "Tesla Q4 earnings key takeaways" | valyu answer - -q
# Async deep research: create returns immediately, watch blocks until done
ID=$(valyu deepresearch create "..." -q | jq -r .deepresearch_id)
valyu deepresearch watch "$ID" # internal 5s poll - DON'T loop status manually
valyu deepresearch update "$ID" "Also cover regulatory risk" # mid-flight steering
# Exit codes: 0 = success, 1 = error
# Error JSON: {"error":{"message":"...","code":"..."}}
# Webhook-driven async (no polling at all)
valyu deepresearch create "..." --webhook-url https://your-app.com/hook -qGlobal flags
| Flag | Description |
|---|---|
--api-key <key> | Override API key for this invocation |
-p, --profile <name> | Select stored profile |
--json | Force JSON output |
-q, --quiet | Suppress spinners (implies --json) |
Auth resolves: --api-key flag > VALYU_API_KEY env > stored config (valyu login).
Deliverables — generated files alongside the report
deepresearch can produce CSV / XLSX / PPTX / DOCX / PDF files alongside the markdown report. Use this when the user wants both a narrative and machine-parseable data.
Passing deliverables — two shapes:
1. String (natural language, lets the agent pick the file type)
--deliverable "CSV of Phase 3 CAR-T trials: NCT ID, sponsor, indication, phase, enrollment, endpoint, status"2. Object in a JSON file (pin file type + columns) via --deliverables-file <path>:
[
{ "type": "csv", "description": "Top 20 Series A AI startups 2026",
"columns": ["company", "founders", "hq_city", "round_size_usd", "round_date", "lead_investor"] },
{ "type": "xlsx", "description": "Investor landscape: top VCs leading AI Series A rounds" },
"One-page PDF executive summary of the landscape"
]The array can mix objects and plain strings. Object type must be one of: csv, xlsx, pptx, docx, pdf.
--deliverable is repeatable and merges with --deliverables-file. Base mode price covers 1 deliverable; each additional adds $0.10.
Common knowledge-work recipes:
| Use case | Example |
|---|---|
| PE / M&A target list | --deliverable "CSV of targets: company, HQ, revenue, EBITDA, owner, last financing" |
| Drug candidate shortlist | --deliverable "XLSX of molecules: name, target, MoA, developer, phase, NCT ID" |
| Clinical trial tracker | --deliverable "CSV of trials: NCT ID, sponsor, indication, phase, enrollment, endpoint, status" |
| Financial peer comp | --deliverable "XLSX comparing revenue, margin, growth across peer group" |
| GTM account list | --deliverable "CSV of accounts: company, website, HQ, signals, key people, last funding" |
| Competitive deck | --deliverable "PPTX one slide per competitor + positioning matrix + conclusion" |
| Patent landscape | --deliverable "CSV of patents: number, assignee, filing date, title, forward citations" |
Details + download recipe: references/deepresearch.md
Recipes by domain
Private equity / DD
# Target DD brief + management CSV
valyu deepresearch create \
"<Target Co> - DD brief: management, loan book, regional position, regulatory posture" \
--mode heavy \
--deliverable "CSV of top management: name, title, tenure, prior roles, notable transactions" \
--deliverable "CSV of loan book concentration: sector, geography, approximate % of portfolio" \
--watchFinance / equity research
valyu deepresearch create \
"NVDA Q4 earnings: guidance, datacenter segment, gross margin trajectory, forward risks" \
--report-format "Sell-side style 2-page brief with peer comparison table" \
--watchHealthcare / life sciences
# Drug candidate landscape + XLSX
valyu deepresearch create \
"Clinical-stage oral GLP-1 agonists in obesity indication" \
--research-strategy "Prioritize ClinicalTrials.gov, FDA labels, PubMed abstracts over press releases" \
--deliverable "XLSX: molecule, developer, mechanism, phase, indication, enrollment, NCT ID, ChEMBL ID" \
--deliverable "One-page PDF ranking top 5 by commercial promise" \
--watch
# Clinical trial tracker
valyu deepresearch create \
"Phase 3 CAR-T trials in solid tumors currently recruiting" \
--mode fast \
--deliverable "CSV: NCT ID, sponsor, indication, target antigen, phase, enrollment, start date, primary endpoint, status" \
--watchGTM / sales / recruiting
valyu deepresearch create \
"Series A/B AI infrastructure startups in NYC hiring platform engineers" \
--country US \
--deliverable "CSV: company, website, founders, HQ, last round size/date/lead, product one-liner, open platform engineering roles" \
--watchCompetitive / market research
valyu deepresearch create \
"Competitive landscape of enterprise AI coding assistants" \
--mode heavy \
--deliverable "PPTX: title + one slide per competitor (product, pricing, funding, customers, differentiation) + positioning matrix + conclusion" \
--deliverable "CSV feature matrix across 12 dimensions" \
--watchWhen to use which command
| User intent | Command |
|---|---|
| Quick factual question with citations | valyu answer "..." |
| Find papers / filings / trials / patents on a topic | valyu search <type> "..." |
| Pull clean text from a URL (or extract structured data) | valyu contents <url> [--structured] |
| Comprehensive research + cited report (± deliverables) | valyu deepresearch create "..." |
| Many parallel deepresearch tasks with shared config | valyu batch create ... |
| Discover available proprietary data sources | valyu sources list |
| Upgrade the CLI itself | valyu upgrade |
Search types (for valyu search <type>)
| Type | Sources | Best for |
|---|---|---|
web | Web | General lookups, current events |
news | News outlets | Breaking stories, recent coverage |
paper | arXiv, PubMed, bioRxiv, medRxiv | Academic research |
bio | PubMed, bioRxiv, medRxiv, ClinicalTrials.gov, FDA labels | Life sciences / clinical |
finance | SEC filings, stocks, earnings, balance sheet, cashflow, insider, crypto, forex | Financial data |
sec | SEC filings only | 10-K / 10-Q / 8-K research |
patent | Global patents | IP / patent landscape |
economics | BLS, FRED, World Bank, USAspending | Macro / economic indicators |
Deep research modes
| Mode | Time | Price | Use |
|---|---|---|---|
fast | ~5 min | $0.10 | Quick lookups, structured extraction, high-volume batches |
standard | ~10-20 min | $0.50 | Most research tasks (default) |
heavy | ~60 min | $2.50 | Deep analysis, comparative reports, DD briefs |
max | up to ~2 hrs | $15.00 | Exhaustive research, maximum depth |
Common mistakes
| # | Mistake | Fix |
|---|---|---|
| 1 | Using valyu research | The command is valyu deepresearch |
| 2 | Polling status in a tight loop | Use valyu deepresearch watch <id> (5s internal poll) |
| 3 | --structured + --output-format markdown | Structured replaces markdown/PDF. Use deliverables for "report + structured data". Only toon can accompany a structured schema. |
| 4 | Over-scoping with --include-source | Let the agent pick sources — it picks well. Only use --include-source when you must narrow to a specific dataset, never as a default. |
| 5 | Vague deliverable descriptions | Specify columns, units, filters explicitly (e.g. "NCT ID, sponsor (company), enrollment (integer, actual)") |
| 6 | Not using -q in pipelines | -q suppresses spinners and forces JSON |
| 7 | Expecting synchronous deep research | create returns immediately; use --watch or poll status |
| 8 | Watching by ID that's already completed | watch returns instantly with the final result |
When to load each reference
- Deep research / deliverables / HITL / structured output → references/deepresearch.md
- Search (web / paper / finance / sec / bio / patent / economics / news) → references/search.md
- AI answer (`answer`) → references/answer.md
- URL content extraction (`contents`) → references/contents.md
- Auth, profiles, login → references/auth.md
- Error codes → references/error-codes.md
valyu answer
Get an AI-synthesized answer to a question, backed by real-time search.
Syntax
valyu answer <query> [options]Options
| Flag | Description |
|---|---|
--fast | Use fast mode: lower latency, web sources prioritized |
Output (JSON)
{
"answer": "Markdown-formatted answer text...",
"sources": [
{ "title": "Source Title", "url": "https://example.com" }
],
"data_type": "unstructured",
"cost": 0.032
}Examples
# General knowledge question
valyu answer "What are the key differences between GPT-4 and Claude 3.5?"
# Fast mode for time-sensitive queries
valyu answer "Current Federal Reserve interest rate" --fast
# Technical question
valyu answer "How does attention mechanism work in transformer models?"
# Market/financial question
valyu answer "What was Nvidia's revenue growth in FY2025?"
# Research summary
valyu answer "Summarize recent advances in protein folding prediction"Agent Tips
answeruses LLM synthesis on top of search - costs more thansearchbut returns a direct answer- For structured data extraction, use
search+ parsecontentfields - Use
--fastwhen the question is about current/recent information (finance, news) - The
answerfield is markdown - render it appropriately for the user sourcesarray can be used to cite references
valyu auth
Authentication and credential management.
login
Store a Valyu API key.
valyu login [--key <key>] [--profile <name>]| Flag | Description |
|---|---|
--key <key> | API key to store (required in non-interactive mode) |
--profile <name> | Profile name (default: "default") |
Interactive: Shows link to platform.valyu.ai/user/account/apikeys, then prompts for key.
Non-interactive (CI/agents):
valyu login --key val_xxx --profile production
# → {"success":true,"config_path":"...","profile":"production"}logout
valyu logout [--profile <name>] [--yes]- Without
--profile: removes all credentials - With
--profile: removes only that profile --yes: skips confirmation prompt
whoami
Show current auth status.
valyu whoamiOutput:
{
"authenticated": true,
"profile": "default",
"api_key": "val_xxx...abcd",
"source": "config",
"config_path": "/Users/you/.config/valyu/credentials.json"
}Source values: "flag" | "env" | "config"
Key Resolution Order
1. --api-key flag (per-command override, not stored) 2. VALYU_API_KEY environment variable 3. Config file at ~/.config/valyu/credentials.json
For CI/CD
Never use valyu login in CI. Set VALYU_API_KEY as an environment variable:
VALYU_API_KEY=val_xxx valyu search web "query" -qOr use --api-key:
valyu search web "query" --api-key val_xxx -qConfig File Location
- macOS/Linux:
~/.config/valyu/credentials.json - Windows:
%APPDATA%\valyu\credentials.json - Override:
$XDG_CONFIG_HOME/valyu/credentials.json
Profile Format
{
"active_profile": "default",
"profiles": {
"default": { "api_key": "val_xxx" },
"production": { "api_key": "val_yyy" }
}
}valyu contents
Extract clean, structured content from web pages. Handles paywalls and dynamic content.
Syntax
valyu contents <urls...> [options]Options
| Flag | Default | Description |
|---|---|---|
-s, --summary [instructions] | - | Generate AI summary (optional custom instructions) |
-l, --length <length> | medium | Response length: short (25k), medium (50k), large (100k), max |
Output (JSON)
{
"results": [
{
"title": "Article Title",
"url": "https://example.com",
"content": "Full extracted text...",
"summary": "AI-generated summary (if requested)",
"length": 12840,
"data_type": "unstructured"
}
],
"urls_requested": 1,
"urls_processed": 1,
"urls_failed": 0,
"total_cost": 0.001
}Examples
# Extract content from a URL
valyu contents https://techcrunch.com/2026/01/ai-funding-roundup
# Extract with AI summary
valyu contents https://arxiv.org/abs/2501.00001 --summary
# Custom summary instructions
valyu contents https://sec.gov/filing.htm --summary "Extract key risk factors as bullet points"
# Multiple URLs at once (up to 10)
valyu contents https://site1.com https://site2.com https://site3.com
# Full document extraction
valyu contents https://long-report.com --length large
# JSON output for agents
valyu contents https://example.com --summary -qAgent Tips
- Maximum 10 URLs per request - batch larger lists
- Use
--length largeor--length maxfor academic papers and long-form documents --summaryadds cost but returns a compact summary - use for quick extraction- Failed URLs return
{"url":"...","error":"..."}in results, not a top-level error urls_failed > 0in the response indicates partial failures; check individual results
valyu deepresearch
Async multi-step research agent. Searches multiple sources, optionally executes code, generates a report with citations, and optionally produces structured deliverables (CSV / XLSX / PPTX / DOCX / PDF) alongside the report.
create returns immediately with a task ID. The task runs in the background — poll status, block on watch, or set --webhook-url.
The command is valyu deepresearch (not valyu research).
Subcommand tree
valyu deepresearch
├── create <query> [options] # start a task
├── list [--limit N] # list recent tasks
├── status <id> # check a task
├── watch [id] # poll until terminal (omit id → latest running)
├── update <id> <instruction> # inject follow-up instruction mid-flight
├── cancel <id> # cancel a running / queued / paused task
├── delete <id> # remove a completed / failed / cancelled task
└── share <id> # toggle public share linkQuick start
# Minimal fast task
valyu deepresearch create "Current state of nuclear fusion commercialization" --mode fast --watch
# Research + CSV deliverable alongside the markdown+PDF report
valyu deepresearch create "Top 15 Phase 3 CAR-T clinical trials in oncology 2024" \
--mode standard \
--deliverable "CSV of trials: NCT ID, sponsor, indication, phase, primary endpoint, enrollment" \
--watch
# Structured JSON only (no markdown / PDF)
valyu deepresearch create "Top 10 Series C AI infrastructure startups 2024" \
--mode fast \
--structured-file schema.json \
--watchModes
| Mode | Time | Price | Best for |
|---|---|---|---|
fast | ~5 min | $0.10 | Quick lookups, lists, structured extraction, high-volume batches |
standard | ~10-20 min | $0.50 | Most research tasks (default) |
heavy | ~60 min | $2.50 | Deep analysis, comparative reports |
max | up to ~2 hrs | $15.00 | Maximum depth, exhaustive research |
Deliverables — structured files alongside the report
Deliverables are additional files generated alongside the markdown/PDF report: CSVs, Excel workbooks, PowerPoint decks, Word docs, PDFs. The agent extracts structured data from its research and populates them. You get both a narrative report and machine-parseable data in one run.
When to use deliverables (vs `--structured`):
| Want | Use |
|---|---|
| Both a narrative report AND a structured file | deliverables |
| Structured JSON with no report | --structured-file / --structured |
Common deliverable recipes
| Use case | Example --deliverable description |
|---|---|
| Drug candidate shortlist | "XLSX of molecules: name, primary target, mechanism, phase, developer, ChEMBL ID" |
| Clinical trial tracker | "CSV of trials: NCT ID, sponsor, indication, phase, enrollment, primary endpoint, status, start date" |
| Company lead list | "CSV of companies: name, HQ city, founders, total funding, last round date, product one-liner" |
| Competitive landscape deck | "PPTX with one slide per competitor covering product, pricing, funding, and differentiation" |
| Financial comparison | "XLSX comparing Q4 2024 revenue, YoY growth, gross margin, and segment breakdown for Big Tech" |
| Regulatory filings summary | "DOCX brief summarizing the five most recent SEC 10-K risk-factor sections" |
| Patent landscape | "CSV of patents: patent number, assignee, filing date, title, abstract, forward citation count" |
Passing deliverables — two forms
Form 1 — Natural language (`--deliverable`, repeatable): agent picks the file type from your description.
valyu deepresearch create "GLP-1 receptor agonists approved since 2020" \
--deliverable "CSV of drugs: name, manufacturer, FDA approval date, indication, MoA" \
--deliverable "One-page PDF executive summary of the competitive landscape" \
--deliverable "XLSX comparing efficacy, adverse events, and pricing across drugs" \
--watchForm 2 — Structured JSON (`--deliverables-file`): pin file type, columns, and (for pptx) slide count.
[
{
"type": "csv",
"description": "Top 20 Series A AI startups raised in 2026",
"columns": ["company", "founders", "hq_city", "round_size_usd", "round_date", "lead_investor", "category"]
},
{
"type": "xlsx",
"description": "Investor landscape: VCs leading the most AI Series A rounds"
},
{
"type": "pptx",
"description": "Investor briefing deck: landscape overview + top 10 founders + breakout companies",
"slides": 12
},
"One-page PDF executive summary of the landscape"
]valyu deepresearch create "Top 20 Series A AI startups" \
--deliverables-file deliverables.json \
--watchBoth forms combine — --deliverable strings and --deliverables-file entries merge into a single deliverables list (max 10 total).
Deliverable object fields
| Field | Type | Notes |
|---|---|---|
type | `"csv" \ | "xlsx" \ |
description | string (≤ 500 chars) | Required. Be specific about columns, units, filters |
columns | string[] | Column hints for csv/xlsx |
slides | number | Suggested slide count for pptx |
String-form deliverables accept up to 2000 chars. Per-request cap: 10 deliverables total.
Deliverable pricing
Base mode price covers 1 deliverable. Each additional deliverable adds $0.10. Check cost_breakdown.deliverables on the completed task.
Deliverable result shape
On completion, each deliverable appears in status.deliverables[]:
{
"id": "del_a1b2c3d4",
"request": "CSV of trials: NCT ID, sponsor, indication, phase",
"type": "csv",
"status": "completed",
"title": "Phase 3 CAR-T Trials in Oncology 2024.csv",
"description": "14 trials across six indications; all active or completed recruitment",
"url": "https://api.valyu.ai/v1/deepresearch/tasks/.../assets/...?token=...",
"row_count": 14,
"column_count": 7,
"created_at": 1718444640000
}Download via:
URL=$(valyu deepresearch status <id> -q | jq -r '.deliverables[] | select(.type=="csv") | .url')
curl -L "$URL" -o trials.csvThe url is token-signed and tied to the task — no auth header needed.
Writing good deliverable descriptions
Be specific about columns and units. The agent uses your description to design the schema.
Good (specific columns, units, and filters):
"CSV of Phase 3 oncology trials 2024:
NCT ID, sponsor (company name), indication (cancer type),
enrollment (integer, actual not target), primary endpoint (text),
status (recruiting/active/completed), start date (YYYY-MM-DD)"Less specific (will get inconsistent output):
"CSV of trials"Good (scoped and typed):
"XLSX of Top 20 AI Series A raises in 2024:
company name, founders (comma-separated), HQ city,
round size in millions USD (float), round date (YYYY-MM-DD),
lead investor, product category (one of: infrastructure, application, tooling, model)"Less specific:
"Excel of AI startups and their info"create — full options
valyu deepresearch create <query> [options]Steering
| Flag | Description |
|---|---|
-m, --mode <mode> | Depth: fast / standard (default) / heavy / max |
--research-strategy <text> | Guide the research phase (how to search, which angles to prioritize) |
--report-format <text> | Guide the final report shape (length, tone, sections, tables) |
research_strategy + report_format combined length must stay under 15,000 characters.
Context
| Flag | Description |
|---|---|
--url <url> | Seed URL to include in research (repeatable, max 10) |
--file <path> | File to attach, auto base64-encoded (repeatable, max 10). PDF/TXT/MD/CSV/JSON/DOCX/XLSX/PPTX/PNG/JPG |
--file-context <text> | Optional guidance for a specific file (repeatable, pairs positionally with --file; max 10,000 chars each) |
--previous-report <id> | Previous deepresearch_id as context (repeatable, max 3) |
File + file-context pairing is positional — the Nth --file-context attaches to the Nth --file:
valyu deepresearch create "Brief on these two documents" \
--file ./target-overview.pdf --file-context "Acquirer's strategic rationale memo" \
--file ./financials-q4.xlsx --file-context "Management's own cut, not audited - highlight discrepancies"Output
| Flag | Description |
|---|---|
--output-format <fmt> | Repeatable: markdown, pdf, toon. Default: markdown+pdf |
--no-pdf | Skip PDF (shorthand for --output-format markdown) |
--structured <json> | Inline JSON schema → structured JSON output (replaces markdown/PDF) |
--structured-file <path> | Read JSON schema from file (same effect as --structured) |
--structured / --structured-file cannot combine with markdown/pdf/toon. toon requires a JSON schema alongside it.
Search config
| Flag | Description |
|---|
All of these are advanced — the agent picks sources and scope well on its own, and hard constraints here usually shrink the usable result set and hurt quality. Only reach for them when you have a concrete reason.
| Flag | Description |
|---|---|
--search-type <type> | [advanced] all (default), web, proprietary |
--include-source <id> | [advanced] Source to include, repeatable (dataset IDs, domains) |
--exclude-source <id> | [advanced] Source to exclude, repeatable |
--source-bias <src>=<int> | [advanced] Bias a source up or down in ranking (repeatable). Integer -5 to +5; applies to every internal search the agent runs |
--country <code> | [advanced] ISO 3166-1 alpha-2 code for geo-targeted web search |
--start-date <date> | [advanced] Earliest publication date (YYYY-MM-DD) |
--end-date <date> | [advanced] Latest publication date (YYYY-MM-DD) |
Tools
| Flag | Description |
|---|---|
--code-execution | Sandboxed Python execution for computations, parsing, analysis (+$0.10 per execution) |
--screenshots | Visual screenshot capture of web pages, useful for dashboards/charts (+$0.05 per URL) |
--browser-use | Autonomous browser navigation - lets the agent click through interactive pages / multi-step flows |
--mcp-config <path> | JSON file describing up to 5 MCP servers to expose to the agent. File-based to keep auth tokens out of shell history |
MCP config file format — each entry describes one MCP server:
[
{
"url": "https://mcp.example.com/tools",
"name": "internal-tools",
"tool_prefix": "ex",
"auth": { "type": "bearer", "token": "..." },
"allowed_tools": ["lookup", "query"]
}
]Auth forms: {"type": "none"}, {"type": "bearer", "token": "..."}, or {"type": "header", "headers": { "X-Api-Key": "..." }}.
Deliverables
| Flag | Description |
|---|---|
--deliverable <desc> | Natural language description (repeatable, max 10 total) |
--deliverables-file <path> | JSON array of structured deliverable specs |
Notifications
| Flag | Description |
|---|---|
--webhook-url <url> | HTTPS URL to POST to on completion. HMAC-SHA256 signed. Response includes webhook_secret |
--alert-email <email> | Email address to notify (must belong to your org) |
Metadata
| Flag | Description |
|---|---|
--metadata <key=value> | Attach metadata (repeatable). Values auto-typed: true/false → bool, numeric → number, else string |
Human-in-the-loop
| Flag | Description |
|---|---|
--hitl <list> | Comma-separated checkpoints: planning-questions, plan-review, source-review, outline-review |
When a HITL checkpoint fires, status becomes awaiting_input (or paused if timed out — still resumable). Use valyu deepresearch watch to respond interactively.
status / watch response shapes
Running
{
"deepresearch_id": "a1b2c3d4-...",
"status": "running",
"query": "...",
"mode": "standard",
"progress": { "current_step": 5, "total_steps": 15 }
}Completed (markdown report + deliverables)
{
"deepresearch_id": "a1b2c3d4-...",
"status": "completed",
"query": "...",
"mode": "standard",
"output_type": "markdown",
"output": "# Report\n\n## Executive Summary...",
"pdf_url": "https://storage.valyu.ai/pdfs/...",
"sources": [ { "title": "...", "url": "...", "snippet": "...", "source": "pubmed" } ],
"deliverables": [
{ "id": "del_...", "type": "csv", "status": "completed", "title": "...", "url": "...", "row_count": 14, "column_count": 7 }
],
"images": [ { "image_id": "img_...", "image_type": "chart", "image_url": "...", "chart_type": "bar" } ],
"cost": 0.30,
"cost_breakdown": { "task": 0.10, "deliverables": 0.20 },
"completed_at": "2024-06-15T10:42:00.000Z"
}Completed (structured JSON)
{
"deepresearch_id": "...",
"status": "completed",
"output_type": "json",
"output": { "companies": [ {"name": "Lambda", "valuation_billions": 1.5, "hq_city": "San Jose"} ] },
"sources": [ ... ],
"cost": 0.10
}Awaiting HITL input
{
"status": "awaiting_input",
"interaction": {
"interaction_id": "int_...",
"type": "plan_review",
"data": {
"plan": "...",
"estimated_steps": 12,
"research_areas": ["market sizing", "competitive landscape", "regulatory"]
}
}
}Status lifecycle
queued → running ─────────────┬─→ completed
├─→ failed
└─→ cancelled
running → awaiting_input → running (HITL checkpoint, user responded)
→ paused → running (HITL timed out, still resumable)Recipes
Drug candidate shortlist (XLSX + markdown report)
valyu deepresearch create \
"Pre-clinical and clinical stage GLP-1 combination therapies targeting obesity" \
--mode standard \
--research-strategy "Prioritize primary sources: ClinicalTrials.gov, FDA drug labels, PubMed abstracts" \
--deliverable "XLSX of candidates: molecule name, mechanism (primary + secondary targets), developer, clinical phase, lead indication, NCT IDs if applicable, ChEMBL ID if available" \
--deliverable "One-page PDF executive summary ranking the top 5 by commercial promise" \
--watchClinical trial tracker (CSV)
valyu deepresearch create \
"Phase 3 CAR-T clinical trials in solid tumors currently recruiting" \
--mode fast \
--deliverable "CSV of trials: NCT ID, sponsor, indication, target antigen, phase, enrollment, start date, primary endpoint, status" \
--watchCompany lead list (CSV)
valyu deepresearch create \
"Seed and Series A AI startups in NYC building developer tools" \
--mode standard \
--country US \
--deliverable "CSV of companies: name, website, founders (with LinkedIn if public), HQ address, total funding USD, last round (type + date + lead), product one-liner, tech stack hints" \
--watchCompetitive landscape (PPTX deck)
valyu deepresearch create \
"Competitive landscape of enterprise AI coding assistants" \
--mode heavy \
--deliverable "PPTX: title slide + one slide per competitor (product, pricing, funding, customer logos, differentiators) + positioning matrix slide + conclusion slide" \
--deliverable "CSV comparison matrix of all competitors across 12 feature dimensions" \
--watchFollow-up research (mid-flight update)
# Kick off the task
ID=$(valyu deepresearch create "..." --mode standard -q | jq -r .deepresearch_id)
# Before the writing phase begins, inject a steering instruction
valyu deepresearch update $ID "Also cover regulatory risk and EU-specific market dynamics"
# Continue watching
valyu deepresearch watch $IDStructured output with a known schema
cat > schema.json <<'EOF'
{
"type": "object",
"properties": {
"companies": {
"type": "array",
"items": {
"type": "object",
"required": ["name", "valuation_billions", "hq_city"],
"properties": {
"name": { "type": "string" },
"valuation_billions": { "type": "number" },
"hq_city": { "type": "string" },
"last_round_date": { "type": "string", "format": "date" }
}
}
}
},
"required": ["companies"]
}
EOF
valyu deepresearch create "Top 10 generative AI unicorns 2024" \
--mode fast --structured-file schema.json --watchAsync with webhook
valyu deepresearch create "..." \
--mode heavy \
--webhook-url "https://your-app.com/valyu/webhooks" \
--deliverable "CSV: ..."
# → returns webhook_secret for HMAC verificationTroubleshooting — keyed on error strings
"TOON output format requires a JSON schema. Include a schema object in output_formats."
toon cannot stand alone. Combine with --structured/--structured-file, or drop toon from --output-format.
"--structured / --structured-file cannot be combined with --output-format"
Structured JSON replaces markdown and PDF. Remove --output-format when using --structured*. If you want both a markdown report AND structured data, use deliverables instead.
"Invalid --metadata 'foo'. Expected format: key=value"
Each --metadata value must be key=value. Repeat the flag for multiple entries: --metadata key1=v1 --metadata key2=v2.
"Invalid --hitl checkpoint 'foo'. Valid: planning-questions, plan-review, source-review, outline-review"
Use hyphenated names (not underscore). Multiple checkpoints are comma-separated: --hitl plan-review,source-review.
"Use --structured or --structured-file, not both"
Mutually exclusive; choose one.
"File not found: <path>" (from --structured-file / --deliverables-file / --file)
Path resolves relative to the working directory. Use an absolute path if unsure.
"No running tasks" (from watch without an ID)
There are no running / queued / awaiting_input tasks on the current API key. Pass a specific task ID.
Task status is failed
Check status.error for the reason. Common causes: query too ambiguous, all sources filtered out, sandbox crash during code execution. Retry with a narrower query and/or without --code-execution.
Task status is paused (HITL)
A checkpoint timed out. State is preserved — respond via the API (POST /deepresearch/tasks/{id}/respond) and the task resumes, or valyu deepresearch cancel <id>.
Agent protocol
createreturns immediately withstatus: "running"orstatus: "queued"— capturedeepresearch_idand use it for every follow-up call.- Don't poll
statusin a tight loop — usevalyu deepresearch watch <id>(internally paced at 5s). For async workflows, set--webhook-url. - Deliverable
urlfields are token-signed; download with plaincurl -L(no auth header). outputis a markdown string whenoutput_type: "markdown"and a JSON object whenoutput_type: "json". Branch onoutput_type.progress.total_stepsis an estimate — can increase mid-task.- Costs are final on
completed;cost_breakdownis only present on terminal states. - For high-volume workflows, use batches (
valyu batch --help) — shared config, parallel execution, unified tracking.
Error Codes
All errors are returned as JSON with error.message and error.code:
{"error":{"message":"Human-readable message","code":"error_code"}}Authentication Errors
| Code | Cause | Fix |
|---|---|---|
not_authenticated | No API key found | Run valyu login or set VALYU_API_KEY |
invalid_key_format | Key doesn't start with val_ | Check key format |
missing_key | --key required in non-interactive mode | Pass --key val_xxx |
validation_failed | Key rejected by Valyu API | Check key is active at platform.valyu.ai |
http_401 | Unauthorized | API key invalid or expired |
http_403 | Forbidden | Insufficient permissions for this operation |
Search Errors
| Code | Cause | Fix |
|---|---|---|
invalid_search_type | Unknown search type | Use: web, paper, bio, finance, sec, patent, economics, news |
http_429 | Rate limit exceeded | Slow down requests |
http_402 | Insufficient credits | Top up at platform.valyu.ai |
Research Errors
| Code | Cause | Fix |
|---|---|---|
invalid_model | Unknown model | Use: fast, lite, heavy |
research_failed | Task failed server-side | Retry or check query |
research_cancelled | Task was cancelled | Create a new task |
timeout | Watch timed out (>90 min) | Use research status <id> to check later |
Network Errors
| Code | Cause | Fix |
|---|---|---|
network_error | Cannot reach api.valyu.network | Check internet connection |
http_500 | Server error | Retry; check status.valyu.ai |
Contents Errors
| Code | Cause | Fix |
|---|---|---|
too_many_urls | >10 URLs in one request | Split into batches of 10 |
General
| Code | Cause | Fix |
|---|---|---|
unexpected_error | Unhandled exception | Report at github.com/valyu-network/valyu-cli/issues |
Exit Codes
0- Success1- Error (check JSON for details)
valyu search
Synchronous search across web, academic, financial, and specialised sources. Ranked results with extracted content, ready for RAG or downstream processing.
Syntax
valyu search <type> <query> [options]
valyu search <query> [options] # defaults to web
echo "query" | valyu search - # stdinThe <type> positional is a curated bundle that sets search_type + a sensible included_sources default. See the table below.
Search types (positional)
| Type | Backing sources | Best for |
|---|---|---|
web | Web | General lookups, news, product pages |
news | News outlets | Breaking stories, recent coverage |
paper | arXiv, PubMed, bioRxiv, medRxiv | Academic research |
bio | PubMed, bioRxiv, medRxiv, ClinicalTrials.gov, FDA labels | Life sciences / clinical |
finance | SEC filings, stocks, earnings, balance sheet, cashflow, insider, crypto, forex | Financial data |
sec | SEC filings only | 10-K / 10-Q / 8-K research |
patent | Global patents | IP landscape / prior art |
economics | BLS, FRED, World Bank, USAspending | Macro / economic indicators |
Options
Core
| Flag | Description |
|---|---|
-n, --limit <number> | Results count (1-20; higher on request). Default 10 |
--max-price <number> | Max budget in CPM (cost per mille tokens retrieved) |
--relevance-threshold <float> | Filter results below this score (0.0-1.0). Default 0.5 |
-l, --response-length <len> | Content length per result: short (25k), medium (50k), large (100k), max, or a positive integer |
--instructions <text> | Natural-language ranking instructions (max 500 chars; ignored with --fast-mode) |
Scoping (overrides for the positional type)
| Flag | Description |
|---|---|
--search-type <type> | Force all / web / proprietary / news |
--include-source <src> | Include a source (repeatable). Domains, dataset IDs, or collection:NAME |
--exclude-source <src> | Exclude a source (repeatable) |
--source-bias <src>=<int> | Bias a source up or down in ranking (repeatable). Integer -5 to +5 |
--country <code> | ISO 3166-1 alpha-2 country code for geo-targeted web search |
--start-date <date> | Earliest publication date (YYYY-MM-DD) |
--end-date <date> | Latest publication date (YYYY-MM-DD) |
Advanced
| Flag | Description |
|---|---|
--fast-mode | Skip query rewriting + reranking for lower latency. Forces web-only; lower-quality results. Use only when you genuinely need sub-second latency |
--url-only | Return just URLs without full content extraction (web / news only). Skips reranking |
--no-tool-call | Mark request as non-tool-call. Affects internal query rewriting |
Output (JSON, shortened)
{
"success": true,
"tx_id": "tx_...",
"query": "the query",
"results": [
{
"id": "https://arxiv.org/abs/2401.12345",
"title": "...",
"url": "https://arxiv.org/abs/2401.12345",
"content": "...",
"source": "valyu/valyu-arxiv",
"relevance_score": 0.92,
"data_type": "unstructured",
"source_type": "paper",
"publication_date": "2024-01-15",
"doi": "10.48550/arXiv.2401.12345",
"authors": ["J. Smith", "A. Chen"]
}
],
"results_by_source": { "web": 3, "proprietary": 2 },
"total_deduction_dollars": 0.0075,
"total_characters": 45230
}Examples
# Broad web search
valyu search "current state of nuclear fusion commercialization"
# Academic papers
valyu search paper "transformer attention mechanism" -n 20
# Clinical trial + FDA data
valyu search bio "GLP-1 receptor agonist obesity clinical trials"
# Financial data
valyu search finance "NVDA Q4 earnings datacenter segment guidance"
# SEC filings
valyu search sec "Apple 10-K risk factors competitive"
# Date-scoped web search
valyu search "AI model releases" --start-date 2024-01-01 --end-date 2024-12-31
# Ranking instructions for nuance
valyu search paper "CRISPR therapeutics" \
--instructions "Prioritize Phase 3 clinical trials and safety data over in vitro studies"
# Relevance threshold for high-precision
valyu search "GLP-1 combination therapies" --relevance-threshold 0.9 -n 20
# Larger content per result (for longer articles / reports)
valyu search paper "quantum error correction" --response-length mediumAgent tips
- Non-TTY auto-emits JSON; use
-qin pipelines to force it and suppress spinners. relevance_scoreis 0-1; filter at>0.7for high precision,>0.5(default) for recall.secis for filings;financeis for prices + fundamentals. Don't mix them for a single lookup.biois a superset ofpaperfor life sciences — it adds clinical trials and FDA drug labels.--fast-modeskips reranking entirely — results are noticeably worse. Only use for tight latency budgets.--url-onlyis useful when you want to pipe URLs intovalyu contentsfor selective extraction.