pi-coding-agent is an Emacs frontend for Pi, an extensible command-line coding agent. The Pi CLI still does the actual work — running the agent loop, talking to model providers, and executing tools — while this package wraps it in a native Emacs interface so the prompt is no longer confined to a terminal text box. It communicates with Pi over RPC, so Emacs receives structured messages and tool events rather than raw terminal text. It targets Emacs users who want Pi's runtime with editor-native editing, navigation, and keybindings.
A session opens two windows: a chat buffer at the top rendering the Markdown conversation, tool output, thinking blocks, and diffs (with tree-sitter syntax highlighting), and a separate input buffer at the bottom where the next prompt is composed as an ordinary Emacs buffer — supporting multi-line editing, the kill ring, macros, Evil, and slash-command and file-path completion. A header line shows the current model, thinking level, activity phase, cost, and context usage. Beyond basic sending, it supports queuing follow-ups while Pi is busy, steering messages that interrupt the current tool, aborting a response, forking a conversation from any turn, resuming and compacting sessions, opening files directly from tool output, and HTML/Markdown export.
Each project directory gets its own session automatically, with support for multiple named sessions and TRAMP (Pi runs on the remote host). Pi authentication happens through the CLI (a provider API key or a one-time terminal /login), and the package requires Emacs 29.1+ with tree-sitter, Node.js, and the Pi CLI installed. It has basic support for Pi extensions and skills, though rich terminal-UI extension widgets are not yet reproduced in Emacs. The README positions it specifically as a focused Pi frontend, contrasting it with more general Emacs LLM tools such as gptel, Aidermacs, claude-code-ide.el, agent-shell, and eca-emacs.
