Bash tool had no default timeout, so commands like `npx serve` would block the agent loop forever. This caused the randomtrends sandbox thread to die - the LLM started a dev server, the shell never exited, and the entire session hung with no way to recover. Two safeguards: - Default 120s timeout when LLM does not specify one - 30s no-output timeout that kills processes that go silent Both are configurable via BashToolOptions and can be disabled by setting to 0. The LLM can still pass explicit higher timeouts for long builds. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .husky | ||
| packages | ||
| scripts | ||
| .gitignore | ||
| AGENTS.md | ||
| biome.json | ||
| CONTRIBUTING.md | ||
| install.sh | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| pi-mono.code-workspace | ||
| public-install.sh | ||
| README.md | ||
| tsconfig.base.json | ||
| tsconfig.json | ||
pi.dev domain graciously donated by
![]()
exe.dev
pi
Looking for the pi coding agent? See packages/coding-agent for installation and usage.
Tools for building AI agents and running the pi coding agent.
Packages
| Package | Description |
|---|---|
| @mariozechner/pi-ai | Unified multi-provider LLM API (OpenAI, Anthropic, Google, etc.) |
| @mariozechner/pi-agent-core | Agent runtime with tool calling and state management |
| @mariozechner/pi-coding-agent | Interactive coding agent CLI |
| @mariozechner/pi-tui | Terminal UI library with differential rendering |
| @mariozechner/pi-web-ui | Web components for AI chat interfaces |
Contributing
See CONTRIBUTING.md for contribution guidelines and AGENTS.md for project-specific rules (for both humans and agents).
Install
Public (binary)
Use this for users on production machines where you don't want to expose source.
curl -fsSL https://raw.githubusercontent.com/getcompanion-ai/co-mono/main/public-install.sh | bash
Install everything and keep it always-on (recommended for new devices):
curl -fsSL https://raw.githubusercontent.com/getcompanion-ai/co-mono/main/public-install.sh | bash -s -- --daemon --start
This installer:
- Downloads the latest release (or falls back to source when needed),
- writes
~/.local/bin/pilauncher, - populates
~/.pi/agent/settings.jsonwith package list, - installs packages (if
npmis available), - and can install a user service for
pi daemonso it stays alive (systemdon Linux,launchdon macOS).
Preinstalled package sources are:
["npm:@e9n/pi-channels", "npm:pi-memory-md", "npm:pi-teams"]
If npm is available, it also installs these packages during install.
If no release asset is found, the installer falls back to source.
PI_FALLBACK_TO_SOURCE=0 \
curl -fsSL https://raw.githubusercontent.com/getcompanion-ai/co-mono/main/public-install.sh | bash -s -- --daemon --start
public-install.sh options:
curl -fsSL https://raw.githubusercontent.com/getcompanion-ai/co-mono/main/public-install.sh | bash -s -- --help
Local (source)
git clone https://github.com/getcompanion-ai/co-mono.git
cd co-mono
./install.sh
Run:
./pi
Run in background with extensions active:
./pi daemon
For a user systemd setup, create ~/.config/systemd/user/pi.service with:
[Unit]
Description=pi daemon
After=network-online.target
[Service]
Type=simple
Environment=CO_MONO_AGENT_DIR=%h/.pi/agent
Environment=PI_CODING_AGENT_DIR=%h/.pi/agent
ExecStart=/absolute/path/to/repo/pi daemon
Restart=always
RestartSec=5
[Install]
WantedBy=default.target
Then enable:
systemctl --user daemon-reload
systemctl --user enable --now pi
On macOS, public-install.sh --daemon --start now provisions a per-user launchd agent automatically.
Optional:
npm run build # build all packages
npm run check # lint/format/typecheck
Development
npm install # Install all dependencies
npm run build # Build all packages
npm run check # Lint, format, and type check
./test.sh # Run tests (skips LLM-dependent tests without API keys)
./pi-test.sh # Run pi from sources (must be run from repo root)
Note:
npm run checkrequiresnpm run buildto be run first. The web-ui package usestscwhich needs compiled.d.tsfiles from dependencies.
License
MIT