Skip to main content
hermes-scout logo

hermes-scout

Search your local files by meaning, not just keywords.
A Hermes Agent plugin and a standalone command line tool.

hermes-scout: find anything in your files by meaning

PyPI Downloads tests docs
Python 3.11+ Hermes Agent plugin Zero dependencies License: MIT OpenSSF Scorecard

Documentation · Getting started · Changelog · Report a bug


Ask "where do we handle rate limits?" and get back the relevant paragraphs from your notes, docs or code, even when they never use the words "rate limit". Results come with file paths, line numbers and a similarity score.

hermes-scout works two ways:

  • As a Hermes Agent plugin, adding two tools: scout_search (find passages) and scout_similar (find files related to a file or passage).
  • As a standalone command, hermes-scout search "..." ~/notes, for anyone with Python.

Embeddings come from any OpenAI-compatible /embeddings endpoint. By default that is a local Ollama server, so your files never leave your machine and searches cost nothing.

Demo: asking Hermes where rate limits are handled, and the ranked passages scout_search returns

An illustration of a session. For measured results, see the benchmark.

What's new in 0.4

  • PDF and Word files are searched too, with page numbers in the results.
  • Smarter default ranking, measured: the right file first for 28 of 30 benchmark questions and in the top five for all of them.
  • /scout in Hermes and hermes-scout doctor: check your setup and get the fix in plain words.
  • A built-in skill that teaches the agent when to search by meaning and how to cite results.
  • A public benchmark that reruns on every change to the ranking code.

Full list in the changelog.

What you can ask

Inside Hermes, ask in your own words; the agent calls scout_search or scout_similar:

  • "Where do we handle rate limits in ~/project?"
  • "Which of my notes covers the backup plan?"
  • "Find the meeting notes where we decided to switch databases."
  • "What does error E4021 mean? Search the billing code."
  • "Which PDFs in ~/reports mention the restore drill, and on which page?"
  • "What else in ~/notes is like notes/ideas.md?"

What this is, and what it is not

It is a private search engine for one folder at a time: notes, docs, code, PDFs and Word files on your own machine, ranked by meaning with exact names and codes found first.

It is not a web search, a chat memory or a document store. It never edits or uploads your files; only text chunks go to the embeddings server you choose, which by default runs on your machine. Scanned PDFs (pictures of pages) and images are not read. See PRIVACY.md.

Screenshots

Searching the sample project for an error code and a tool name, with a folder filter hermes-scout doctor explaining how to start the embeddings server
The /scout command inside Hermes Benchmark results: 93% of questions answered with the right file first

Each screenshot shows real hermes-scout output on the synthetic project in benchmarks/corpus, or the measured benchmark numbers, made by scripts/make_screenshots.py.

Contents

Why

Keyword search only finds the words you remember. Notes say "back off and retry", code says except HTTPError as err: if err.code == 429, and docs say "throttling". You remember none of those phrasings. Semantic search compares meaning: the query and every passage are turned into embedding vectors, and the passages pointing in the most similar direction come back first.

Features

  • Hybrid search. Ranks by meaning and by exact words together, so it finds "how we handle throttling" and ERR_4291 alike. Switch to meaning-only or keyword-only when you want.
  • PDF and Word files. Reads the text of PDFs and .docx documents on your own machine, with page markers so results say which page they came from.
  • Find similar. Point at a file or a passage and get the most related files: related notes, overlapping docs, code that does something similar.
  • Local-first. Works out of the box with Ollama, LM Studio, llama.cpp or vLLM on your own machine.
  • Fast repeat searches. An incremental index re-embeds only files that changed since the last search.
  • Safe by default. Skips hidden files, dependency folders, binaries and every path Hermes's own file tools refuse to read, such as .env files and credential stores.
  • Zero dependencies. Python standard library only: nothing extra to install or audit.
  • Respects .gitignore. Files your project ignores (build output, logs, generated code) stay out of the index, at every folder level, with ! re-includes, just like git.
  • Filters. Narrow a search to *.md, docs/ or src/**/*.py without re-indexing.
  • Precise results. Every hit names the file, the line range and a cosine similarity score.
  • Cross-platform. Tested on Linux, macOS and Windows with Python 3.11 to 3.14.
  • Two ways to use it: as a Hermes tool or as a hermes-scout command in any terminal.
  • Configurable from the Hermes Desktop settings page or hermes plugins config hermes-scout.

