Composable agent runtime monorepo built on the pi ecosystem
Find a file
Hari cb7e083f9e
Merge pull request #15 from getcompanion-ai/hari/migrate-openclaw-to-pi-mono
feat: extend GatewayRuntime with session management and API endpoints
2026-03-06 22:58:33 -05:00
.github chore: approve contributor lajarre 2026-03-05 19:21:04 +00:00
.husky models 2026-03-05 16:45:36 -08:00
.pi packages 2026-03-05 15:55:27 -08:00
packages models 2026-03-06 19:58:19 -08:00
scripts rename 2026-03-05 19:32:56 -08:00
.gitattributes chore: add repository .gitattributes for line ending normalization 2026-02-26 01:11:34 +01:00
.gitignore fix 2026-03-06 10:05:58 -08:00
AGENTS.md remove 2026-03-05 22:01:45 -08:00
biome.json remove 2026-03-05 22:01:45 -08:00
CONTRIBUTING.md rename 2026-03-05 19:32:56 -08:00
install.sh rename 2026-03-05 19:32:56 -08:00
LICENSE Initial monorepo setup with npm workspaces and dual TypeScript configuration 2025-08-09 17:18:38 +02:00
package-lock.json remove 2026-03-05 22:01:45 -08:00
package.json remove 2026-03-05 22:01:45 -08:00
pi-mono.code-workspace rename 2026-03-05 19:32:56 -08:00
pi-test.sh fix: handle empty args array in pi-test.sh 2026-01-25 23:47:35 +01:00
public-install.sh macos install 2026-03-06 13:42:09 -08:00
README.md macos install 2026-03-06 13:42:09 -08:00
test.sh fix(coding-agent): tighten session_before emit typing and test env filtering 2026-02-06 11:59:25 +01:00
tsconfig.base.json Try fixing root level compiles 2025-12-03 14:16:00 +01:00
tsconfig.json remove 2026-03-05 22:01:45 -08:00

pi logo

Discord Build status

pi.dev domain graciously donated by

Exy mascot
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/pi launcher,
  • populates ~/.pi/agent/settings.json with package list,
  • installs packages (if npm is available),
  • and can install a user service for pi daemon so it stays alive (systemd on Linux, launchd on 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 check requires npm run build to be run first. The web-ui package uses tsc which needs compiled .d.ts files from dependencies.

License

MIT