RepoPilotOpen in app →

langchain-ai/open_deep_research

Healthy

Healthy across the board

weakest axis
Use as dependencyHealthy

Permissive license, no critical CVEs, actively maintained — safe to depend on.

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 1w ago
  • 15 active contributors
  • Distributed ownership (top contributor 49% of recent commits)
Show all 6 evidence items →
  • MIT licensed
  • CI configured
  • Tests present

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Healthy" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Healthy
[![RepoPilot: Healthy](https://repopilot.app/api/badge/langchain-ai/open_deep_research)](https://repopilot.app/r/langchain-ai/open_deep_research)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/langchain-ai/open_deep_research on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: langchain-ai/open_deep_research

Generated by RepoPilot · 2026-05-07 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/langchain-ai/open_deep_research shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

GO — Healthy across the board

  • Last commit 1w ago
  • 15 active contributors
  • Distributed ownership (top contributor 49% of recent commits)
  • MIT licensed
  • CI configured
  • Tests present

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live langchain-ai/open_deep_research repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/langchain-ai/open_deep_research.

What it runs against: a local clone of langchain-ai/open_deep_research — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in langchain-ai/open_deep_research | Confirms the artifact applies here, not a fork | | 2 | License is still MIT | Catches relicense before you depend on it | | 3 | Default branch main exists | Catches branch renames | | 4 | 5 critical file paths still exist | Catches refactors that moved load-bearing code | | 5 | Last commit ≤ 39 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>langchain-ai/open_deep_research</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of langchain-ai/open_deep_research. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/langchain-ai/open_deep_research.git
#   cd open_deep_research
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of langchain-ai/open_deep_research and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "langchain-ai/open_deep_research(\\.git)?\\b" \\
  && ok "origin remote is langchain-ai/open_deep_research" \\
  || miss "origin remote is not langchain-ai/open_deep_research (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(MIT)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"MIT\"" package.json 2>/dev/null) \\
  && ok "license is MIT" \\
  || miss "license drift — was MIT at generation time"

# 3. Default branch
git rev-parse --verify main >/dev/null 2>&1 \\
  && ok "default branch main exists" \\
  || miss "default branch main no longer exists"

# 4. Critical files exist
test -f "src/open_deep_research/deep_researcher.py" \\
  && ok "src/open_deep_research/deep_researcher.py" \\
  || miss "missing critical file: src/open_deep_research/deep_researcher.py"
test -f "src/open_deep_research/state.py" \\
  && ok "src/open_deep_research/state.py" \\
  || miss "missing critical file: src/open_deep_research/state.py"
test -f "src/open_deep_research/configuration.py" \\
  && ok "src/open_deep_research/configuration.py" \\
  || miss "missing critical file: src/open_deep_research/configuration.py"
test -f "src/open_deep_research/prompts.py" \\
  && ok "src/open_deep_research/prompts.py" \\
  || miss "missing critical file: src/open_deep_research/prompts.py"
test -f "langgraph.json" \\
  && ok "langgraph.json" \\
  || miss "missing critical file: langgraph.json"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 39 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~9d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/langchain-ai/open_deep_research"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

Open Deep Research is a fully open-source, multi-agent research system built on LangGraph that autonomously conducts deep research across multiple search tools and LLM providers. It performs iterative research, evidence synthesis, and quality report generation—achieving #6 on the Deep Research Bench leaderboard with performance comparable to proprietary deep research agents like OpenAI's o1. Modular architecture split between src/open_deep_research/ (main agent logic) and src/legacy/ (deprecated implementations). Core state machine in state.py, orchestration in deep_researcher.py, LLM/search configuration in configuration.py. LangGraph server entry point configured via langgraph.json. Evaluation suite in tests/ with benchmarking scripts and pairwise_evaluation.py. Examples/ folder demonstrates arxiv, pubmed, and inference-market research workflows.

👥Who it's for

AI engineers and researchers building agentic research applications who need a configurable, open-source alternative to proprietary deep research systems; teams evaluating multi-agent frameworks and LangGraph; organizations requiring control over research tool selection (Tavily, SerpAPI, Brave, etc.) and model providers (Claude, GPT, local models via init_chat_model()).

🌱Maturity & risk

Actively developed and production-ready. The project ranks #6 on Deep Research Bench (August 2025) and has recent updates including GPT-5 support (August 7, 2025) and a free course (August 14, 2025). CI/CD pipelines exist (.github/workflows/), comprehensive evaluation benchmarks are present (tests/expt_results/ with JSONL leaderboard data), and the blog post documenting evolution (July 30, 2025) shows mature engineering practices.

Low-to-medium risk: The project depends heavily on external LLM APIs and search tool integrations (Tavily, SerpAPI, Brave) which introduces operational risk if those services change pricing or availability. The repo contains legacy code (src/legacy/) indicating past refactoring, which suggests the API may evolve. No apparent single-maintainer bottleneck (LangChain-ai org), but the evaluation data (tests/expt_results/) only covers 3 models, so broader provider support is still being validated.

Active areas of work

Recent activity (August 2025) focused on model upgrades (GPT-5 support added) and evaluation on Deep Research Bench leaderboard. Educational content launched (free academy course on building deep research). The legacy codebase is archived but present, indicating a recent refactoring to the current LangGraph-based approach. GitHub workflows run Claude code review (claude-code-review.yml, claude.yml) suggesting active CI integration.

🚀Get running

git clone https://github.com/langchain-ai/open_deep_research.git && cd open_deep_research && uv venv && source .venv/bin/activate && uv sync && cp .env.example .env && uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.11 langgraph dev --allow-blocking

Daily commands: uvx --refresh --from "langgraph-cli[inmem]" --with-editable . --python 3.11 langgraph dev --allow-blocking — opens Studio UI at https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024, API at http://127.0.0.1:2024.

🗺️Map of the codebase

  • src/open_deep_research/deep_researcher.py — Main entry point implementing the core deep research agent orchestration and LangGraph workflow.
  • src/open_deep_research/state.py — Defines the shared state schema for the research graph, tracking queries, sources, and research progress.
  • src/open_deep_research/configuration.py — Centralizes configurable parameters for LLM models, search providers, and MCP server integration.
  • src/open_deep_research/prompts.py — Houses system prompts and prompt templates that drive agent reasoning and report generation.
  • langgraph.json — LangGraph deployment configuration defining the workflow graph structure and node definitions.
  • pyproject.toml — Project dependencies and package metadata; essential for understanding runtime requirements.

🧩Components & responsibilities

  • Deep Researcher Graph (deep_researcher.py) (LangGraph, LLM chains, state management) — Orchestrates the multi-step research workflow: query decomposition → parallel search → analysis → report generation.
    • Failure mode: Malformed LLM output or missing state fields can break graph transitions; requires robust parsing and state validation.
  • Configuration & Model Abstraction (configuration.py) (Enum-based config, environment variables, LangChain integrations) — Provides unified interface to multiple LLM providers and search tools; handles API credentials and model selection.
    • Failure mode: Missing API keys or unsupported model selections silently fail at runtime; requires early validation.
  • State Schema (state.py) (Pydantic or TypedDict, type hints) — Defines the immutable data structure passed through the research graph, tracking queries, sources, findings, and metadata.
    • Failure mode: Incompatible state mutations break downstream nodes; requires strict schema versioning.
  • Prompts & Reasoning Templates (prompts.py) — Encapsulates all LL

🛠️How to make changes

Add a New Search Provider or Data Source

  1. Define the new provider in the configuration enum within src/open_deep_research/configuration.py (src/open_deep_research/configuration.py)
  2. Create tool integration logic in src/open_deep_research/utils.py to query the new source (src/open_deep_research/utils.py)
  3. Update state definitions in src/open_deep_research/state.py if new metadata fields are needed (src/open_deep_research/state.py)
  4. Add prompts for source-specific handling in src/open_deep_research/prompts.py (src/open_deep_research/prompts.py)

Modify Agent Behavior or Reasoning Logic

  1. Review the current research workflow in src/open_deep_research/deep_researcher.py (src/open_deep_research/deep_researcher.py)
  2. Update system prompts in src/open_deep_research/prompts.py to guide new reasoning patterns (src/open_deep_research/prompts.py)
  3. Modify graph nodes and edges in deep_researcher.py or update langgraph.json for routing changes (langgraph.json)
  4. Add test cases in tests/run_evaluate.py to validate the new behavior (tests/run_evaluate.py)

Support a New LLM Model or Provider

  1. Add model enum and instantiation logic to src/open_deep_research/configuration.py (src/open_deep_research/configuration.py)
  2. Update authentication if needed in src/security/auth.py (src/security/auth.py)
  3. Test with benchmark questions in tests/run_evaluate.py (tests/run_evaluate.py)

Evaluate Research Quality Against Benchmarks

  1. Review existing benchmark results in tests/expt_results/ (tests/expt_results/deep_research_bench_claude4-sonnet.jsonl)
  2. Run evaluation suite with tests/run_evaluate.py against your changes (tests/run_evaluate.py)
  3. Use tests/evaluators.py to score output quality (tests/evaluators.py)
  4. Compare results with tests/pairwise_evaluation.py for model comparison (tests/pairwise_evaluation.py)

🔧Why these technologies

  • LangGraph — Provides composable, graph-based workflow orchestration for multi-step research pipelines with state management and conditional routing.
  • Claude/GPT-4 LLMs — Offers strong reasoning and language understanding for query decomposition, information synthesis, and report generation.
  • MCP (Model Context Protocol) — Allows flexible integration with external tools and data sources without tight coupling.
  • Search APIs (Arxiv, PubMed, Google) — Enables access to diverse, domain-specific information sources for comprehensive research coverage.
  • Python with type hints — Supports rapid development and clear API contracts for agent state and configuration.

⚖️Trade-offs already made

  • Single-threaded research iteration vs. fully parallel sub-agent architecture

    • Why: Simpler to implement, debug, and reason about agent behavior while still achieving strong benchmark performance.
    • Consequence: Sequential analysis may be slower for very large queries, but reduces token waste and cost overhead.
  • Configurable model providers instead of single-vendor lock-in

    • Why: Allows users to choose cost/performance trade-offs and avoid dependency on one model provider.
    • Consequence: Requires abstraction layer in configuration and testing across multiple providers.
  • Open-source and MIT-licensed implementation

    • Why: Enables broader adoption, community contributions, and transparency vs. closed proprietary solutions.
    • Consequence: No proprietary optimizations or private data; relies on open LLM APIs for reasoning.

🚫Non-goals (don't propose these)

  • Real-time search indexing or autonomous web crawling
  • Custom fine-tuned models (uses off-the-shelf LLM APIs)
  • Multi-user collaboration or session persistence
  • Production-grade access control (see src/security/auth.py for basic structure only)

🪤Traps & gotchas

  1. Environment variables are required: .env.example must be copied to .env and populated with LLM API keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.) and search tool credentials (TAVILY_API_KEY, etc.). 2. Search tool configuration in configuration.py uses string-based tool selection (e.g., 'tavily'), so typos fail silently. 3. The legacy/ folder contains old implementations—do not use legacy.py or multi_agent.py; work only with src/open_deep_research/. 4. LangGraph server requires Python 3.11+; earlier versions will fail. 5. GPU/compute is not required but LLM API calls incur costs; evaluate on small queries first.

🏗️Architecture

💡Concepts to learn

  • LangGraph State Machine — The research agent is a stateful graph of nodes (researcher, refiner, report writer) with typed state transitions; understanding the graph topology and state schema is essential to extend or modify the agent's workflow
  • Multi-Agent Orchestration — Open Deep Research uses specialized agents (search agent, synthesis agent, report agent) that coordinate via shared state; critical for understanding how research tasks are decomposed and parallelized
  • Tool Calling / Function Calling — The LLM agents invoke search tools (Tavily, SerpAPI, Brave) and other APIs via structured tool calls; understanding tool definition and error handling is essential for adding new research capabilities
  • Prompt Engineering for Agentic Systems — Research quality depends heavily on prompts in prompts.py that guide the agent's reasoning, evidence gathering, and report synthesis; tweaking prompts is the primary lever for improving agent behavior
  • Streaming and Streaming Aggregation — The agent outputs intermediate research steps via streaming; understanding how to consume and aggregate streamed events is important for building responsive UIs and monitoring agent progress
  • Evaluation and Benchmarking of Agentic Systems — Deep Research Bench evaluates research quality using pairwise comparisons and multi-dimensional scores; understanding evaluators.py metrics is critical for debugging agent performance and measuring improvements
  • langchain-ai/langgraph — Core dependency; Open Deep Research is built on LangGraph's state machine and graph orchestration for multi-agent workflows
  • langchain-ai/langchain — Foundational library providing LLM abstraction (init_chat_model), prompts, and tool calling that powers the research agent
  • langchain-ai/deep_research_from_scratch — Companion educational repository; free course on building deep research systems step-by-step using the same patterns as Open Deep Research
  • openai/swarm — Alternative lightweight multi-agent framework; comparison point for orchestration patterns in agent-based research systems
  • Ayanami0730/DeepResearch-Leaderboard — Hugging Face leaderboard that evaluates Open Deep Research and competing systems; the benchmark used for measuring performance

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add comprehensive unit tests for src/open_deep_research/deep_researcher.py

The main deep_researcher.py module lacks dedicated unit tests. Currently, only legacy and integration tests exist in tests/. This core module deserves isolated unit tests covering the main research workflow, state management, and error handling to ensure reliability as contributors modify it.

  • [ ] Create tests/test_deep_researcher.py with test fixtures for state initialization
  • [ ] Add tests for each public method in deep_researcher.py (e.g., research execution, result formatting)
  • [ ] Add tests for configuration edge cases using src/open_deep_research/configuration.py
  • [ ] Test integration with prompts.py and utils.py modules
  • [ ] Add parametrized tests for different model provider configurations

Add security validation tests for src/security/auth.py

The auth.py module exists but has no visible test coverage. This is critical for security-sensitive operations like API key handling and authentication. New tests would ensure secrets aren't logged, tokens are properly validated, and auth failures are handled gracefully.

  • [ ] Create tests/test_security_auth.py
  • [ ] Add tests for API key validation and sanitization
  • [ ] Add tests to verify secrets are not logged or exposed in error messages
  • [ ] Test token refresh and expiration handling
  • [ ] Add tests for different authentication schemes (if multiple are supported)

Add GitHub Actions workflow for running tests against multiple model providers

The repo has claude.yml and claude-code-review.yml workflows, but no dedicated workflow for running the test suite against multiple LLM providers (Claude, GPT-4, etc.). This ensures the agent's multi-provider support actually works in CI and catches provider-specific regressions.

  • [ ] Create .github/workflows/test-multi-provider.yml
  • [ ] Configure matrix strategy for multiple model providers (claude-opus, gpt-4-turbo, etc.)
  • [ ] Run tests/run_evaluate.py or a subset of integration tests
  • [ ] Set up secret management for multiple API keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, etc.)
  • [ ] Add status badge to README.md linking to workflow results