Quick start

  1. Start a local embeddings server (Ollama shown; see other servers):

    ollama pull nomic-embed-text
    ollama serve            # if it is not already running
    
  2. Install hermes-scout in Hermes:

    hermes plugins install hermes-scout
    hermes plugins enable hermes-scout
    

    or as a command line tool:

    pipx install hermes-scout      # or: pip install hermes-scout
    
  3. Check the setup before your first search, using the option that matches your install:

    • Hermes plugin: run /scout doctor inside Hermes.
    • Standalone CLI: run hermes-scout doctor in a terminal.

    This checks the embeddings server, model and keyword search. If something fails, see Troubleshooting.

  4. Search. Ask Hermes:

    Search my notes in ~/notes for how I set up backups.

    or run:

    hermes-scout search "how I set up backups" ~/notes
    

The first search of a folder builds its index. Later searches only re-read files that changed.

For example, to search Markdown notes only or look up an exact error code from the terminal:

hermes-scout search "meeting notes about backups" ~/notes -g "*.md"
hermes-scout search "ERR_4291" ~/project --ranking keyword

Use --ranking keyword when you already know the exact term or identifier you're looking for.

Command line

$ hermes-scout search "how does the client handle rate limiting" ~/project
0.59  notes/retries.md:1-3
      Retry policy
0.18  notes/pasta.md:1-3
      Dinner
Command What it does
hermes-scout search QUERY [PATH] Search a folder (default: the current one). -k 10 for more results, -g "*.md" to filter, --ranking keyword for exact words only, --json for scripts.
hermes-scout similar FILE --in FOLDER Files most related to FILE (or --text "..."); --lines 10-40 for part of a file.
hermes-scout index [PATH] Build or refresh the index ahead of time.
hermes-scout doctor Check the embeddings server, the model and keyword search, and say how to fix what fails.
hermes-scout status List the indexed folders with file and chunk counts.
hermes-scout clear PATH Forget a folder's index (--all for every folder).
hermes-scout --version Print the version.

Point it at another server with --base-url and --model, or the SCOUT_BASE_URL and SCOUT_MODEL environment variables. Hosted endpoints read their key from SCOUT_API_KEY. The index lives in your user cache folder (~/.cache/hermes-scout/index.db on Linux). Full reference: Command line docs.

Choosing a search mode

Search uses hybrid ranking by default, but you can switch modes depending on what you know about the text you're looking for:

Mode When to use it Example
hybrid (default) Most searches. Questions are ranked by meaning; code names like ERR_4291 put exact matches first. hermes-scout search "handling API timeouts" ~/project
semantic You know the idea but aren't sure how the files describe it hermes-scout search "recovering from failed requests" ~/project --ranking semantic
keyword You know an exact name, code or identifier hermes-scout search "ERR_4291" ~/project --ranking keyword

Start with hybrid if you're unsure. Keyword mode is useful for identifiers that embeddings may not match reliably. Semantic mode is useful when your search terms differ from the wording in the files. Keyword ranking requires SQLite FTS5; if it is unavailable, search falls back to semantic ranking.

In Hermes: the /scout command

Command What it does
/scout doctor Checks the embeddings server, the model and keyword search in one go, with the fix for anything that fails.
/scout status Lists the indexed folders with file and chunk counts.
/scout index [folder] Builds or refreshes a folder's index now, so the first search is instant.
/scout clear <folder>, /scout clear all Forgets a folder's index, or every index.

