Shared MemorySecurity Knowledge Base

Your notes never leave the machine.

Source

Local, offline search over a folder of Markdown notes, for Claude Code, OpenCode, or any MCP client. An agent asks “how do I verify a fix actually worked?” in the middle of a task and gets back the two or three note sections that answer it, with their source—a few hundred tokens instead of reading every note. In the NullPointer loop it is the security knowledge base Agent-Smith reads from and writes back to.

source · acme-prod 127.0.0.1:7801
Ask a question — click one
Retrieval
Meaning search + exact-word search
Merged by rank fusion ~20
Cross-encoder rerank
One result per section TOP 3

Meaning search finds the paraphrase. Keyword search finds the exact token. The reranker orders what is left.

Small enough to trust.

Private

No API keys, no cloud, no telemetry. The only network access is a one-time model download during the first build; every search after that runs offline.

Small

A few hundred lines of Python, two local models of about 152 MB together, and one SQLite file. Nothing to operate.

Incremental

Edit one note and rebuild: only that note is re-embedded. A watch mode rebuilds on every save, and new notes ingested over HTTP are searchable without a restart.

Measured

Ship a question set and the eval reports how often the right section is ranked first and in the top three, so you tune retrieval for your own notes instead of guessing.

Log everything. Promote what worked.

The notes are a plain folder of Markdown with three layers. A journal/ entry per run holds the raw log of what was tried and what happened. refs/ holds a deep-dive per topic. METHODOLOGY.md is the ordered playbook. One rule keeps it honest: a technique earns its place in the methodology only after it worked on a real task. Tag notes in frontmatter and tags become a search filter.

Python 3.11+SQLitebge-small embeddingsBM25MiniLM rerankerMCPMarkdown / PDF

One instance per engagement.

Source can serve one vault over a tiny localhost HTTP service, so each engagement or environment gets its own memory. Agent-Smith binds one by name when a scan starts.

Read

Smith consults the bound Source for methodology when it picks a skill, and can query it at any point in a scan. Recall searches Source alongside prior engagement stores. Snippets are treated as data to verify, never as instructions.

Write back

What Smith confirms is posted back as structured notes. Source writes them into the vault, rebuilds the index incrementally, and reloads it in place, so the next engagement starts with what this one learned.

terminal
$ ./run_instance.sh acme-prod --vault ~/engagements/acme/source --port 7801
 
# agent-smith/sources.yaml
sources:
  acme-prod: http://127.0.0.1:7801
 
session(action="start", options={target: "staging.acme.example", source: "acme-prod"})

The HTTP service binds to 127.0.0.1 on purpose. It has no authentication; keep it off the network.

Clone, build, ask.

terminal
$ git clone https://github.com/0x0pointer/Source ~/source-rag && cd ~/source-rag
$ make install && make build # downloads the models once, then indexes in seconds
$ make query Q="how do I verify a fix worked"
 
$ claude mcp add source -s user -- ~/source-rag/.venv/bin/python ~/source-rag/mcp_server.py
 
✓ the agent now calls search_notes by itself

Requires Python 3.11+ and about 200 MB of disk. It ships as a skeleton: point it at your own notes.

Give your agents a memory.

Open source under AGPL v3.0. It only finds what is written down, so write it down.