deep-research
Run deep research through DeepAPI and save a report with sources. Use when asked for deep research, DeepAPI research, or Perplexity deep research.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 4.3k
- Forks
- 626
01 前言 Front Matter
- name
- deep-research
- triggers
- [ "user", "model" ]
- description
- Run deep research through DeepAPI and save a report with sources. Use when asked for deep research, DeepAPI research, or Perplexity deep research.
- disable-model-invocation
- true
02 资源文件 1
- 参考文档agents/openai.yaml43 B
03 SKILL.md 正文
Deep Research
Use DeepAPI (POST /v1/research/deep) for all deep research.
API key
Read DEEPAPI_API_KEY from the environment, falling back to ~/.deepapi/env. Never source ~/.zshrc; it breaks the shell (exit 126).
[ -n "$DEEPAPI_API_KEY" ] || . ~/.deepapi/env
KEY=$DEEPAPI_API_KEY
BASE=${DEEPAPI_API_BASE_URL:-https://deepapi.co}
If the key is missing, stop and ask the user. Never print or log it. Get a key at deepapi.co.
1. Build the prompt
Follow the research-prompt skill. Write one self-contained paragraph:
- Lead with the main question and the decision it informs.
- Include all context and 3-6 numbered sub-questions. Keep one mission per prompt.
- State what to include or avoid. Prefer primary sources; separate fact from inference.
Field limits: query ≤ 4000 characters (the prompt), optional context ≤ 8000, optional instructions ≤ 2000. Do not send model or provider; the API rejects them.
2. Run it
One call returns a cited answer, targeting 700-1,120 words. The server allows up to ~5 minutes.
IDK=$(uuidgen) # keep this; retries must reuse the SAME Idempotency-Key
jq -n --rawfile p /tmp/dr_prompt.txt '{query:$p, maxCostUsd:"0.70"}' > /tmp/dr_body.json
curl -s --max-time 320 "$BASE/v1/research/deep" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDK" \
-d @/tmp/dr_body.json > /tmp/dr_result.json
Minimum maxCostUsd is "0.35". Default to "0.70"; ask the user before raising it.
3. Save the report
jq -r '.status' /tmp/dr_result.json # succeeded | failed
jq -r '.output.answer' /tmp/dr_result.json # the report
jq -r '.output.sources[]?.url' /tmp/dr_result.json # source URLs
Save a Markdown report with citation URLs beneath it. Only report costs if the user asks. If the answer has [n] citations but output.sources is empty, deliver it and tell the user.
For longer reports, run each numbered sub-question separately with its own Idempotency-Key, then combine the answers and sources into one Markdown file.
Failures and retries
- HTTP 402
insufficient_credits: stop for a top-up at deepapi.co/credits, then retry with the same Idempotency-Key. - HTTP 429
rate_limit_exceeded: waitRetry-Afterseconds, then retry once. status: failed/ HTTP 502: reportrequestIdanderror.message. Do not retry in a loop.- Reusing an Idempotency-Key returns HTTP 200 with
replayed: trueand no new charge. - See the
deepapiskill for envelope/auth details and other endpoints.
04 同仓库更多 Skills
varied-search
Research a topic across the web, GitHub, and X/Twitter with DeepAPI and produce a concise Markdown report. Use for varied-search or requests to compare web coverage, relevant repositories, and social discussion.
total-review
Run five independent max-effort reviews (Fable 5.1, Opus 5.5, GPT-6 Astra, GPT-6.1 Sol, Muse Wonder), merge their findings, and fix only what the user approves. Use for /total-review, or when the user or another agent asks for a total review.
stop-overthinking
Manually-invoked skill that stops overthinking and forces a short, practical decision. Use only when the user explicitly invokes stop-overthinking.
state
Manually-invoked skill that recaps what the current thread is doing and how far along it is. Use when the user says "state", "where are we", or "what % are we done".
setup-help
Guide setup one step at a time and show what remains. Use only when the user explicitly asks for it by name.
self-archive
Archive the current Cloudroom thread and release its runtime. Use only when the user explicitly asks to self-archive, archive yourself, or archive this thread.