Tools
Pixel Office
OpenClaw plugin — read-only pixel-art monitoring dashboard for AI agents. Zero write endpoints, safe to expose publicly.
Configuration Example
[
{
"agentId": "main",
"name": "Star",
"isMain": true,
"state": "writing",
"detail": "Working on the report",
"updatedAt": "2026-03-01T10:30:00.000Z",
"avatar": null
}
]
README
# pixel-office
An [OpenClaw](https://github.com/anthropics/openclaw) plugin that provides a **read-only**, publicly-safe pixel-art dashboard showing what your OpenClaw agents are doing — in real time, inside a tiny animated office.
Built with Bun + Hono + Phaser 3. Zero write endpoints. Zero authentication needed.
## How It Works with OpenClaw
OpenClaw agent instances write their current state to `agents.json` on the local filesystem. The pixel-office server reads that file and renders each agent as an animated character in a pixel-art office scene. As agents transition between states (writing, researching, executing, etc.), their characters move between office areas in real time.
```
[ OpenClaw agent ] --writes--> agents.json <--reads-- [ pixel-office server ] --serves--> [ Browser ]
```
Multiple OpenClaw instances can share a single pixel-office dashboard — each appears as a guest agent in the office with its own avatar and status bubble.
## Security Model
**This server is read-only by design.** There are no POST, PUT, PATCH, or DELETE endpoints. The entire API surface is three GET routes:
| Endpoint | Description |
|----------|-------------|
| `GET /` | Pixel office UI |
| `GET /health` | `{ status: "ok", timestamp }` |
| `GET /agents` | Agent roster (read from `agents.json`) |
Because nothing can be written through HTTP, it is safe to expose publicly with no authentication. The filesystem is the only trust boundary.
## Quick Start
```bash
bun install
bun run start
# http://localhost:18791
```
## Updating Agent State
OpenClaw agents update their state by writing directly to `agents.json`. A CLI helper is included for manual testing:
```bash
# Set main agent to "writing" state
bun run scripts/push-state.ts main writing "Working on the report"
# Set back to idle
bun run scripts/push-state.ts main idle "Standing by"
# Add a guest OpenClaw agent
bun run scripts/push-state.ts agent_helper researching "Investigating issue #42"
```
Any OpenClaw instance or process that can write JSON can update agent state — no HTTP API needed.
## `agents.json` Format
```json
[
{
"agentId": "main",
"name": "Star",
"isMain": true,
"state": "writing",
"detail": "Working on the report",
"updatedAt": "2026-03-01T10:30:00.000Z",
"avatar": null
}
]
```
Valid states: `idle`, `writing`, `researching`, `executing`, `syncing`, `error`
## Configuration
All display text is driven by `office.config.json` — office name, state labels, bubble texts. Swap the file to localize to any language.
## Architecture
```
pixel-office/
agents.json # Agent state (written by OpenClaw, read by server)
office.config.json # Display config (name, labels, bubble texts)
src/
index.ts # Hono app entry point
config.ts # Config loader
lib/
types.ts # TypeScript interfaces
state.ts # State normalization + area mapping
agents.ts # Read agents.json + auto-offline cleanup
routes/
health.ts # GET /health
agents.ts # GET /agents
middleware/
no-cache.ts # Cache-Control headers
public/
index.html # UI shell
game.js # Phaser 3 game logic
layout.js # Coordinate/depth config
assets/ # Sprites + fonts
scripts/
push-state.ts # CLI state updater
```
## Credits
Pixel art and sprite assets from [Star-Office-UI](https://github.com/ringhyacinth/Star-Office-UI). Rebuilt as a read-only Bun + TypeScript server for the OpenClaw ecosystem.
tools
Comments
Sign in to leave a comment