pi-agent-bot
Multi-bot daemon with Pi SDK, Respire memory, team coordination, and web GUI for managing AI agents
Package details
Install pi-agent-bot from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-agent-bot- Package
pi-agent-bot- Version
0.1.0-beta.0- Published
- Oct 11, 2026
- Downloads
- 1,299/mo · 1,299/wk
- Author
- asural
- License
- Apache-2.0
- Types
- extension
- Size
- 546.6 KB
- Dependencies
- 5 dependencies · 2 peers
Pi manifest JSON
{
"main": "./dist/index.js",
"name": "pi-agent-bot",
"version": "0.1.0-beta.0",
"homepage": "https://github.com/luodaoyi/pi-bot#readme",
"extensions": [
"./dist/respire-extension/index.js"
],
"description": "Multi-bot daemon with Pi SDK, Respire memory, team coordination, and web GUI for managing AI agents"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-bot
Open-source port of DeepSeek-Bot to pi coding agent with Respire memory system integration.
Overview
pi-bot is a multi-bot daemon built on the Pi SDK that provides:
- Multi-bot Management: Run multiple AI assistants simultaneously with different roles and capabilities
- Session Pooling: Efficient session management with automatic idle cleanup
- Team Coordination: Inter-bot messaging and collaborative problem-solving
- Group Chat: Multi-bot group discussions with configurable speaking modes
- Respire Memory: Persistent long-term memory via the Respire runtime
- HTTP/SSE API: RESTful API with Server-Sent Events for real-time updates
- Web UI: Modern React-based interface (separate package)
Packages
This monorepo contains:
pi-bot: Main daemon with HTTP server, bot management, and coordinationpi-respire: Pi extension providing Respire memory integration@pi-bot/respire-client: TypeScript client for Respire Runtime HTTP RPC@pi-bot/shared: Shared types and utilities@pi-bot/web: React web interface (coming soon)
Pi Package Gallery
pi-bot is discoverable in Pi's official package gallery. To appear in the gallery, packages must include:
- Keywords:
pi-packageandpi-coding-agentinpackage.json - Pi Manifest: The
pifield with:extensions: Array of extension entry pointsimage(optional): Cover image URL for gallery displayhomepage(optional): Package homepage URL
- Standard Metadata:
description,repository,homepage,license
See pi documentation for details.
Prerequisites
- Node.js: >= 22.19.0 (requires
node:sqlitefor built-in SQLite support) - Pi Coding Agent: @earendil-works/pi-coding-agent >= 1.1.0
- Respire Runtime: rsrs for memory backend (optional)
Installation
Via npm
npm install -g pi-agent-bot
# Or install as a Pi package
pi install npm:pi-agent-bot
From source
git clone https://github.com/luodaoyi/pi-bot.git
cd pi-bot
pnpm install
pnpm -r build
Quick Start
- Start the daemon:
pi-bot serve
The server starts on http://localhost:16888 by default.
- Create your first bot:
curl -X POST http://localhost:16888/api/bots \
-H "Content-Type: application/json" \
-d '{
"name": "Assistant",
"role": "Helper",
"instructions": "You are a helpful coding assistant.",
"model": {
"provider": "deepseek",
"modelId": "deepseek-chat"
}
}'
- Send a message:
curl -X POST http://localhost:16888/api/bots/bot-xxx/messages \
-H "Content-Type: application/json" \
-d '{
"content": "Hello! Can you help me with Python?"
}'
Configuration
Configure via environment variables or ~/.pi-bot/config.json (CLI uses pi-bot command):
{
"host": {
"apiPort": 16888,
"home": "~/.pi-bot"
},
"respire": {
"port": 15169,
"autostart": true
},
"pi": {
"defaultModel": "deepseek/deepseek-chat"
}
}
Memory System
pi-bot integrates with Respire for long-term memory:
- Automatic Memory: Bots can store and recall information across sessions
- Scoped Memory: Per-bot, team-shared, or project-specific memory
- Semantic Search: Query memories by natural language
- Policy-Based: Configurable recall policies and memory modes
Memory is automatically enabled when Respire runtime is available. Set RSRS_RPC_PORT to customize the connection.
Development
# Install dependencies
pnpm install
# Type check
pnpm -r typecheck
# Lint
pnpm -r lint
# Test
pnpm -r test
# Build
pnpm -r build
# Run in development mode
pnpm --filter pi-bot dev
API Documentation
See docs/api.md for complete HTTP API reference.
Key endpoints:
GET /api/bots- List all botsPOST /api/bots- Create botPOST /api/bots/:id/messages- Send messageGET /api/events- SSE event stream
Publishing to npm
One-time Setup (Repository Maintainer)
- Configure npm Trusted Publishing with OIDC:
# Go to https://www.npmjs.com/settings/<your-username>/tokens
# Click "Generate New Token" → "Granular Access Token"
# Select packages: pi-bot, pi-respire
# Enable "Automation" scope
# Copy the token
- Add GitHub Secret:
# Go to GitHub repo → Settings → Secrets and variables → Actions
# Click "New repository secret"
# Name: NPM_TOKEN
# Value: <paste token>
- Enable Provenance:
The release workflow automatically uses --provenance flag for supply chain transparency.
Publishing a Release
- Update version in all packages:
cd packages/pi-bot && npm version patch # or minor, major
cd ../pi-respire && npm version patch
git commit -am "chore: bump version to 0.x.x"
- Push and tag:
git tag v0.x.x
git push origin main --tags
GitHub Actions will automatically:
- Build all packages
- Publish to npm with provenance
- Create GitHub release with auto-generated notes
Contributing
Contributions are welcome! Please see CONTRIBUTING.md.
License
Apache-2.0
Credits
Inspired by DeepSeek-Bot and powered by:
- Pi Coding Agent
- Respire Memory System
- Hono web framework
Status: Early development. API may change.