🌿Good first issues

  • Add missing unit tests for src/open_deep_research/utils.py utility functions—currently no dedicated test file exists; would improve code coverage and serve as learning scaffold for the project structure.
  • Expand examples/ with a GitHub issues analysis example (similar to arxiv.md, pubmed.md) that demonstrates using the agent for bug triage or feature research workflows.
  • Add integration tests for search tool fallback behavior in configuration.py—currently no test coverage for graceful degradation if a search tool API fails; would catch regressions in tool orchestration.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 0dd30bd — Bump python-dotenv in the uv group across 1 directory (#263) (dependabot[bot])
  • 040a997 — Bump the uv group across 1 directory with 4 updates (#262) (dependabot[bot])
  • ca08a58 — Bump the uv group across 1 directory with 2 updates (#261) (dependabot[bot])
  • ea8eb83 — Bump the uv group across 1 directory with 2 updates (#260) (dependabot[bot])
  • fb77e90 — Bump aiohttp from 3.13.3 to 3.13.4 in the uv group across 1 directory (#259) (dependabot[bot])
  • 63c275d — Bump the uv group across 1 directory with 2 updates (#258) (dependabot[bot])
  • e687819 — Bump the uv group across 1 directory with 2 updates (#256) (dependabot[bot])
  • b847e54 — Bump the uv group across 1 directory with 2 updates (#253) (dependabot[bot])
  • 4ef14c1 — Bump the uv group across 1 directory with 3 updates (#249) (dependabot[bot])
  • ab4d4d6 — Bump cryptography in the uv group across 1 directory (#244) (dependabot[bot])

🔒Security observations

  • High · Multiple API Keys Exposed in Environment Configuration — .env.example. The .env.example file contains references to sensitive API keys including OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, TAVILY_API_KEY, LANGSMITH_API_KEY, and SUPABASE_KEY. While the example file itself doesn't contain actual credentials, developers may accidentally commit a real .env file to version control, or the presence of these keys in examples could lead to exposure. Fix: Ensure .env files are in .gitignore (verify it exists and is properly configured). Consider using a secrets management system like AWS Secrets Manager, HashiCorp Vault, or GitHub Secrets for production deployments. Document that developers should never commit .env files.
  • High · Conditional Security Configuration Based on Environment Variable — .env.example - GET_API_KEYS_FROM_CONFIG setting. The GET_API_KEYS_FROM_CONFIG flag suggests that API keys can be retrieved from configuration files in development, but the logic for switching between development and production security modes is critical. If this flag is improperly set, credentials could be leaked or security controls could be bypassed. Fix: Ensure this flag defaults to 'true' for production and implement strict validation that prevents loading sensitive credentials from config files in production environments. Add warnings and logging when this flag is set to false in production.
  • Medium · Supabase Configuration Exposed in Example — .env.example - SUPABASE_KEY and SUPABASE_URL. SUPABASE_KEY and SUPABASE_URL are included in the environment example. Supabase keys, if exposed, could allow unauthorized access to the database and associated data. Fix: Use row-level security (RLS) in Supabase, rotate keys regularly, and ensure keys are never committed to version control. Consider using Supabase's built-in secret management features.
  • Medium · Potential API Key Injection Risks in Deep Research Agent — src/open_deep_research/deep_researcher.py, src/open_deep_research/configuration.py. The codebase appears to handle multiple API keys for different providers (OpenAI, Anthropic, Google, Tavily, LangSmith). Without careful validation and sanitization, these keys could be exposed through logging, error messages, or debugging output when passed to LLM providers or search tools. Fix: Implement strict logging controls to mask API keys in all output. Never log API keys directly. Use redaction libraries for error messages. Validate and sanitize all API key usage before passing to external services.
  • Medium · Missing Dependency Verification — pyproject.toml. No pyproject.toml content was provided for analysis. Dependencies could contain known vulnerabilities or malicious packages, and without visibility, the risk cannot be assessed. Fix: Regularly run 'pip audit' or 'poetry audit' to check for known vulnerabilities in dependencies. Pin dependency versions to known-good releases. Review new dependencies before adding them to the project.
  • Medium · LangSmith Tracing Enabled Without Clear Security Controls — .env.example - LANGSMITH_TRACING. LANGSMITH_TRACING is configurable and could send sensitive data about research queries and API interactions to LangSmith's platform. If enabled in production without proper data sanitization, this could leak proprietary research information. Fix: Document when LangSmith tracing should be enabled/disabled. Implement data sanitization filters before sending to LangSmith. Consider disabling tracing for sensitive research queries. Review LangSmith's privacy and data retention policies.
  • Low · No HTTPS Enforcement Documentation — .env.example comments - Open Agent Platform. For the 'Open Agent Platform' deployment mentioned in comments, there's no visible documentation about HTTPS enforcement or secure communication protocols. Fix: Document that all production deployments must use HTTPS. Implement HSTS headers, certificate pinning for API calls, and secure TLS configuration. Add deployment security guidelines to README.md.
  • Low · Missing Security Documentation — Repository root. There is no visible SECURITY.md file or documented security practices, vulnerability disclosure process, or security guidelines for contributors. Fix: Create a SECURITY.md file documenting: vulnerability disclosure

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Healthy signals · langchain-ai/open_deep_research — RepoPilot