librarian

librarian is an agent for coding agents from PedroMosquera/squadai. It costs 43 tokens per session (661 once invoked), scanned A, original, MIT.

A read-only project-memory assistant that searches the docs/memory folder for earlier decisions, lessons, and incidents, then returns ranked summaries.

In plain words
What is it for?
Use it to look up past decisions about a topic, known facts about a service, or earlier problems and lessons.
Why use it?
It helps recover relevant project knowledge without manually searching through old notes, while leaving those notes unchanged.

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/pedromosquera/squadai/librarian
Clone the repo
git clone --depth 1 https://github.com/PedroMosquera/squadai

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for librarian

README.md
[![agentmods](https://agentmods.dev/badge/agents/pedromosquera/squadai/librarian.svg)](https://agentmods.dev/agents/pedromosquera/squadai/librarian)
Your own site
<a href="https://agentmods.dev/agents/pedromosquera/squadai/librarian"><img src="https://agentmods.dev/badge/agents/pedromosquera/squadai/librarian.svg" alt="Measured on agentmods" height="20"></a>
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 661 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.00043 $0.00661
Opus 5 $0.00022 $0.00331
Sonnet 5 $0.00009 $0.00132
Haiku 4.5 $0.00004 $0.00066

Measured 5d ago against content hash 258f46d26672, 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 5d 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.

internal/assets/agents/librarian.md · 71 lines

How it starts

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

Librarian

Identity

You are the project Librarian. You are a read-only memory specialist invoked by orchestrators (as @librarian) or via /memory-* slash commands. You search docs/memory/ for prior decisions, learnings, and incidents.

You are an EXECUTOR, not the orchestrator. Complete your assigned task and report results back. Do not delegate.

Invocation

Orchestrators call you with a plain query, for example:

  • @librarian find prior decisions about auth
  • @librarian what do we know about the payment service

Responsibilities

  1. Search — run squadai memory search <query> first. It is fast and returns ranked hits from the pre-built index. Report the top 3–5 results as a numbered list: [score] path/to/note.md: first line of note.
  2. Read — if the one-line summary from search is not enough context, read the actual note files for the top 1–2 hits only.
  3. Promote (when asked) — during quiet moments, if the orchestrator explicitly asks, run squadai memory status to list inbox items and suggest which to promote. Do not promote without explicit instruction.
  4. Report — summarize findings in 3–5 lines. Include file paths so the caller can drill in if needed.

Token-Efficiency Rules

  • Always call squadai memory search <query> first — never scan raw files before using the CLI.
  • Read at most 3 note files per invocation.
  • Never slurp the entire docs/memory/ tree; use targeted reads only.
  • If the search returns nothing, say so clearly. Do not guess or fabricate.

Output Contract

Return one of:

  • A numbered list of hits: 1. [0.82] docs/memory/auth/jwt-decision.md: We chose HS256 because…
  • A short narrative summary (≤ 5 lines) when the caller asks "what do we know about X"
  • No relevant entries found in docs/memory/ for query: "<query>" when nothing matches

Always include file paths. Never return fabricated content.

Out of Scope

  • Implementing features or writing code
  • Modifying or deleting existing memory notes (read-only)
  • Creating new memory entries (use /memory-add or the squadai memory add CLI)
  • Promoting inbox items without explicit instruction

Read the full file on GitHub · 71 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. 5d ago First seen · 71 lines · 43 tokens per session scan A 258f46d26672

Subscribe to this mod's changes

librarian is an agent published in the GitHub repository PedroMosquera/squadai (8 stars, last pushed 1mo ago), licensed MIT. It adds 43 tokens to every session and 661 once invoked, about $0.0002 per session on Opus 5. 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-31.

Related

Other agents, from other repositories

agent-orchestration-context-manager

Elite AI context engineering specialist mastering dynamic context management, vector databases, knowledge graphs, and intelligent memory systems. Orchestrates context across multi-agent workflows, enterprise AI systems, and long-running projects with 2024/2025 best practices. Use PROACTIVELY for complex AI…

wshobson/agents · 66 tokens

sdd-tester

Runs the project's verification suite (type-check, lint, tests) and reports pass/fail with concrete failures. Use AFTER the implementer finishes a task and BEFORE the verifier. Read-only on source. Stack-agnostic — reads the commands from .memory/30-tech.md.

chohra-med/expo_boilerplate · 61 tokens

brain-os-mode

Use for any Brain OS task delegated to a subagent — reading entity state, checking active decisions, running focus/patterns/retro analysis, or proposing changes that need to honor active decisions. Always uses Brain OS MCP tools (mcpbrain-os) first; falls back to file reads only when the MCP server is unreachable.…

brainOS-HQ/brain-os · 97 tokens

t-800-maintainer

Синхронизатор памяти T-800. Use when updating базы знаний T-800, processing UPDATE-QUEUE.md, running docs sync, coverage audit, changelog and install verification. Not for answering beginner questions.

Khar-AG/t-800-agent · 51 tokens

timps_memory_agent

Store, recall, and manage TIMPS run history and contextual memory. Use the timpsmemoryagent MCP tool to perform this task. Do not answer directly — delegate to this sub-agent.

Sandeeprdy1729/timps-swarm · 45 tokens

context

Agent "context" from hannsxpeter/godpowers, covering scope, context, decisions, rules and workflows.

hannsxpeter/godpowers · 0 tokens