pi-context
Agentic Context Management for the Pi
Package details
Install pi-context from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-context- Package
pi-context- Version
1.1.3- Published
- Apr 14, 2026
- Downloads
- 1,677/mo · 376/wk
- Author
- ttttmr
- License
- MIT
- Types
- extension, skill
- Size
- 57.7 KB
- Dependencies
- 0 dependencies · 0 peers
Pi manifest JSON
{
"extensions": [
"./src/index.ts",
"./src/context.ts"
],
"skills": [
"./skills"
],
"image": "https://github.com/ttttmr/pi-context/raw/refs/heads/main/img/context.png"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
Pi Context: Agentic Context Management for the Pi
A Git-like context management tool that allows AI agents to proactively manage their context.
Inspired by kimi-cli d-mail, implementing lossless time travel on the Pi session tree.
For the design philosophy, see the blog post (中文版本).
Installation
pi install npm:pi-context
Usage
For Humans
Run the command to enable ACM (Agentic Context Management) for the current session.
/acm
View detailed context window usage and token distribution with a visual dashboard. (like claude code /context)
/context

For Agents
This extension adds the context-management skill with three core tools:
🔖 Structure (
context_tag)git tagCreate named milestones to structure your conversation history.📊 Monitor (
context_log)git logVisualize your conversation history, check token usage, and see where you are in the task tree.⏪ Compress (
context_checkout)git checkoutMove the HEAD pointer to any tag or commit ID. Compress completed tasks into a summary to free up context window space.
