Skip to main content
Glama
agent-search-core

agent-search-core

agent-search-core

Local-first, evidence-backed search core for AI agents.

agent-search-core is not a SearXNG fork and not an Exa/Tavily client. The core is self-built or MIT-licensed. SearXNG may be added later as an optional adapter, never as the only backend.

Release Tests Offline benchmark Website Listed in Awesome MCP Servers

Search ledger

Grounded answer

Search ledger

Grounded answer

What it provides

  • one provider contract for eight vertical search lines;

  • independent crawler, SQLite URL frontier, FTS5 index, and optional vector index;

  • deterministic and optional local-LLM query planning;

  • BM25 + cosine hybrid retrieval and optional local cross-encoder reranking;

  • multi-round research loop with coverage and stop conditions;

  • evidence-bound answer engine with verified [n] citations and claim support;

  • conversation-aware follow-up query planning;

  • optional browser rendering for JavaScript-heavy pages;

  • TTL/LRU semantic-layer cache with singleflight and per-caller abort;

  • claim-level citation support assessment;

  • CLI, MCP stdio server, and DSH bundle adapter;

  • isolated provider failures with structured diagnostics;

  • canonical URL deduplication and evidence validation;

  • provider-aware fusion instead of comparing incompatible raw scores;

  • global result, character, item, diagnostic, and deadline budgets;

  • verbatim citations with locators and offset validation;

  • zero runtime dependencies.

Related MCP server: Cluefinch MCP

Providers

Provider

Directory

Primary source

GitHub

src/providers/github/

GitHub REST API

npm

src/providers/npm/

npm Registry

Arxiv

src/providers/arxiv/

Arxiv Atom API

Official docs

src/providers/docs/

Operator-configured roots and sitemaps

Security advisories

src/providers/security/

CISA KEV + NVD

RSS news

src/providers/news/

Operator-configured RSS/Atom feeds

User sites

src/providers/site/

Allowlisted domains and sitemaps

Local knowledge

src/providers/knowledge/

Local Markdown/JSON/text, SQLite FTS5 or memory index

Quick start

npm install --ignore-scripts
npm run build
npm test
npm run typecheck

Example

import { SearchOrchestrator } from './dist/src/index.js'
import { createGithubProvider } from './dist/src/providers/github/index.js'
import { createKnowledgeProvider } from './dist/src/providers/knowledge/index.js'

const orchestrator = new SearchOrchestrator([
  createGithubProvider({ token: process.env.GITHUB_TOKEN }),
  createKnowledgeProvider({ roots: ['./notes'] }),
])

const response = await orchestrator.search(
  { text: 'sqlite-vec', kinds: ['github', 'knowledge'], limit: 8 },
  { signal: new AbortController().signal, now: new Date(), requestId: 'demo', config: {} },
)

console.log(response.items)

Evidence-bound answer

import { answerQuestion } from './dist/src/index.js'

const answer = await answerQuestion({
  query: 'What is sqlite-vec?',
  evidence: response.items,
})

console.log(answer.text)      // sentences with [n] citations
console.log(answer.citations) // verbatim, offset-validated quotes
console.log(answer.claims)    // support / refute / neutral / unknown

The default answerer is deterministic and extractive. An optional local OpenAI-compatible model can be enabled, but every generated citation is revalidated and unsupported sentences fall back to evidence.

CLI

npx -y agent-search search "sqlite-vec" --provider github --limit 5
# Before npm publication, run directly from the tagged GitHub release:
npx -y github:Mizar-Silexeth/agent-search-core#v0.3.4 search "sqlite-vec" --provider github --limit 5
# Homebrew:
brew tap Mizar-Silexeth/agent-search-core
brew install agent-search-core
node dist/src/cli.js --help
node dist/src/cli.js search "sqlite-vec" --provider github --limit 5
node dist/src/cli.js crawl https://example.com --max-pages 20
node dist/src/cli.js eval --qrels eval/qrels.json
node dist/src/cli.js serve --port 8787

Demo

node dist/src/demo-server.js --host 127.0.0.1 --port 4173

Open http://127.0.0.1:4173 for the zero-dependency search/research/evidence UI. GET /api/metrics exposes bounded latency, citation, reliability, and answer-success metrics without retaining query text or URLs.

MCP

The stdio MCP server exposes:

  • search

  • fetch

  • research

  • crawl_status

npx -y agent-search-core mcp
# or from a tagged GitHub release before npm publication:
npx -y github:Mizar-Silexeth/agent-search-core#v0.3.4 mcp

It uses newline-delimited JSON-RPC and has no runtime dependencies. A MCP Registry manifest is provided at server.json.

DSH

The standalone Host bundle lives in dsh-adapter/ and registers the core as a DSH web search provider. Install it as a local bundle after reviewing its manifest and patch.

Evaluation

  • npm run eval: deterministic offline provider smoke, 8/8.

  • node scripts/eval-v2.mjs --self-test: metric self-check.

  • eval/qrels.json: 138 labeled cases across eight providers.

  • eval/qrels/history-queries.json: 150 real historical queries with sanitized provenance.

  • Historical top results are candidates only; they are not promoted to relevance labels.

  • Live mode reports UNVER for missing configuration or upstream failure instead of hiding it as an algorithm failure.

Benchmark

node scripts/benchmark-v3.mjs --self-test
node scripts/benchmark-v3.mjs --track offline --mode both --limit 8
node scripts/benchmark-v3.mjs --track offline --mode both --ablation matrix

The public benchmark includes 138 frozen qrels, a 100/38 development/public-test split, schemas, manifests, base/enhanced comparison, A0–A9 ablations, latency, citation, claim, reliability, and stability metrics.

Evidence rules

  • author is only emitted when the upstream explicitly identifies an author.

  • Invalid or partial dates are omitted rather than normalized into fabricated dates.

  • content always has at least one valid citation.

  • Offset citations must satisfy content.slice(start, end) === quote.

  • Local knowledge paths are redacted by default.

Security model

  • Network providers use bounded timeouts and response sizes.

  • site never lets query filters expand the operator allowlist.

  • Private, loopback, link-local, multicast, and cloud-metadata addresses are blocked by default.

  • Localhost HTTP is available only through an explicit test/operator option.

  • knowledge roots come from trusted factory configuration, not request configuration.

Examples

See examples/ for basic search, grounded answers, conversation-aware research, and an MCP client configuration snippet.

Documentation

Citation

See CITATION.cff.

License

MIT.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to run local deep-research workflows via a single MCP stdio server, combining web search, page extraction, query-aware distillation, and caching without cloud quotas. It exposes tools for deep research, search, and single or batch URL reading.
      6
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Deep Research infrastructure for AI agents. Search the web, read pages incrementally, follow source links, and collect relevant evidence across multiple sources. Web search runs through your own SearXNG instance, while the agent remains in control of research planning and reasoning. Cluefinch runs locally over MCP stdio.
      4
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to perform multi-engine web and verified image search, download images, fetch pages as Markdown with JS fallback, search YouTube and extract transcripts or media, and generate citation-backed deep research reports over stdio.
      41 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Provides AI agents with 12 real-time tools for search synthesis, grounded research dossiers, claim verification, citation generation, sentiment analysis, expert ranking, timeline creation, and competitive landscape mapping over Streamable HTTP or stdio.
      12
      MIT