npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@blackdrome/open-deepresearch

v0.1.0

Published

Standalone open-source DeepResearch engine with OpenRouter and NVIDIA NIM providers

Readme

UPAI Open DeepResearch Engine

Standalone open-source DeepResearch engine with:

  • adaptive multi-round retrieval
  • ranking + domain diversification
  • claim clustering + contradiction checks
  • citation-grounded synthesis with critique pass
  • pluggable adapters for search + LLM providers
  • built-in providers for OpenRouter and NVIDIA NIM

Install

npm install @upai/open-deepresearch

Quick Start

import {
  HttpJsonSearchAdapter,
  createOpenDeepResearchEngine,
} from "@upai/open-deepresearch";

const searchAdapter = new HttpJsonSearchAdapter({
  endpoint: process.env.SEARCH_ENDPOINT!,
  apiKey: process.env.SEARCH_API_KEY,
  apiKeyHeader: "Authorization",
  staticPayload: { provider: "free", mode: "web", num: 10 },
});

const engine = createOpenDeepResearchEngine({
  searchAdapter,
  defaultProvider: "openrouter",
  openRouter: {
    apiKey: process.env.OPENROUTER_API_KEY!,
    model: process.env.OPENROUTER_MODEL || "openai/gpt-4o-mini",
  },
  nim: {
    apiKey: process.env.NIM_API_KEY!,
    model: process.env.NIM_MODEL || "meta/llama-3.1-70b-instruct",
  },
  fallbackComplete: async (prompt) => {
    return `Fallback handler received prompt length=${prompt.length}`;
  },
});

const run = await engine.run("Best RAG architecture for support chat in 2026", {
  depth: "deep",
  providerHint: "openrouter",
  onProgress: (p) => console.log(`[${p.stage}] ${p.message}`),
});

console.log(run.finalAnswer);
console.log(run.sourcesForMessage.slice(0, 5));

Required API Keys

At minimum, configure one LLM provider and one search endpoint.

OpenRouter

  • OPENROUTER_API_KEY
  • OPENROUTER_MODEL (example: openai/gpt-4o-mini)

NVIDIA NIM

  • NIM_API_KEY
  • NIM_MODEL (example: meta/llama-3.1-70b-instruct)

Search

Use any endpoint that returns JSON with either:

  • results: [{ title, snippet, url }]
  • OR items: [{ title, snippet, url|link }]

Then configure:

  • SEARCH_ENDPOINT
  • SEARCH_API_KEY (optional, depending on your backend)

Engine Pipeline

  1. Plan: Creates multi-angle query set (facts, recency, benchmarks, counterpoints, docs).
  2. Retrieve: Executes search with domain/forum constraints.
  3. Rank: Scores by relevance + authority + recency + constraint matching.
  4. Diversify: Caps per-domain results to avoid over-concentration.
  5. Verify: Builds claim graph and finds likely contradictions.
  6. Synthesize: Produces direct answer with citations.
  7. Critique: Enforces truth contract and repairs response when possible.

Domain / Forum Constraints

The engine auto-detects constraints from user query language:

  • site:reddit.com best vector db
  • only from stack overflow
  • discussion on hacker news

You can also pass explicit constraints in run(..., { constraints }).

Progress Events

run supports progress hooks for UI and logs:

onProgress: (progress) => {
  // progress.stage: planning | retrieving | ranking | verifying | synthesizing | critiquing
}

Exports

  • OpenDeepResearchEngine
  • createOpenDeepResearchEngine
  • OpenRouterAdapter
  • NimAdapter
  • HttpJsonSearchAdapter
  • FunctionLlmAdapter
  • all core types and constraints utilities

Notes

  • Node 20+ recommended.
  • The library uses fetch and standard Web APIs.
  • For strict security, keep provider keys server-side.

License

Apache-2.0