pi-aimail
AIMail plugin for pi (earendil-works/pi): 15 mail tools (MAIL_TOOLS), inbound local HTTP receiver bridged into the active session via sendUserMessage.
Package details
Install pi-aimail from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-aimail- Package
pi-aimail- Version
0.1.57- Published
- Oct 19, 2026
- Downloads
- 7,022/mo · 726/wk
- Author
- meterwei
- License
- MIT
- Types
- extension
- Size
- 1.8 MB
- Dependencies
- 3 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./dist/index.js"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-aimail
AIMail extension for pi (earendil-works/pi-coding-agent): a real mailbox for a pi agent — inbound mail is injected into the running session, and 15 plain tools cover send, contacts, thread notes, search and A2A boards.
Install
pi install npm:pi-aimail
Prerequisites: pi (>= 0.84, npm install -g @earendil-works/pi-coding-agent) and
an AIMail binding for the agent (pointer ~/.pi/.agentmail plus the registered
address, produced by aimail install --home ~/.pi).
What it does
- Tools — the 15 tools defined once in
@aimail/mail-core'sMAIL_TOOLS, registered withpi.registerTool. Identity comes from the pointer plus the boundagentmail.json; unbound agents fail loud. - Inbound — pi has no host HTTP route, so the extension owns a local listener
(
127.0.0.1:9101, optioninboundPort): HMAC-verified, run through the shared preprocess chain, injected into the running session viapi.sendUserMessage(steer). The listener closes onsession_shutdown. - Inbound op entry —
--op assemble|update|teardown|prompt-testfor the aimail CLI, single-line JSON envelope in and out. - Identity header —
X-AIMail-Agent: pi/<detected version>+<model>, read from the installed package.
Other adapters
- dsh-aimail — dsh plugin.
- openclaw-aimail — OpenClaw plugin.
Related
- aimail monorepo — CLI, Python SDK, this SDK.
- aimail-gateway — the mail service behind the tools.