pi-agents-annotation
Surface @Agents annotations from your code as context for pi — tell the agent what you're focused on, inline.
Package details
Install pi-agents-annotation from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-agents-annotation- Package
pi-agents-annotation- Version
1.0.1- Published
- Sep 2, 2026
- Downloads
- 281/mo · 24/wk
- Author
- math4mad
- License
- MIT
- Types
- extension
- Size
- 98.7 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./extensions"
],
"image": "https://raw.githubusercontent.com/math4mad/pi-agents-annotation/refs/heads/main/image.png"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-agents-annotation
Drop @Agents annotations in your code to tell pi what you're focused on.
Install
pi install npm:pi-agents-annotation
Usage
Add @Agents: comments to your code in any language:
# @Agents: this auth middleware is the critical path — any changes here need extra care
def authenticate(request):
...
// @Agents: this payment calculation is fragile, triple-check any edits
function calculateTotal(cart) {
...
When you run pi, it scans your git-changed files for annotations and injects them into the system prompt. The agent sees exactly what you're focused on without you having to explain it each time.
Supported comment styles
//(JavaScript, TypeScript, Go, Rust, C, Java, Kotlin, etc.)#(Python, Ruby, Shell, YAML, etc.)--(SQL, Lua, Haskell, etc.)/* */(C-style block comments)
How it works
Before each agent turn, the extension scans git diff --name-only HEAD for recently changed files, extracts @Agents: annotations, and appends them to the system prompt.
License
MIT
