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

@retrivora-ai/rag-engine

v1.0.8

Published

Retrivora AI is a plug-and-play AI engine for RAG chat experiences — generic vector DB + LLM provider, embeddable or standalone.

Readme

@retrivora-ai/rag-engine

Retrivora AI is a plug-and-play AI engine for RAG chat experiences that can be embedded into Next.js apps or used as a standalone demo app. Bring your own vector database, LLM, embeddings, and UI branding.

NPM Version NPM Downloads GitHub Next.js TailwindCSS


✨ Features (v1.0.0)

| Category | Options | |---|---| | Vector DBs | Pinecone, pgVector (PostgreSQL), MongoDB Atlas, ChromaDB, Qdrant, Milvus, Weaviate, Redis | | LLM Providers | OpenAI, Anthropic Claude, Google Gemini, Ollama, LiteLLM, Universal REST | | Integrations | LangChain (Agentic orchestration), LlamaIndex (Semantic chunking) | | Document Ingestion | Universal support for PDF, DOCX, CSV, JSON, MD, TXT | | Architecture | Modular & Pluggable registry-based system with static health checks & validators | | RAG Patterns | Simple, Hybrid, Graph-based, and Agentic workflows |


🚀 How it Works

Retrivora AI acts as a universal bridge between your data and your users. It normalizes different AI providers and Vector databases into a single interface using a registry-based architecture.

  1. Ingest: Upload or send documents to the /api/upload endpoint. They are parsed and chunked using LlamaIndex strategies if configured.
  2. Retrieve: Queries are processed via the QueryProcessor to extract semantic hints and filter criteria.
  3. Generate: Context is retrieved and processed through a Pipeline (or LangChainAgent) to produce grounded, streaming responses.

📦 Installation

npm install @retrivora-ai/rag-engine

🛠️ Pluggable Architecture

Starting with v1.0.0, the engine uses a modular registry for all providers. Every provider now exposes:

  • Static Validators: getValidator() for deep configuration schema checks.
  • Static Health Checkers: getHealthChecker() for real-time connectivity and capability validation.

This decoupling allows you to add custom providers without modifying the core engine logic.


NPM Package Usage

1. Embed the ChatWidget

import { ConfigProvider, ChatWidget } from '@retrivora-ai/rag-engine';

export default function Layout({ children }) {
  return (
    <ConfigProvider
      config={{
        projectId: 'my-project',
        ui: {
          title: 'Support Bot',
          primaryColor: '#6366f1',
          accentColor: '#8b5cf6',
          welcomeMessage: 'Hi! How can I help you today?',
        },
      }}
    >
      {children}
      <ChatWidget position="bottom-right" />
    </ConfigProvider>
  );
}

2. Mount the API routes

// src/app/api/chat/route.ts
import { createChatHandler, getRagConfig } from '@retrivora-ai/rag-engine/server';
export const POST = createChatHandler(getRagConfig());

// src/app/api/upload/route.ts
import { createUploadHandler, getRagConfig } from '@retrivora-ai/rag-engine/server';
export const POST = createUploadHandler(getRagConfig());

3. Use Pipeline programmatically

import { Pipeline, getRagConfig } from '@retrivora-ai/rag-engine/server';

const config = getRagConfig();
const pipeline = new Pipeline(config);

// Ingest documents
await pipeline.ingest([{ docId: 'readme', content: 'Your document text here' }]);

// Ask questions
const { reply, sources } = await pipeline.ask('What is the refund policy?');

Configuration Reference

The library is entirely dynamic. You can switch between providers simply by updating your environment variables.

| Variable | Description | |---|---| | RAG_PROJECT_ID | Project namespace for data isolation | | VECTOR_DB_PROVIDER | pinecone, pgvector, mongodb, milvus, qdrant, weaviate | | LLM_PROVIDER | openai, anthropic, gemini, ollama | | EMBEDDING_PROVIDER | openai, ollama, google-gemini | | RAG_ARCHITECTURE | simple, hybrid, graph, agentic |


License

MIT