@forecastx/deep-research
Deep research tool for Pi-compatible agent CLIs with full streaming output
Package details
Install @forecastx/deep-research from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@forecastx/deep-research- Package
@forecastx/deep-research- Version
0.1.1- Published
- May 26, 2026
- Downloads
- not available
- Author
- yanjin734
- License
- MIT
- Types
- extension
- Size
- 28.3 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@forecastx/deep-research
Deep research tool for Pi-compatible agent CLIs with full streaming output.
Provides two tools that the LLM can call:
deep_research(query)— 5+ web searches, structured markdown report (1-3 min)super_deep_research(query)— multi-phase research with planning, 8-15 searches, 3000-8000 char report (2-5 min)
All intermediate steps (search calls, planning text, token usage) are streamed in real-time via the Pi extension onUpdate callback.
Install
pi install npm:@forecastx/deep-research
Or project-local:
pi install -l npm:@forecastx/deep-research
Or symlink for development:
ln -sf /path/to/packages/deep-research ~/.pi/agent/extensions/deep-research
Requirements
- Pi-compatible CLI (pi, forecastx, or any pi-mono fork)
- Web search tool available (via MCP or built-in) — the subprocess agent uses it to perform searches
- LLM API key configured in the host CLI
Provider Override
By default, the subprocess inherits the host CLI's configured provider and model. To override:
| Variable | Description |
|---|---|
RESEARCH_PROVIDER |
Provider name (e.g. anthropic, openai, deepseek, openrouter) |
RESEARCH_MODEL |
Model ID (e.g. claude-sonnet-4-20250514, gpt-4o, deepseek-chat) |
These map to --provider and --model flags on the subprocess.
How It Works
- The LLM calls
super_deep_research({ query: "..." }) - The extension spawns a
pi --mode json -p --no-sessionsubprocess with a research prompt - The subprocess performs multi-phase research using available search tools
- JSON events from stdout are parsed in real-time
- Each search call, text delta, and usage update is streamed back via
onUpdate - Final report is saved to
~/.forecastx-reports/<id>/and returned to the LLM
Streaming Output
The TUI shows live progress during research:
⏳ super_deep_research "2026 FIFA World Cup prediction"
researching (6 searches), 3 turns, 45s
→ web_search "2026 FIFA World Cup favorites odds"
→ web_search "France squad depth 2026"
→ web_search "Brazil national team form 2025-2026"
When complete:
✓ super_deep_research done
12 searches | 8 turns | 3m 24s | $0.0847
Report: a1b2c3d4e5f6
研究报告:2026年世界杯冠军预测分析
1. 摘要 (1.2k)
2. 背景与上下文 (0.8k)
3. 核心发现 (3.4k)
...
Reports
Reports are stored at ~/.forecastx-reports/ with structure:
<id>/
report.md — full markdown
meta.json — metadata (query, stats, summary, toc, sources)
sections/
01.md, 02.md — individual sections
Compatible CLIs
| CLI | Install |
|---|---|
| pi | pi install npm:@forecastx/deep-research |
| forecastx | forecastx install npm:@forecastx/deep-research |
| Any pi-mono fork | Same install command |
License
MIT