The plugin also ships a scout skill that tells the agent when searching by meaning beats a plain text search, and how to narrow and cite results.

Example

A search across a small project. The model receives this from the tool:

{
  "query": "how does the client handle rate limiting and retries",
  "root": "/home/me/project",
  "model": "nomic-embed-text",
  "results": [
    {
      "path": "notes/retries.md",
      "lines": "1-3",
      "score": 0.5948,
      "text": "Retry policy\n\nWhen the API answers 429 the client waits with exponential backoff and jitter, then retries up to five times."
    },
    {
      "path": "notes/pasta.md",
      "lines": "1-3",
      "score": 0.1849,
      "text": "Dinner\n\nBoil pasta in salted water, add garlic and olive oil."
    }
  ],
  "index": {"indexed_files": 0, "reused_files": 2, "removed_files": 0, "chunks": 2}
}

The relevant note scores far above the unrelated one, and "indexed_files": 0 shows that the second search reused the index instead of embedding the folder again.

How it works

flowchart LR
    A[Folder of text files] --> B[Split into overlapping<br/>line-aligned chunks]
    B --> C{New or changed<br/>since last search?}
    C -- yes --> D[Embed via<br/>/embeddings endpoint]
    C -- no --> E[(SQLite index)]
    D --> E
    Q[Your question] --> F[Embed the question]
    E --> G[Rank by meaning<br/>cosine similarity]
    E --> K[Rank by exact words<br/>BM25 keyword index]
    F --> G
    Q --> K
    G --> M[Merge both rankings<br/>weighted score fusion]
    K --> M
    M --> R[Top passages with<br/>path, lines, score]
  1. Chunking. Text files are split into chunks of whole lines (1,200 characters by default). Neighbouring chunks share up to two lines, so a passage that straddles a boundary is still found whole. A line longer than the chunk size is split into pieces, so nothing is cut off.
  2. Embedding. Chunks are sent to the embeddings endpoint in batches of 32 and stored as float32 vectors with their precomputed norms.
  3. Incremental index. The index lives in SQLite in the plugin's own data folder (<hermes home>/plugin-data/hermes-scout/index.db), keyed by folder and embedding model. Only new or changed files (by modification time and size) are re-embedded, and deleted files are dropped.
  4. Ranking. The question is embedded the same way and every chunk gets a cosine similarity, score = (q · c) / (‖q‖ ‖c‖). The question's words are also looked up in a keyword index (SQLite full-text search with BM25 and word stemming, built alongside the vectors), leaving out filler words such as "how" or "the" that appear everywhere. The default hybrid ranking picks by query: questions in words are ranked by meaning, which the benchmark measured as the most accurate for them; a query made only of code-like names (ERR_4291, pg_dump, getUserById), which embedding models often blur, merges both rankings by score with keywords at 75% and meaning at 25%, so the exact name comes first. The ranking setting (or the tool's ranking argument, or --ranking) switches to meaning only (semantic) or words only (keyword). If Python's SQLite lacks full-text search (FTS5), search falls back to meaning only and says so in a one-line note.
  5. Find similar. scout_similar averages the vectors of a file (or a line range of it) and returns the other files whose best passage is closest, one result per file.

Indexes for different embedding models are kept apart, so switching models never mixes vectors.

What gets indexed: common text, documentation, code and config extensions (.md, .txt, .py, .ts, .go, .rs, .json, .yaml, ...), plus the text of PDF and Word (.docx) files up to 20 MB (details). Skipped: hidden files and folders, dependency and build folders (node_modules, venv, dist, build, ...), anything a .gitignore file ignores, symlinks, binary files, files over the size limit, and every path Hermes's file tools refuse to read.

Benchmark

On a synthetic project of 23 files with 30 questions whose answer is known, using nomic-embed-text on Ollama (details and method):

