Stop Your AI From Hallucinating Code
Create private, local RAG libraries that work offline—no API keys, no cloud services. Share them as single files your whole team can use.
$ npm install -g @libragen/cli
The Problem
Your AI is working with outdated context
LLMs are trained on snapshots of the past. When docs change, APIs update, or your team writes new code—your AI doesn't know.
AI hallucinates outdated APIs
Your coding agent confidently suggests deprecated methods and non-existent functions because its training data is months or years old.
62%
of devs use AI coding tools. Just kidding. This is an AI hallucinated statistic. See? It's a problem.
Docs aren't AI-ready
Internal documentation lives in wikis, PDFs, and scattered markdown files. None of it is in a format your AI tools can actually use.
3-6mo
typical LLM knowledge lag
RAG requires cloud infrastructure
Traditional RAG needs vector databases, API keys, and cloud accounts. That's friction for individuals and a security review for teams.
$$$
in cloud costs & complexity
What if you could give your AI access to any documentation, kept always up to date, and shared across your team?
The Solution
Give your AI a source of truth
Libragen lets you package any documentation into portable, searchable libraries that your AI tools can query instantly.
Ground your AI in truth
RAG libraries give your coding agents authoritative documentation to cite, dramatically reducing hallucinations and made-up APIs.
// Before: AI guesses at APIfetch('/api/users', { method: 'POST' }) // Wrong!
// After: AI cites your docsawait client.users.create({ ... }) // Correct API// Source: internal-api-docs v2.3.0Always current, never stale
Rebuild libraries when docs change. Your agents get the latest API signatures, deprecation notices, and best practices—not 2-year-old training data.
libragen build ./docs --name my-api
# When v2.4 releases:libragen build ./docs --name my-api \ --content-version 2.4.0
# ✓ Updated: my-api-2.4.0.libragenPrivate, local, yours
Everything runs on your machine. No API keys, no cloud bills, no data leaving your network. Keep proprietary docs private while still making them AI-searchable.
# Share via git, S3, or collections:cp my-api-2.4.0.libragen ~/team-libs/
# Team member installs:libragen install ~/team-libs/ --name my-api
# Works in any MCP client instantlyEverything you need for AI-powered search
Build and distribute RAG libraries with a complete toolkit designed for simplicity and power.
Hybrid Search
Vector similarity + BM25 keyword search with reciprocal rank fusion. Find the most relevant docs, not just keyword matches.
MCP Native
First-class Model Context Protocol support. Works with Claude, Cursor, VS Code, Windsurf, and any MCP-compatible client.
Truly Portable
One .libragen file = complete library. Email it, Slack it, commit it, host it. Works offline, no accounts needed.
Private & Offline
Runs entirely on your machine. No API keys, no cloud accounts, no third-party services. Your proprietary docs stay private.
Collections
Curate bundles of useful libraries for your team. Installable with one command.
CLI + TypeScript API
Build and query from the command line, or integrate into your tools with the full @libragen/core API.
Built for every use case
Whether you're building AI agents, documenting software, or maintaining open source—libragen fits your workflow.
libragen_search response
Supercharge your agents with documentation
- Give agents instant access to any documentation
- MCP server discovers and queries libraries automatically
- Reduce hallucinations with grounded retrieval
// MCP tool response{ "content": [ { "source": "react-docs", "text": "useEffect lets you synchronize..." } ]}Terminal
Make your docs AI-searchable
- Package your docs as searchable libraries
- Distribute via collections for easy updates
- Track versions alongside your releases
libragen build ./docs \ --name my-product \ --content-version 2.1.0
# ✓ Built: my-product-2.1.0.libragen.github/workflows/release.yml
Help users find answers faster
- Let users search your API with natural language
- Publish to collections for discovery
- Zero maintenance after initial setup
# Add to your CI/CD pipeline- name: Build libragen library run: | npx @libragen/cli build ./docs \ --name my-project \ --content-version ${{ github.ref_name }}
- name: Upload to release uses: actions/upload-artifact@v4Get started in 60 seconds
From installation to your first query in three simple steps.
Build
Create a library from your docs
$libragen build ./my-docs -n my-library
Query
Search with natural language
$libragen query -l my-library "How do I authenticate?"
Install (optional)
Install globally for convenience
$npm install -g @libragen/cli
We use libragen to build libragen! This site's docs are available as a library you can query locally. Download libragen-docs-0.3.0.libragen
Automate It
Keep libraries updated with CI
Add one step to your docs build pipeline. Every time docs change, your RAG library stays in sync.
# Your existing docs build workflow
name: Build Docs
on:
push:
paths:
- 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Your existing docs build steps...
# ✨ Add libragen in one step
- name: Build RAG library
run: |
npx -y @libragen/cli build ./docs \
--name my-project \
--content-version ${{ github.sha }}
- name: Upload library artifact
uses: actions/upload-artifact@v4
with:
name: rag-library
path: my-project-*.libragen Auto-updates
Library rebuilds on every docs change
Version tracked
Library versions match your commits
Easy distribution
Publish to releases, S3, or collections
Works with any CI: GitHub Actions, GitLab CI, CircleCI, Jenkins, or local scripts.