oci docker.io/psyb0t/pibox:v0.15.11stdioWTFPLupdated 26d ago
pi-coding-agent inside an aicodebox container. One image, several ways in: interactive shell, one-shot prompt, HTTP API (with an OpenAI-compatible endpoint), MCP server, Telegram bot, and a cron scheduler that fires pi on whatever schedule you want.
What can you do with Pibox?
docker-pibox
pi-coding-agent inside an aicodebox container. One image, several ways in: interactive shell, one-shot prompt, HTTP API (with an OpenAI-compatible endpoint), MCP server, Telegram bot, and a cron scheduler that fires pi on whatever schedule you want.
You talk to pibox. pibox talks to pi. pi talks to whatever LLM you point it at. Nobody cares about the middle.
Table of Contents
Quick start
# one-shot prompt
docker run --rm \
-e ANTHROPIC_AUTH_TOKEN=your-token \
-e ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic \
-e ANTHROPIC_MODEL=glm-4.6 \
psyb0t/pibox:latest \
-p "list the files in /workspace"
# API server
docker run -d --network host \
-e PIBOX_API_MODE=1 \
-e PIBOX_API_MODE_TOKEN=your-secret \
-e PIBOX_AVAILABLE_MODELS=glm-4.6,glm-4.5-air \
-e ANTHROPIC_AUTH_TOKEN=your-token \
-e ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic \
-e ANTHROPIC_MODEL=glm-4.6 \
-v "$PWD/workspace:/workspace" \
psyb0t/pibox:latest
Modes
Foreground modes (API / Telegram / Cron) are mutually exclusive — except PIBOX_TELEGRAM_MODE=1 + PIBOX_CRON_MODE=1, which run together (cron in-thread inside telegram). API wins if set alongside anything else.
MCP mode (PIBOX_MCP_MODE=1) is independent — it coexists with whatever foreground mode is running. In API mode it's mounted at /mcp on the API port; in other modes it runs as a sidecar uvicorn on its own port.
Each mode has its own page with full setup, env vars, and examples.
API Mode →
Long-lived FastAPI server on :8080. Agent runs (sync, async with run-id polling, cancellable), workspace file upload/download/list/delete with traversal checking, and an OpenAI-compatible chat/completions endpoint with streaming and client-executed tool calling.
environment:
- PIBOX_API_MODE=1
- PIBOX_API_MODE_TOKEN=your-secret
- PIBOX_AVAILABLE_MODELS=glm-4.6,glm-4.5-air
Telegram Mode →
Talk to pi from Telegram. Per-chat isolated workspaces, allowed-chats and per-chat allowed-users gating, file ingestion, [SEND_FILE: path] to get files back, and per-chat /model, /effort, /system_prompt, /append_system_prompt overrides that persist across restarts.
environment:
- PIBOX_TELEGRAM_MODE=1
- PIBOX_TELEGRAM_MODE_TOKEN=123456:ABC
Cron Mode →
YAML-defined scheduled jobs on 6-field croniter schedules. Per-run history dirs with meta.json, stdout.log, stderr.log, result.txt, and a "prior run" hint so a job can reference its own history.
environment:
- PIBOX_CRON_MODE=1
- PIBOX_CRON_MODE_FILE=/home/aicode/.aicodebox/cron.yaml
MCP Mode →
Exposes run_prompt plus workspace-confined file tools over streamable HTTP, so other agents can drive pi as a tool. Coexists with any foreground mode — mounted at /mcp on the API port in API mode, a sidecar on its own port everywhere else.
environment:
- PIBOX_MCP_MODE=1
- PIBOX_MCP_MODE_TOKEN=your-secret
Configuration
Naming convention: PIBOX_<MODE>_MODE=1 is the on/off flag, PIBOX_<MODE>_MODE_<KNOB>=... is its config. Non-mode-scoped vars (workspace, container name, available models) are bare.
The image is built on top of aicodebox, so the equivalent AICODEBOX_* names also work — the entrypoint translates PIBOX_X to AICODEBOX_X when only the pibox-prefixed one is set. If you set both, AICODEBOX_* wins.
Mode flags
| Var | Default | What it does |
|---|---|---|
PIBOX_API_MODE |
0 |
Boot the HTTP API server (foreground) |
PIBOX_TELEGRAM_MODE |
0 |
Boot the Telegram bot (foreground) |
PIBOX_CRON_MODE |
0 |
Boot the cron scheduler (foreground; in-thread when telegram is also on) |
PIBOX_MCP_MODE |
0 |
Expose MCP — mounted at /mcp in API mode, or as a sidecar elsewhere |
Each mode's own knobs (ports, tokens, config paths, history dirs) live on that mode's page: api.md, telegram.md, cron.md, mcp.md.
Workspace & runtime
| Var | Default | What it does |
|---|---|---|
PIBOX_WORKSPACE |
/workspace |
Root workspace dir inside the container |
PIBOX_CONTAINER_NAME |
aicodebox |
Used to scope per-container state files (auth, etc.) |
PIBOX_AVAILABLE_MODELS |
— | Required for API mode. CSV list returned by /openai/v1/models and shown in the telegram /model picker. API mode refuses to boot without it; telegram /model picker degrades to a "set this env var" reply. |
PIBOX_AVAILABLE_EFFORTS |
adapter list | Override the effort/--thinking list shown by the telegram /effort picker (comma-separated) |
Auth
pi speaks the Anthropic wire protocol. Point it at any Anthropic-compatible endpoint:
| Var | Purpose |
|---|---|
ANTHROPIC_AUTH_TOKEN |
Bearer token (Z.AI, direct Anthropic, etc.) |
ANTHROPIC_API_KEY |
Same thing — pi reads both |
ANTHROPIC_BASE_URL |
Endpoint override (default: https://api.anthropic.com) |
ANTHROPIC_MODEL |
Default model when the caller doesn't specify one |
Z.AI's GLM models are fast and cheap for most tasks — ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic + ANTHROPIC_MODEL=glm-4.6 is the recommended default.
pi's thinking levels (--thinking): off, minimal, low, medium, high, xhigh. Exposed as the /effort command in telegram mode and as thinking in API requests.
Agent integrations
The skill works in any agent that reads .agents/skills/, and
installs natively in the clients below.
Claude Code
claude plugin marketplace add psyb0t/agents
claude plugin install pibox@psyb0t
Claude Code prompts for the pibox URL and, if auth is enabled, the API and MCP tokens — sensitive values are stored in your OS keychain.
Codex
codex plugin marketplace add psyb0t/agents
codex plugin add pibox@psyb0t
Installed via the marketplace, the skill invokes as $pibox:pibox. Codex also picks the
skill up automatically with no install in any repo containing .agents/skills/, where it
invokes as plain $pibox.
OpenClaw
The skill is published to ClawHub on every release:
openclaw skills install @psyb0t/pibox
For MCP clients that speak local stdio, the @psyb0t/pibox plugin
bridges to the service's /mcp endpoint:
openclaw plugins install clawhub:@psyb0t/pibox
Then set PIBOX_URL (and PIBOX_MCP_MODE_TOKEN if the server was started with MCP auth
enabled).
Development
make help # list targets
make build # pull the published aicodebox base, build + tag psyb0t/pibox:v<VERSION> and :latest
make test # run the full e2e suite (needs .env.test)
make clean # remove built images
VERSION is read from pibox/pyproject.toml. make build pulls the published psyb0t/aicodebox base pinned in the Dockerfile; set SKIP_BASE_PULL=1 to use a locally-built base instead (e.g. from a sibling ../docker-aicodebox checkout), or override with make build BASE_IMAGE=....
Tests
End-to-end tests build the image and run it against a real LLM endpoint. Telegram tests use psyb0t/telethon-plus as a real MTProto userbot.
cp .env.test.example .env.test
$EDITOR .env.test # fill in ANTHROPIC_* and optionally Telegram creds
make test
Telegram tests auto-skip if AICODEBOX_TELEGRAM_MODE_TOKEN is empty. Everything else only needs ANTHROPIC_AUTH_TOKEN + ANTHROPIC_BASE_URL.
License
WTFPL — see LICENSE. Do what the fuck you want.
Install
Add Pibox to your client. Pick the one you use.
claude mcp add docker-io-psyb0t-pibox-v0-15-11 -- docker run -i --rm docker.io/psyb0t/pibox:v0.15.11codex mcp add docker-io-psyb0t-pibox-v0-15-11 -- docker run -i --rm docker.io/psyb0t/pibox:v0.15.11amp mcp add docker-io-psyb0t-pibox-v0-15-11 -- docker run -i --rm docker.io/psyb0t/pibox:v0.15.11{
"mcpServers": {
"docker-io-psyb0t-pibox-v0-15-11": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/psyb0t/pibox:v0.15.11"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"docker-io-psyb0t-pibox-v0-15-11": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/psyb0t/pibox:v0.15.11"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"docker-io-psyb0t-pibox-v0-15-11","command":"docker","args":["run","-i","--rm","docker.io/psyb0t/pibox:v0.15.11"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"docker-io-psyb0t-pibox-v0-15-11": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/psyb0t/pibox:v0.15.11"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"docker-io-psyb0t-pibox-v0-15-11": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/psyb0t/pibox:v0.15.11"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"docker-io-psyb0t-pibox-v0-15-11": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/psyb0t/pibox:v0.15.11"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"docker-io-psyb0t-pibox-v0-15-11": {
"type": "local",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/psyb0t/pibox:v0.15.11"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"docker-io-psyb0t-pibox-v0-15-11": {
"command": {
"path": "docker",
"args": [
"run",
"-i",
"--rm",
"docker.io/psyb0t/pibox:v0.15.11"
]
}
}
}
}Add to your Zed `settings.json`.
docker run -i --rm docker.io/psyb0t/pibox:v0.15.11Run `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance25/25
- Trust13/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 18 days ago
- Has a release history
- Repository is not archived
- Licensed WTFPL
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 0.15.11Latest | Aug 13, 2026 |
| 0.15.9 | Aug 9, 2026 |
| 0.15.8 | Aug 1, 2026 |
| 0.15.7 | Jul 27, 2026 |
| 0.15.6 | Jul 27, 2026 |
| 0.15.5 | Jul 27, 2026 |
| 0.15.4 | Jul 27, 2026 |
| 0.15.3 | Jul 26, 2026 |