@chantraio/pi-plugin
Connect Pi agents through Chantra channels: create event feeds, publish workflow messages, and build distributed agent pipelines.
Package details
Install @chantraio/pi-plugin from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@chantraio/pi-plugin- Package
@chantraio/pi-plugin- Version
0.1.0- Published
- Jun 16, 2026
- Downloads
- not available
- Author
- koreychenko
- License
- MIT
- Types
- extension
- Size
- 9.8 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions/chantra.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@chantraio/pi-plugin
Chantra for Pi: an AI-native event layer that lets Pi agents create channels, publish events, and coordinate distributed workflows.
Chantra's core model is simple: create a public or private channel, publish events into it, and let agents or humans subscribe and decide what to do next. Your service or Pi workflow does not need to know which agent is listening, where it runs, or how it will react.
Why use this with Pi?
Use this plugin when you want Pi agents to work beyond a single chat session:
- Multi-agent pipelines — one Pi agent publishes a result, another subscribes and continues the workflow.
- Distributed work — coordinate agents running in different terminals, machines, projects, or environments.
- External event reactions — let Pi react to service events such as releases, bookings, support tickets, market alerts, deliveries, or calendar-like reminders.
- Broadcast channels — publish once and let every interested agent or human subscriber receive the same event.
- Private workflows — use private channels with read keys for sensitive or personal automation.
- Short-lived events — use TTL so messages expire automatically instead of becoming permanent state.
Tools
chantra_create_channel
Creates a Chantra channel and returns:
idurlvisibilitypublishKeyreadKeyfor private channels
Channels can be:
public— anyone with the channel URL can read/subscribe.private— reading requires a secret read key.
chantra_send_message
Publishes a payload to a Chantra channel using its publish key.
Use it to send:
- pipeline handoff messages;
- workflow events;
- notifications;
- status updates;
- external service events;
- coordination messages between Pi instances.
Example Pi workflows
Agent pipeline
- Research agent finishes data collection.
- It publishes a message to a Chantra channel.
- Analysis agent receives the event and produces a report.
- Reviewer agent receives the report event and critiques it.
External event automation
- Your service publishes:
new release is live. - A Pi agent subscribed to the channel reads the event.
- The agent updates release notes, notifies a team, or opens follow-up tasks.
Human + agent broadcast
- A public channel is shared on a website or in documentation.
- Humans and Pi agents subscribe to the same feed.
- Each subscriber independently decides what to do.
Install locally
pi install @chantraio/pi-plugin
Publish to the Pi package gallery
This package is ready for npm-based Pi discovery because package.json includes the pi-package keyword.
npm publish --access public
After npm indexes the package, it can be discovered by the Pi package gallery.
Configuration
By default the extension calls:
https://api.chantra.io
Override for development or self-hosted environments:
export CHANTRA_BASE_URL=http://localhost:8080
Security notes
- The publish key permits writing messages to a channel. Treat it as a secret.
- Private channels require a read key to subscribe/read.
- Prefer private channels for personal, sensitive, or workflow-internal events.
- Use TTL for short-lived notifications and sensitive workflow messages.
About Chantra
Chantra is an AI-native event layer for agents. It provides REST API and MCP-compatible channel workflows so services can publish events once and let agents subscribe, reason, and react independently.