Ranking Right file first Right file in top 5
Default (hybrid) 93% 100%
Meaning only (semantic) 93% 100%
Keywords only (keyword) 63% 83%

Exact names and error codes are found first in every mode. Questions worded differently from the answer are where meaning-based search pays off: 89% first-place hits against 39% for keywords alone.

Supported embedding servers

Any server that implements the OpenAI POST /embeddings API works. Set base_url to its /v1 root.

Server base_url Example embedding_model
Ollama (default) http://localhost:11434/v1 nomic-embed-text, mxbai-embed-large
LM Studio http://localhost:1234/v1 the embedding model you loaded
llama.cpp server (--embeddings) http://localhost:8080/v1 the loaded model's name
vLLM http://localhost:8000/v1 e.g. BAAI/bge-m3
Hosted OpenAI-compatible APIs the provider's /v1 URL the provider's embedding model (set api_key)

Settings

In Hermes, edit them in the Desktop app (Settings → Plugins → hermes-scout) or with hermes plugins config hermes-scout. The command line takes the same settings as flags (--base-url, --model, --chunk-chars, --max-files, --max-file-kb, --no-gitignore, --no-documents, -k).

Setting Default Meaning
base_url http://localhost:11434/v1 OpenAI-compatible base URL; the plugin calls <base_url>/embeddings
embedding_model nomic-embed-text Model name the endpoint serves
api_key not set Only for hosted endpoints; stored by Hermes as SCOUT_API_KEY
top_k 5 Passages returned per search (the model may ask for 1 to 20)
chunk_chars 1200 Chunk size in characters; applies to files indexed afterwards
max_files 2000 Files indexed per folder
max_file_kb 1000 Larger files are skipped
respect_gitignore true Skip files and folders that .gitignore files in the searched folder ignore
read_documents true Also index the text of PDF and Word (.docx) files up to 20 MB
ranking hybrid hybrid: meaning for questions, exact words first for code names like ERR_4291; semantic: meaning only; keyword: exact words only

Troubleshooting

Message Fix
Not sure what is wrong Run /scout doctor in Hermes or hermes-scout doctor in a terminal. It checks everything and names the fix.
cannot reach the embeddings server at http://localhost:11434/v1 Start Ollama (ollama serve) or point base_url at your server.
answered HTTP 404 ... model not found Pull the model (ollama pull nomic-embed-text) or set embedding_model to one the server has.
answered HTTP 401 A hosted endpoint needs api_key.
A PDF never shows up in results It may be scanned (pictures of pages) or encrypted, which have no text to read; anything over 20 MB is skipped too. Check that read_documents is on.
No results for files you expected Check the file's extension, size (max_file_kb), that it is not hidden or in a skipped folder, and that no .gitignore ignores it.
Search returns fewer files than expected Check whether the folder contains more than max_files (2,000 by default) or whether the file exceeds max_file_kb (1,000 KB by default). Narrow the folder or adjust those limits.
The first search is slow Expected for a large folder: every file is embedded once. Later searches only embed changes.

If the server check fails, first confirm your embedding service is running. For the default Ollama setup, ollama list shows your installed models; if nomic-embed-text is missing, run ollama pull nomic-embed-text. Then run hermes-scout doctor again (or /scout doctor inside Hermes).

If a search returns nothing, try the folder without a -g filter and check whether the file is excluded by .gitignore. Hidden files, symlinks and binary files are not indexed even when a search filter would match their names.

Disclosure

