CLAUDE.md — Gajesh2007/open-deep-research
Open Deep Research with AI SDK
6/19/2026 · 15 viewsCLAUDE.md
Open Deep Research - TypeScript
Project Description
Open Deep Research is a configurable, fully open-source deep research agent built with TypeScript, Bun, and AI SDK v6. It works across multiple model providers via Vercel AI Gateway, uses Exa AI for search, and supports MCP (Model Context Protocol) servers for extended capabilities.
Repository Structure
Root Directory
package.json- Bun workspace root configurationtsconfig.base.json- Shared TypeScript configurationbiome.json- Biome linter/formatter configurationbunfig.toml- Bun configuration.env.example- Environment variables template
Packages (packages/)
Core (packages/core/)
Main research agent implementation:
src/agents/- Agent implementations (deep-researcher, supervisor, researcher)src/tools/- Tool definitions (exa-search, think-tool, conduct-research)src/prompts/- All prompt templatessrc/state/- TypeScript interfaces for agent statesrc/config/- Zod schemas and configurationsrc/mcp/- MCP client integration with AI SDKsrc/utils/- Token limits, message helpers
Shared (packages/shared/)
Shared types and constants:
src/types/- TypeScript interfacessrc/constants/- Default models, limits, tool names
Eval (packages/eval/)
Evaluation framework:
src/evaluators/- 6 evaluators using generateObjectsrc/prompts/- Evaluation promptssrc/runner.ts- Evaluation runner
Apps (apps/)
CLI (apps/cli/)
Command-line interface for running research
API (apps/api/)
HTTP API server (Hono)
Examples (examples/)
Research output examples (arxiv, pubmed, inference-market)
Key Technologies
- Runtime: Bun
- AI Framework: AI SDK v6 (beta) with
generateText,generateObject,tool() - Model Routing: Vercel AI Gateway (format:
provider/model-name) - Default Model:
openai/gpt-5.2 - Search: Exa AI
- Validation: Zod schemas
- MCP:
@ai-sdk/mcpfor Model Context Protocol integration
Development Commands
bun install # Install dependencies
bun run dev # Start development
bun run build # Build all packages
bun run typecheck # Type check all packages
bun run lint # Lint with Biome
bun run lint:fix # Fix lint issues
Running the CLI
bun run apps/cli/src/index.ts "Your research question"
Configuration
All settings configurable via:
- Environment variables (
.envfile) ResearchConfigobject passed torunDeepResearcher()
Key environment variables:
AI_GATEWAY_URL- Vercel AI Gateway URLEXA_API_KEY- Exa AI API key for search
Architecture
Hierarchical agent pattern:
- Deep Researcher - Main orchestrator (clarification, brief, final report)
- Supervisor - Delegates research topics to researchers in parallel
- Researcher - Executes searches and compresses findings
The supervisor uses stepCountIs(1) to intercept ConductResearch calls and spawn researcher subgraphs. Researchers execute multiple tool calls per API call for efficiency.
Source: Gajesh2007/open-deep-research · 3★ Repo: Open Deep Research with AI SDK