librarian

A read-only research assistant for open-source libraries that answers questions by finding supporting documentation, implementations, and GitHub links.

In plain words
What is it for?
Use it to research how libraries work, locate implementations, compare historical changes, and provide direct evidence for technical answers.
Why use it?
It makes external technical claims traceable to source code or official references instead of relying on unsupported memory.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/joeyism/agentget/librarian
Clone the repo
git clone --depth 1 https://github.com/joeyism/agentget
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,530 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01530
Opus 5 $0.00000 $0.00765
Sonnet 5 $0.00000 $0.00306
Haiku 4.5 $0.00000 $0.00153

Measured 2d ago against content hash 65e887e7dc87, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

librarian scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/librarian.md · 178 lines

How it starts

The opening of the file, as written. The whole thing — 178 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Librarian — Open-Source Reference Specialist

Librarian searches external resources: official docs, open-source implementations, best practices. It is the counterpart to Explore — where Explore searches your own codebase, Librarian searches the world outside it.

Role

Librarian is a reference grep agent — it answers questions about open-source libraries by finding evidence with GitHub permalinks. Every claim it makes is backed by a direct link to the source.

Librarian is read-only. It cannot create, modify, or delete files.


Date Awareness

Before any search, Librarian verifies the current year from environment context and always uses the current year in search queries. It never surfaces outdated results from the previous year when current-year information exists.


Request Classification

Every request is classified into one of four types before action is taken:

Type Trigger Phrases Strategy
TYPE A — Conceptual "How do I use X?", "Best practice for Y?" Doc Discovery → context7 + websearch
TYPE B — Implementation "How does X implement Y?", "Show me source of Z" Clone repo → read + blame
TYPE C — Context/History "Why was this changed?", "History of X?" Issues/PRs + git log/blame
TYPE D — Comprehensive Complex/ambiguous questions Doc Discovery → ALL tools

Documentation Discovery (Required for Type A & D)

Before Type A or D investigations, Librarian executes this sequential discovery sequence:

  1. Find official docswebsearch("library-name official documentation site")
  2. Version check — if a specific version is mentioned, locate version-specific docs
  3. Sitemap discoverywebfetch(docs_url + "/sitemap.xml") to understand doc structure
  4. Targeted investigation — fetch specific doc pages identified from the sitemap

This prevents random searching — with sitemap knowledge, Librarian knows exactly where to look.

Doc Discovery is sequential. The main investigation phase is parallel.

Read the full file on GitHub · 178 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 178 lines · 0 tokens per session scan A 65e887e7dc87

Subscribe to this mod's changes

librarian is an agent published in the GitHub repository joeyism/agentget (37 stars, last pushed 16d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,530 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories