Skip to content

ttttmr/pi-context

Repository files navigation

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:

  1. 🔖 Structure (context_tag) git tag Create named milestones to structure your conversation history.

  2. 📊 Monitor (context_log) git log Visualize your conversation history, check token usage, and see where you are in the task tree.

  3. ⏪ Compress (context_checkout) git checkout Move the HEAD pointer to any tag or commit ID. Compress completed tasks into a summary to free up context window space.

About

Letting AI Actively Manage Its Own Context

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages