Open source · MIT

The meta harness for research queries.

Ask once. Librarium fans your query out to search engines, AI-grounded answers, and deep-research APIs in parallel, then merges everything into one structured output.

Get started

$ npm i -g librarium

Also available via , , , or .

zsh — librarium

$ librarium answer "how to get cited in ai answers"

  fanning out to 5 providers

   gemini-grounded    ai-grounded     1.1s   9 sources
   openrouter-online  ai-grounded     1.9s   7 sources
   brave-answers      ai-grounded     0.6s  20 sources
   exa                ai-grounded     1.4s  10 sources
   kagi-fastgpt       ai-grounded     4.7s   3 sources

  AI engines cite pages they can parse and trust:
  structured headings, direct answers high on the
  page, and schema markup all raise citation rates
  [1] [2]. Mentions on Reddit, reviews, and listicles
  matter more than backlinks for LLM visibility [3].

  Sources
  [1] How AI search engines pick citations
  [2] Schema markup and LLM visibility
  [3] Reddit's outsized role in AI answers

  5 succeeded, 0 failed in 4.7s
   31 unique sources after dedupe (49 total citations)
   ./agents/librarium/1781136000-how-to-get-cited-in-ai/

Features

Built for serious research workflows.

Live fan-out table
Every provider resolves in place with timing, source counts, and reported cost. Slow ones get highlighted; failures fall back to a configured backup.
Grounded answers
librarium answer fans out, then synthesizes one cited answer from what actually came back. Every claim maps to a real source.
Reports for humans and machines
A tabbed HTML report for reading, results.jsonl with full content for pipelines, and a browsable run directory for everything else.
Tier-tuned queries
--refine rewrites your query three ways with one LLM call: a brief for deep research, a question for AI answers, keywords for raw search.
Async deep research
Submit long-running jobs and walk away. status --wait --retrieve collects the reports when they land.
Built for agents
An agent skill, an MCP server, and an embeddable edge-safe core. Your agents fan out, browse, and cite without screen-scraping a terminal.

Plus provider groups, automatic fallbacks, and custom providers from npm or local scripts. Full command reference

librarium/core

A CLI for you. A library for your agents.

The same adapters and dispatcher behind the CLI ship as an embeddable core that returns structured results in memory. No filesystem, no Node-only dependencies; it runs in Cloudflare Workers and other edge runtimes. Wire it into agents, pipelines, or apps.

Read the library docs

research.ts

import { dispatch } from 'librarium/core'

const run = await dispatch({
  query: 'HTTP/3 adoption in 2026',
  providers: ['perplexity-sonar-pro', 'exa'],
})

for (const result of run.results) {
  console.log(result.provider, result.sources)
}

Provider tiers

Depth when you need it, speed when you don't.

deep-research

minutes

Async jobs that run for minutes and come back with comprehensive multi-source reports. Submit, keep working, retrieve later.

  • perplexity-sonar-deep
  • openai-deep
  • openai-deep-o3
  • gemini-deep
  • +2

ai-grounded

seconds

AI answers with inline citations. The middle ground between speed and depth.

  • perplexity-sonar-pro
  • gemini-grounded
  • exa
  • kagi-fastgpt
  • +3

raw-search

sub-second

Classic engine results. Broad link discovery and fact checks, in under a second.

  • brave-search
  • tavily
  • serpapi
  • firecrawl-search
  • +3

Twenty-plus built-in providers. See the full catalog

Stop searching one engine at a time.

Install librarium and fire off your first deep research in under a minute.

Paste this into your agent

Install librarium, the research fan-out CLI (npm i -g librarium), set it up with librarium init --auto and librarium install-skill, then use it to kick off a deep research on [a topic of my choosing].