Skip to content

longyangxi/bit-office

Repository files navigation

Bit Office

Pixel office for AI agents and multi-agent collaboration

npm version License: MIT Node.js PRs Welcome

Support Claude, Codex, Gemini, Aider etc. — one team, getting better every project.

Quick Start | Features | Team Workflow | Architecture | Contributing


Image

What is Bit Office

Bit Office gives AI automation a visible, controllable workspace. Different AI models collaborate as one team under a Team Leader — planning, coding, reviewing, and delivering in a single flow, all rendered in a live pixel-art office you can watch, control, and share.

What makes it different: agents get better over time. Rate each project on creativity, visual quality, interaction, completeness, and engagement. Your ratings and review patterns are stored as persistent memory — the next time the team plans a project, they know what scored low and actively improve on it.

Quick Start

npx bit-office

That's it. This will:

  1. Start a local gateway daemon
  2. Open the pixel-art office UI in your browser
  3. Auto-detect installed AI CLIs (Claude, Codex, Gemini, Aider, OpenCode)
  4. Generate a pair code for mobile access

Features

Multi-Agent Teams

A Team Leader coordinates specialists like Developer and Code Reviewer to plan, implement, and validate tasks automatically.

Multi-Model Workflows

Run Claude, Codex, Gemini, Aider, and OpenCode together in one pipeline, letting each model focus on what it does best.

Pixel Office Workspace

Watch agents work in real time inside a PixiJS pixel-art office, with live status, logs, and progress visualization.

Instant Preview & Rating

Every completed task generates an auto preview. Rate the result across five dimensions — your feedback becomes persistent memory that shapes how agents approach the next project.

Self-Improving Agents

Review patterns, tech preferences, and project ratings are stored across sessions. Agents learn what you value and adapt — low visual scores lead to richer designs, recurring review failures get avoided automatically.

Token Cost Visibility

Track token usage per agent and per team in real time so you always know the cost of each run.

Live Sharing & Mobile Control

Invite others to watch progress, leave feedback, or manage sessions directly from your phone.

Cross-Device Sync

Real-time collaboration powered by WebSocket, Ably, and Telegram channels.

Project History

Every run is saved with a replayable preview, letting you revisit results and build on previous work.

Team Workflow

Phase What Happens Your Action
Create Team Lead gathers intent and scope Describe what to build
Design Team Lead proposes implementation plan Approve or request changes
Execute Developer implements, Reviewer validates Monitor or cancel
Complete Preview and summary delivered Rate, give feedback, or end project

Ratings persist as agent memory. The next project starts with lessons from the last one.

Full details in team-workflow.md.

Use Cases

  • AI-native prototyping — go from idea to working preview in one session
  • Feature spikes — rapid implementation with continuous preview feedback
  • Multi-model experiments — compare how different AI backends approach the same task
  • Live demos — show autonomous development workflows to your team or audience

Run from Source

Prerequisites

  • Node.js 18+
  • pnpm
  • At least one AI CLI installed: claude, codex, gemini, aider, or opencode

Setup

git clone https://github.com/longyangxi/bit-office.git
cd bit-office
pnpm install
pnpm dev

Scripts

Command Description
pnpm dev Web + gateway in dev mode
pnpm dev:web Web only (Next.js)
pnpm dev:gateway Gateway only
pnpm dev:desktop Tauri desktop app (dev mode)
pnpm build Build all packages
pnpm build:desktop Build Tauri .app + .dmg
pnpm start Build web and start gateway

Environment Variables

Variable Required Description
WORKSPACE No Agent working directory
ABLY_API_KEY No Remote real-time channel
TELEGRAM_BOT_TOKENS No One token per bot/agent (comma-separated)
WS_PORT No Gateway WebSocket port (default: 9090)
WEB_DIR No Override served web build directory

Desktop App (Tauri)

Bit Office also ships as a native macOS desktop app powered by Tauri. The app bundles the gateway as a sidecar — no terminal, no browser, just launch and go.

Prerequisites

  • Node.js 18+, pnpm
  • Rust toolchain — install via: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Dev Mode

pnpm dev:desktop

This starts the gateway (port 9099), web dev server, and Tauri window in one command.

Build Release

pnpm build:desktop

Produces Bit Office.app and .dmg at:

apps/desktop/src-tauri/target/release/bundle/macos/Bit Office.app
apps/desktop/src-tauri/target/release/bundle/dmg/Bit Office_0.1.0_aarch64.dmg

The release app:

  • Auto-starts an embedded gateway (sidecar)
  • Connects via local WebSocket (port 9090)
  • Minimizes to system tray on close
  • Reopens from Dock click

Port Convention

Mode Gateway Port Web
npx bit-office 9090 Bundled at same port
pnpm dev 9099 localhost:3000
pnpm dev:desktop 9099 Tauri window → localhost:3000
Desktop app (release) 9090 Tauri window → static export

Architecture

bit-office/
├── apps/
│   ├── web/            # Next.js PWA + PixiJS pixel office + control UI
│   ├── gateway/        # Runtime daemon: events, channels, policy, orchestration
│   └── desktop/        # Tauri v2 native shell (macOS .app/.dmg)
└── packages/
    ├── orchestrator/   # Multi-agent execution engine
    └── shared/         # Typed command/event contracts (Zod schemas)

Channels: WebSocket (always on), Ably (optional), Telegram (optional)

Tech Stack

  • Frontend: Next.js 15, React, PixiJS v8, Zustand
  • Desktop: Tauri v2 (Rust + system WebView)
  • Backend: Node.js daemon, WebSocket
  • Protocol: Zod-validated event schemas
  • Integrations: Ably, Telegram, external process detection

Contributing

Issues and PRs are welcome. If you're exploring AI-native dev tooling, workflows, or interfaces, Bit Office is a great playground for experiments.

Acknowledgments

Pixel office art inspired by pixel-agents by @pablodelucca.

License

MIT - feel free to use, modify, and distribute.


If Bit Office helps your workflow, consider giving it a star!