The short version is below; PRIVACY.md answers the common questions in full.

  • Network: file contents (chunks) and search queries are sent to the embeddings endpoint you configure. The default is a server on your own machine. If you point base_url at a hosted API, that service receives the text of the files you search.
  • Files read: text files under the folder the model asks to search, minus the skipped paths listed above, and PDF and Word files unless read_documents is off. Their text is extracted on your machine with Python's standard library; no file is uploaded anywhere except as text chunks to the embeddings endpoint. The plugin never writes to that folder.
  • Files written: the index database in the plugin's own data folder only. /scout clear deletes rows from it; nothing else is ever deleted.
  • Health check: /scout doctor sends one fixed test sentence to the embeddings endpoint.
  • Credentials: the optional API key is read through Hermes's secret store and sent only to the configured endpoint. It is dropped if the endpoint redirects to another origin.
  • No telemetry, no background processes, no shell commands, no self-updating.

Roadmap

  • Result diversity (MMR) so near-duplicate chunks do not crowd the top results.
  • An index statistics command and a way to clear old indexes.

Ideas and bug reports are welcome in Issues.

Development

The search engine (hermes_scout/engine.py) and the HTTP client (hermes_scout/embeddings.py) use only the Python standard library and do not import Hermes, so the tests run without a Hermes install or network access:

python -m pip install "pytest>=8,<9" "pytest-cov>=6,<8" "ruff==0.15.10" "mypy==1.18.2"
python -m pytest --cov=hermes_scout     # 111 tests, no network
ruff check . && ruff format --check .
mypy                                    # strict type check
Path Contents
hermes_scout/__init__.py Hermes wiring: tool registration, settings, file-safety checks, storage
hermes_scout/plugin.yaml Plugin manifest read by Hermes
hermes_scout/engine.py Chunking, file walking, the SQLite index and ranking
hermes_scout/patterns.py .gitignore rules and search filters
hermes_scout/embeddings.py OpenAI-compatible embeddings client
hermes_scout/cli.py The hermes-scout command
docs/ The documentation site (MkDocs Material)

Before a release, check the plugin the way the Hermes catalog does:

hermes plugins validate hermes_scout --install-deps
hermes plugins doctor hermes_scout --ci

Every push runs lint, a strict type check, the tests on Linux, macOS and Windows with Python 3.11 to 3.14 and a 90% coverage floor, CodeQL security analysis, an OpenSSF Scorecard rating and a strict docs build. Publishing a GitHub release uploads the package to PyPI.

Contributing

Bug reports, ideas and pull requests are welcome. Start with CONTRIBUTING.md; the Code of Conduct applies everywhere in this project. Report security problems privately as described in SECURITY.md. Release notes live in CHANGELOG.md.

If hermes-scout is useful to you, a star helps other people find it.

Star History

Star history of hermes-scout

License

MIT, see LICENSE. Made by Lanre Shittu. To cite this project, use the "Cite this repository" button on GitHub (CITATION.cff).

Metadata

Release files for hermes-scout 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hermes-scout 0.4.0
File Size Uploaded Provenance Actions
hermes_scout-0.4.0.tar.gz 63.9 kB With provenance Details for hermes_scout-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hermes-scout 0.4.0
File Interpreter ABI Platform Actions
hermes_scout-0.4.0-py3-none-any.whl Python 3 none any Details for hermes_scout-0.4.0-py3-none-any.whl

Total release size: 108.6 kB

Release files / hermes_scout-0.4.0.tar.gz

Download URL hermes_scout-0.4.0.tar.gz
Size 63.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b0dadcec29bda8460af729f43a6085cf1eab2d43114d83e5549c305142c33126
BLAKE2b-256 checksum
How to use checksums
5cdd71c834b18d9fc9af14c8660770afb5316c71735ffb0bedd2cd4709723dca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Release files / hermes_scout-0.4.0-py3-none-any.whl

Download URL hermes_scout-0.4.0-py3-none-any.whl
Size 44.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a7724c0e90f479bd7dc94cc6a308a719d06b1703e2cf142a6e9bb19b0bbe2434
BLAKE2b-256 checksum
How to use checksums
ac713bf5782edec51efc55ff11327306a29c6e7740adf2a8f705fb7ba356ee19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

Security for hermes-scout 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for hermes_scout-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page