GLEN FOR PI
Pi, with your team's memory on every turn.
The @tryglen/pi package connects pi to your organization's shared memory. Before each turn it pulls in the memories that match your prompt; after each turn it records what was done, next to sessions from Claude Code, Codex, Cursor and the rest of the team.
What you need
- A Glen account. Sign in at app.tryglen.com, or use Start free at the top of this page to create one. Search, skills and artifacts all work on the Free plan.
- The pi coding agent, and Node.js for the glen CLI.
Install Glen for Pi
- 01Install the glen CLI and sign in:bash
npm install -g @tryglen/cli glen login - 02Add the package to pi.
glen installdoes this for you when it finds pi.bashpi install npm:@tryglen/pi - 03Restart pi or run
/reload. Update later withglen update, which updates the CLI and the package together.
How it works
session_start
Shows your organization and recording mode.
before_agent_start
Sends your prompt and workspace context to Glen, gets back the memories that match, and adds them to the model's context for that turn.
agent_settled
Records the finished turn: your prompt and pi's final answer.
tool_result (bash)
After a git commit, links the commit to the session. When a command prints a pull request for this repository, it offers Glen's local reviewer once.
It never blocks pi
Each event runs one glen CLI command and fails open: if Glen is unreachable or the CLI is missing, pi keeps working and shows one warning per session.
Try asking
- Before you refactor the reminder job, what broke last time?
- What's our naming rule for feature flags?
- /skill:search who decided to keep sessions in Redis?
Tools
The Pi plugin reaches Glen through the glen CLI and its hooks, not through MCP tools. The same server also runs a remote MCP endpoint for chat clients and any other MCP client; the MCP server reference covers it.
What Glen sends and stores
- The prompt you send and the agent's final reply for each turn.
- Workspace context: repository name, branch, commit and remote URL.
- The agent name (pi) and a session id, so turns from one session stay together.
- Content-free error codes about the glen CLI itself (command, flag names, versions). Turn them off with glen telemetry disable.
Everything goes to your organization in Glen and nowhere else. Retention, deletion and the services Glen uses are in the privacy policy and the list of sub-processors.
Turning it off
Go off the record
glen incognito keeps recall working and writes nothing to team memory. Admin analytics still count your prompts, as numbers only.
Turn Glen off
glen off recalls nothing and records nothing. glen on turns it back on. Both apply on every machine and agent.
Forget something
Ask the agent to forget a wrong or outdated memory (the forget skill), or remove it from Memories in the dashboard.
Privacy and support
What Glen stores, how long it keeps it and how to have it deleted are covered in the Glen privacy policy. For anything the policy doesn't answer, write to support@tryglen.com. Stuck on setup? The support page says what to include.