@m4ss/pi-llms-txt
llms.txt cache-first tool — fetch and cache llms.txt from any domain, inject guidance so the model uses it before deep-fetching docs
Package details
Install @m4ss/pi-llms-txt from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@m4ss/pi-llms-txt- Package
@m4ss/pi-llms-txt- Version
0.1.0- Published
- Jul 6, 2026
- Downloads
- 159/mo · 13/wk
- Author
- paolobarbolini
- License
- MIT
- Types
- extension
- Size
- 28.9 KB
- Dependencies
- 0 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@m4ss/pi-llms-txt
We built this to let the model discover a site's structure before diving into
individual pages. It fetches and caches llms.txt from documentation sites
using a cache-first strategy.
The llms.txt standard is a curated, LLM-friendly map of a
website's most important content. Not many sites publish one yet, but when they do,
this extension gives the model a site map before it starts fetching pages. For sites
that don't publish llms.txt, the tool reports it and moves on.
Notes
- Cache-first with 24h TTL for hits; misses (404/410/SPA catch-alls) cached for 7 days.
- Downloaded bodies capped at 40 KB; larger files are truncated with a note.
- Cached files live in
~/.pi/agent/llms-txt-cache/.
Install
pi install npm:@m4ss/pi-llms-txt
Usage
The LLM calls llms_txt on its own. You can also invoke it directly:
llms_txt("www.postgresql.org")
llms_txt("redis.io", forceRefresh=true)
Commands
| Command | Action |
|---|---|
/llmstxt |
Show cached domains and cache status |
/llmstxt-clear |
Flush all cached llms.txt files |
Related packages
@m4ss/pi-web-fetch– usellms.txtto discover important pages, then fetch them withweb_fetch@m4ss/pi-search-delegator– delegatesllms_txtto the searcher subagent when installed
License
MIT