$ cat ~/map/pi-matrix-integration.md
pi-matrix-integration
Steer a pi session from a Matrix room — milestones post out, your replies steer the agent from anywhere.
extensions✓ Nov 8
Facts
- repository
- github.com/r3dnl/pi-matrix-integration ↗
- GitHub Stars
- ★ 2
- Forks
- 0
- license
- NOASSERTION
- npm / mo
- —
- last push
- Nov 15, 2026
install
pi install git:github.com/r3dnl/pi-matrix-integration@v0.9.0 (version 0.9.0, beta — developed and used on Linux and macOS, never on Windows).## TL;DR
A pi extension that connects a session to a Matrix room: milestones, TODO progress and each turn's final answer post to the room, replies from Element or any bridged app steer the agent, and one session runs as one thread whose root message is rewritten in place with topic, points and decisions — surviving /compact and restarts.
## Key points
- $Live progress feed with full attribution: the room gets milestones, TODO progress, session/compact/model events and each turn's final answer; terminal input echoes to the room as a user message and room input shows in the terminal prefixed [Matrix].
- $Decision dialogues are mirrored: an ask_user_question questionnaire posts into the room and can be answered on either surface — first answer wins; replies use option numbers or labels, Custom: free text for anything else, thumbs up or down for yes/no, and a review step posts before work proceeds — confirm sends it on.
- $One session is one thread: the thread root is rewritten in place with topic, points and decisions as the session progresses, kept current across /compact and restarts and readable by a phone-only user.
- $Every extension command is reachable from the room — /matrix-* commands, other extensions' commands and /skill: calls included — with no per-user allowlist: Matrix room membership is the access control, while pi built-ins like /new and /reload stay terminal-only.
- $Files move both ways: @ picks a workspace file for the agent from the room, @@ attaches files the agent sends back, Markdown and HTML formatting is translated in both directions, and voice messages are transcribed to text in the terminal.
- $Security posture: end-to-end encryption support, secure terminal login, an agent-owned Matrix account separate from your personal one, credentials in a 0600 file; three model-facing tools (matrix_send_milestone, matrix_get_messages, matrix_update_thread_summary) let pi use the room on its own.
- $Setup needs a homeserver with password login (tested against Synapse): the easy path requires the agent account to create rooms, set the room alias and invite users; otherwise Manual Room Setup resolves rooms by alias (or a pre-set roomId); keep the room invite-only.
- $Configuration precedence is environment variables, then config file, then defaults: <project>/.pi/matrix/matrix-config.json(.jsonc) or ~/.config/pi-matrix-integration/ globally, every key with a PI_MATRIX_ override; profile-suffixed configs go live only via /matrix-switch at runtime.
## FAQ
Q Does it work on Windows?
The README's beta disclaimer says it has been developed and used on Linux and macOS, never on Windows — use at your own risk.
Q Who can drive my session from the room?
Any room member can type any extension command and it runs against your session; there is no per-user allowlist — Matrix room membership is the access control, so keep the room invite-only.
Q Can I install it from npm?
The README documents the git install pinned at v0.9.0 and says pi install npm:pi-matrix-integration will work once the npm publish lands.
Q Why do I see no sub-agent events in the room?
Sub-agent visibility and room-mode thread summaries ride on a sub-agent extension being installed — the README recommends @tintinweb/pi-subagents.
Q Threads are missing in my Matrix client.
Threads are a Labs feature in Element X (iOS); Element Desktop shows threads in a panel.
## References
- README (features, setup, commands) ↗
- Configuration reference (every key, default, override) ↗
- QUICKSTART.md ↗
## Related entries
$ pi-agent-substrate
Suspendable remote workspaces for pi and Oh My Pi, on a self-hosted Agent Substrate cluster.
$ big-pi
Model-driven compression that summarizes completed phases into tiered blocks while Pi's JSONL transcript stays authoritative and untouched.
$ inception
A curator LLM replaces pi's compaction, rewriting old history every few turns to keep the context dense.
## Guides
Last updated: Nov 15, 2026