10 min read

    Dhiya NPM — No-Cost AI for the Web: Build RAG Bots That Run Entirely in the Browser

    by Deep Parmar

    CTO at Sunbots Innovations LLP | Director at Xwits Developers Pvt Ltd

    Dhiya NPM: Free Browser-Native RAG Framework | Deep Parmar

    A New Chapter in Browser-AI

    Imagine building your own ChatGPT-style assistant that can read, understand, and answer from your knowledge — without a server, API key, or cost.

    Welcome to Dhiya NPM — a client-side RAG (Retrieval-Augmented Generation) framework packaged as a drop-in NPM module. It runs entirely in the browser using WebGPU and IndexedDB, so your data and your inference both stay on-device. It's fast, private, and open-source.

    What Is Dhiya?

    Dhiya is a production-ready RAG framework designed for 100% client-side AI. It performs semantic search, vector embeddings, retrieval, and intelligent answering — all inside the browser using WebGPU and IndexedDB.

    There's no backend, no external model calls, and no token limits. You load your knowledge base, and Dhiya instantly turns it into an intelligent assistant.

    Why It's a Game-Changer

    Capability Dhiya's Approach
    Privacy100% on-device — no data leaves the browser
    CostFree, forever — no API keys or GPU bills
    SpeedWebGPU acceleration for fast inference
    CompatibilityWorks on Chrome, Edge, Firefox, Safari
    PersistenceIndexedDB storage for long-term caching
    ControlStrict RAG mode and hallucination gates

    Getting Started

    npm install dhiya-npm
    import { DhiyaClient } from "dhiya-npm";
    
    const client = new DhiyaClient({ debug: true });
    await client.initialize();
    
    await client.loadKnowledge({
      type: "json",
      data: [
        { title: "Getting Started", content: "Dhiya is a client-side RAG framework..." },
        { title: "Features", content: "Semantic search, caching, and privacy-first design." }
      ]
    });
    
    const answer = await client.ask("What is Dhiya?");
    console.log(answer.text);

    Use Cases

    • Documentation Search: Smart Q&A for your docs.
    • Personal Knowledge Bots: Chat with your notes offline.
    • Privacy-Focused Assistants: No tracking, no servers.
    • E-Learning Tools: AI tutors that work offline.
    • Enterprise RAG Systems: Internal data never leaves the browser.

    Try It Now

    npmjs.com/package/dhiya-npm

    github.com/Xwits-Developers/dhiya-npm

    Give it a star on GitHub if you believe in the future of local-first AI.

    Deep Parmar
    xwits.devsunbots.in

    Frequently Asked Questions

    Quick answers about this topic — also indexed by AI search engines via FAQPage schema.

    Share this article: