pixel-agents README

The project's README from github.com/pixel-agents-hq/pixel-agents. As one markdown file: README.md.

Pixel Agents

The most playful way to orchestrate your agents

version marketplaces npm downloads stars license discord

🛒 VS Code Marketplace • 🛒 Open VSX • 📦 npm • 👾 Discord • 💬 Discussions • 🤝 Contributing • 📋 Changelog

Pixel Agents turns the AI coding agents running in your terminals into animated pixel-art characters working in a tiny office. They walk to their desks, sit down, type when they're editing files, read when they're searching, and flag you visually when they're stuck waiting for input.

It ships in two forms from the same codebase:

The architecture is fully agent-agnostic and editor-agnostic: a typed HookProvider interface defines the integration boundary so adding a new AI tool is a single subdirectory of code. Claude Code is the reference implementation today; Codex, Gemini, Cursor, and others are on the roadmap.

Pixel Agents screenshot

Features

Pixel Agents characters

Where This Is Going

The vision is: play a game, build a product. Two goals follow from it: to build a familiar, intuitive interface for running and orchestrating a lot of agents; and to make the hours you spend doing it feel less like administration and more like play.

Roughly three stages get there:

  1. Everywhere, with everything. Today it's Claude Code in VS Code or the browser. It should be whatever agent you run, wherever you work. A new CLI is a subdirectory, not a rewrite — this is where help is most useful right now.
  2. Actually a game. Health bars for rate limits and token budgets. Scores for whatever you care about. Furniture that does things. Offices you open like save files, one per project.
  3. Expand the orchestration frontier. Orchestrator characters. Form a team by dragging a box around them. Hand work between agents. Point them at a board and let them pick up tasks themselves.

Most of this is still ahead. See Issues and Discussions for what's open, and CONTRIBUTING.md to jump in.

Requirements

Getting Started

VS Code extension

  1. Install Pixel Agents from the VS Code Marketplace or Open VSX.
  2. Open the Pixel Agents panel beside the terminal.
  3. Click + Agent to launch Claude Code. In a multi-root workspace, select the folder first.

To use Claude with --dangerously-skip-permissions, hover over + Agent to find the Skip permissions mode button. Only use this when you accept the security implications.

Pixel Agents also detects Claude sessions started outside the extension. Turn on Settings → Watch All Sessions to include sessions from other workspaces.

Standalone CLI

Run Pixel Agents from the workspace whose Claude sessions you want to see:

cd /path/to/your/project
npx pixel-agents

The CLI chooses a free local port and prints the URL. Standalone does not launch Claude for you; start Claude Code in a terminal for the same workspace. To install the command globally instead:

npm install --global pixel-agents
pixel-agents

Use a fixed address or port when needed:

pixel-agents --port 3100
pixel-agents --host 127.0.0.1 --port 3100
pixel-agents --help

The default bind address is 127.0.0.1. Binding to 0.0.0.0 exposes the UI and WebSocket to the local network; do this only on a trusted network.

