Profile
Back to NewsBack
GitHub Trending 5 min
Reader Mode
robotbird/piwork: An open-source AI workspace for teams, powered by Pi Agent.

robotbird/piwork: An open-source AI workspace for teams, powered by Pi Agent.

14 hours ago

piwork logo

piwork

An enterprise AI agent platform built on the Pi Agent SDK — chat, skills, sandboxed execution, and organization management in a single Next.js app.

License: Apache 2.0</a> Next.js 16</a> React 19</a> Pi Agent 1.8.0</a> Node >=22</a> Stars</a>

Quick Start · Features · Report an Issue · Commercial Cooperation

English | 简体中文


piwork — chat workspace

✨ Features

  • 💬 Multi-user AI chat — streaming responses, file attachments, and a personal document library
  • 🔌 Model provider plugins — DeepSeek, Tongyi, and ZhipuAI ship built-in; add your own with the provider SDK
  • 🛠️ Skills & Pi Packages — manage agent skills in the admin console, including multi-select install from links; skill scripts run only inside a sandbox
  • 🧱 Sandboxed execution — agent tools (bash/read/write/edit) execute in Docker- or OpenSandbox-backed runtimes, isolated from the host; pure chat stays in-process
  • 📁 Project workspaces — attach documents and images as project sources, with per-project chat history
  • ⏰ Scheduled tasks — cron-style recurring agent tasks with run history
  • 🤝 Chat collaboration — share chats with teammates, live presence and typing indicators
  • 🏢 Organization management — members, departments, and roles with per-role model permissions and token quotas
  • 🔍 Optional web search — integrate Tavily as a platform-hosted search tool, or enable the pi-web-access Pi package (keyless DuckDuckGo and more) via the extension runtime
  • 🌐 Internationalization — English and Simplified Chinese UI

(back to top ⬆️)

📖 Table of Contents

- Prerequisites

🖼️ Screenshots

piwork — chat workspace

piwork — web research with sources

piwork — admin overview

(back to top ⬆️)

📦 Installation

Prerequisites

Install dependencies

corepack enable
pnpm install

(back to top ⬆️)

🚀 Quick Start

  1. Configure environment variables (see .env.example):
cp .env.example .env.local
   # set POSTGRES_URL, AUTH_SECRET, and at least one model API key
  1. Apply the database schema and start the dev server:
pnpm db:migrate
   pnpm dev
  1. Open , register an account, then configure a provider (API key) under Admin → Models.
  2. Start chatting. The chat path never falls back to a static model — if the model catalog is empty, configure a provider first.

(back to top ⬆️)

📖 Usage

Model providers

Manage providers under Admin → Models. Each provider plugin supplies the model catalog; credentials are stored server-side and never exposed to sandboxes.

Skills

Under Admin → Skills, upload skill archives or install multiple skills at once from a link. Skill bundles are size- and count-limited, and skill scripts execute only inside the sandbox runtime.

Project workspaces

Create a project, upload documents and images as sources, and chat with the full project context. Project chats always run through the sandboxed runtime.

Sandbox runtime (optional)

By default everything runs in-process. To enable sandboxed execution:

Environment variables

PIWORK_SANDBOX_PROVIDER=docker          # docker | opensandbox; unset = in-process
PIWORK_SANDBOX_IMAGE=pi-runtime:dev     # build from docker/pi-runtime/Dockerfile
PIWORK_SANDBOX_CLI_PATH=/opt/pi/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli.js

OpenSandbox additionally requires:

OPENSANDBOX_DOMAIN=...

OPENSANDBOX_API_KEY=...

Testing

pnpm exec tsc --noEmit   # type check
pnpm test:unit           # unit tests
pnpm test:runtime        # runtime tests
pnpm test:runtime:db     # DB tests (needs local PostgreSQL)
pnpm test                # Playwright E2E
pnpm check               # lint (Biome via Ultracite)

All tests live under tests/ (unit in tests/unit, E2E in tests/e2e).

(back to top ⬆️)

🧱 Architecture

Every chat message flows through one direction of responsibility:

graph LR
    A[Chat route] --> B[RunManager]
    B --> C{Runtime backend routing}
    C -->|execution tools enabled| D[SandboxRpc backend<br/>Docker / OpenSandbox]
    C -->|lightweight chat| E[In-process backend]
    D --> F[Pi AgentSession]
    E --> F
    F --> G[Model provider plugins]
  • Pure-conversation runs stay in-process; runs with execution tools are routed to a sandboxed runtime — never silently downgraded.
  • Runtime events are normalized and streamed to the UI; runs and message history persist in PostgreSQL.
  • See AGENTS.md for repository conventions. Full architecture docs are on the roadmap.

(back to top ⬆️)

🧭 Roadmap

  • [ ] Publish full architecture and operations documentation
  • [ ] CONTRIBUTING.md and SECURITY.md
  • [ ] More UI languages
  • [ ] OpenSandbox production provider hardening

(back to top ⬆️)

🤝 Contributing

Issues and pull requests are welcome!

  • Write commit messages in English following Conventional Commits — for example feat(chat): ... or fix(runtime): ...
  • Read AGENTS.md for repository conventions before making changes
  • A dedicated contributing guide is on the roadmap

(back to top ⬆️)

📄 License

Distributed under the Apache License 2.0. Personal, research, educational, internal business, and commercial use are permitted without license fees or additional permission from the author. This includes modification, resale, redistribution under your own brand, and paid hosting, subject to the license terms.

When redistributing the project or derivative works, comply with Section 4 of the license, including:

  • Provide a copy of the license to recipients.
  • Clearly mark modified files and retain applicable copyright and attribution notices.
  • Include applicable attribution notices from NOTICE in one of the forms allowed by the license.
Copyright and attribution: Copyright © 2026 robotbird and piwork contributors, each for their respective contributions.

Names and logos: Section 6 of Apache License 2.0 does not grant trademark rights in the piwork name or logo, except for reasonable and customary use to describe the origin of the work and reproduce NOTICE content. Branding should not imply that a derivative product or hosted service is an official piwork offering or is endorsed by the maintainers. This does not restrict your right to redistribute the code under your own brand in compliance with the license.

(back to top ⬆️)

Commercial Cooperation

For paid deployment assistance, custom development, systems integration, technical support, or brand partnerships, please email [email protected] or contact robotbird via the author's GitHub profile.

(back to top ⬆️)

Chat with me