lp-docs-search
v1.0.0
Published
A loopengine ability: a zero-config, no-API-key search tool over your own project's docs, plus a skill teaching an agent when and how to use it.
Maintainers
Readme
lp-docs-search
A loopengine ability: a zero-config search tool over your own project's docs, plus a skill that teaches an agent when and how to use it.
What's in it
- Tool —
search_docs(query, top_k?). Searches a local folder of markdown/text files (docs/by default — see "Install" below) and returns the top-matching paragraphs, each with a relevance score and which file it came from. No API key, no external service — indexed in-process using loopengine's own built-inVectorIndex. - Skill —
docs-search: when to search the knowledge base vs. rely on context vs. useweb_searchinstead (if that's also installed), how to write a good query, and how to report a weak or missing match honestly instead of guessing. - actauth rule —
docs-search-allowed,decision: allow— read-only, no side effect.
Honesty about what this is
loopengine's own VectorIndex is a lightweight, dependency-free,
feature-hashing embedder — good enough to prove real retrieval end to
end for a project's own docs, not a production-grade embedding model.
Retrieval quality is closer to keyword/topic matching than deep semantic
search, and the index is rebuilt from disk once per process (not
persisted, not incremental) — fine for the "few dozen documents" scale
this is meant for. If your knowledge base outgrows that, swap
search_docs.ts's own getIndex() for a real embedding API and a
persistent vector store — it's a real file in your own repo, meant to be
hand-edited, not an opaque dependency.
Install
npx loopengine add-ability lp-docs-search --agent <your-agent>Then drop markdown/text files into a docs/ folder at your project root
(or set DOCS_SEARCH_PATH to point at wherever they actually live — via
the Admin UI's Environment tab, or directly in .env):
DOCS_SEARCH_PATH=docsNothing else to configure — search_docs works the moment there are
files under that folder.
Upgrading
npx loopengine upgrade-ability lp-docs-search --agent <your-agent>See loopengine's own ABILITIES.md for how abilities, installs, and
upgrades work in general — this ability doesn't do anything a
hand-written tool couldn't; it's just one someone else already wrote and
tested.