Open the URL the CLI prints - it carries a ?token= for this session. Any browser can watch the office without it, but installing or removing hooks (which edits your agent tool's own settings file, like the ~/.claude/settings.json) is only offered to a session that has the token, so an untokened client on the network cannot approve it. Open the bare address instead and the hooks toggle in Settings is refused, and reports the actual install state rather than appearing to work.

Treat that URL as a secret: the token is a bearer capability, not proof of being local. Whoever holds it can approve the hook install from anywhere the server is reachable — so don't paste the URL into a shared channel, and note that it also lands in your browser history and (unredacted) in the server's own request log.

Pass --no-terminal to disable the embedded terminal — watch agents without launching or attaching to them from the browser.

Running the extension and standalone together

The extension and standalone CLI can run at the same time. Each server registers under ~/.pixel-agents/servers/; the hook script sends events to all active registrations. VS Code and standalone keep separate agents, seats, and settings while using the shared office layout.

Stop a standalone server with Ctrl+C. It removes only its own registration.

Customizing the Office

Click Layout to edit the office:

Layouts can grow to 64×64 tiles by clicking the ghost border outside the current grid.

Office assets

Bundled furniture, floors, walls, carpets, characters, and pets live under webview-ui/public/assets/. Furniture manifests describe sprites, rotation groups, state groups, and animation frames.

Use Settings → Add Asset Directory to load external characters, pets, and furniture. See docs/external-assets.md for furniture directory structure and manifest details. The visual asset manager at scripts/asset-manager.html helps create furniture manifests.

How It Works

Pixel Agents uses two Claude Code detection paths:

The Claude provider normalizes both sources into a shared AgentEvent model. AgentRuntime updates the central state store, and the active transport sends typed messages to the React webview. The office renders through Canvas 2D with pathfinding and character state machines.

Pixel Agents does not modify Claude Code. Its hook configuration and persistent data live under ~/.claude/ and ~/.pixel-agents/ respectively.

Architecture

The extension and CLI are bundled with esbuild; the webview is built with Vite. Unit tests use Vitest and Node's test runner, and end-to-end coverage uses Playwright against VS Code and standalone.

Development

git clone https://github.com/pixel-agents-hq/pixel-agents.git
cd pixel-agents
npm install
npm run build

Press F5 in VS Code to launch the Extension Development Host. To run the standalone bundle built from source:

node dist/cli.js

Common checks:

npm run check-types
npm run lint
npm test
npm run e2e

See CONTRIBUTING.md for the development workflow and e2e/README.md for the end-to-end suite.

Hosted Test Reports

Build the combined Allure report locally and stage it for Vercel:

npm run test
npm run e2e
npm run e2e -- --attach-videos-on-success
npm run vercel:prepare

Use npm run test:report to build the combined report without preparing the Vercel output, then npm run test:report:open to serve it locally.

The staged output serves the combined e2e, server, and webview Allure report at /reports/allure/; it does not include a standalone webview preview. GitHub Actions creates a Vercel Preview deployment only for same-repository pull requests targeting main. The deploy job expects VERCEL_TOKEN, VERCEL_ORG_ID, and VERCEL_PROJECT_ID secrets and skips fork pull requests.

Troubleshooting

Community & Contributing

Join the Discord to chat with other users and follow development. Use Issues to report bugs or request features, and Discussions for questions and ideas.

See CONTRIBUTING.md before opening a pull request and read our Code of Conduct before participating.

Supporting the Project

GitHub Sponsors Ko-fi

Star History

Star History Chart

License

Pixel Agents is available under the MIT License.

pixel-agents (pixel-agents-hq/pixel-agents)

Searching Database…

这是什么?Pixel Agents 会把你终端里运行的 AI 编程代理变成在小办公室里工作的像素风动画角色。它们会走到办公桌前,编辑文件时敲键盘,搜索时阅读,遇到需要你输入而停下来等待时,会以视觉方式提醒你。
这是 VS Code 扩展还是独立应用?两者皆是,基于同一套代码:一个在面板区域渲染角色的 VS Code 扩展,以及一个独立的命令行工具(npx pixel-agents)。后者会运行本地服务器,并以浏览器应用的形式提供同一个办公室,适用于 tmux、远程或不使用 VS Code 的工作流程。
我该如何运行它?在 VS Code 中,从 Marketplace 或 Open VSX 安装,打开 Pixel Agents 面板,然后点击 '+ Agent' 启动 Claude Code。使用命令行时,在你想监控的工作区文件夹中运行 'npx pixel-agents',它会打印出一个带会话令牌的本地网址。
支持哪些编程代理?需要预先安装什么?你需要先安装并配置好 Claude Code 命令行工具。目前 Claude Code 是唯一的参考实现,Codex、Gemini、Cursor 在路线图中。VS Code 扩展需要 VS Code 1.105.0+,独立命令行工具需要 Node.js 20+。
独立命令行工具的网址有什么安全隐患吗?打印出的网址包含一个会话令牌,它相当于一种持有即可使用的凭证。任何拿到它的人都可以远程批准钩子安装,而且它还会未经脱敏地被记录在你的浏览器历史和服务器日志中。因此不要分享它,也不要在不可信的网络上绑定到 0.0.0.0。
它会修改 Claude Code 或访问我的文件吗?不会。Pixel Agents 不会修改 Claude Code 本身,它的钩子配置和持久化数据分别存放在 ~/.claude/ 和 ~/.pixel-agents/ 下。
它如何检测代理正在做什么?它使用两种途径:一种是钩子模式,由脚本接收 SessionStart、PreToolUse、Stop 等 Claude 事件;另一种是启发式备用方案,在钩子不可用时扫描 ~/.claude/projects/ 下 Claude 的 JSONL 会话记录。
我可以自定义办公室布局吗?可以。内置编辑器允许你涂刷地板和墙壁、放置和旋转家具、添加宠物、创建映射到工作区文件夹的命名区域,并将布局导入或导出为 JSON。布局最大可达 64x64 个方格。
同时运行多个代理或子代理时会怎样?每个代理终端都会拥有自己的动画角色。临时子代理以及持久的 Claude 队友(Agent Teams)也会以独立角色出现,各自拥有不同的职责和生命周期变化。
我能同时运行 VS Code 扩展和命令行工具吗?可以,两者能够同时运行。每个实例都会在 ~/.pixel-agents/servers/ 下注册,各自保留独立的代理、座位和设置,同时共享同一个办公室布局。
Size
3.6 MB
Stars
9.8K
Age
8mo
Commits · 90 Days