@charonova/agenthq

中文文档
0.3.0发布于 2026/11/01MITES Module零依赖

A pixel-art office for your Claude Code and Codex sessions: every session an office, the main agent its manager, every subagent at a desk.

原始使用文档
文档目录4 节
  1. Run it
  2. How it works
  3. Develop
  4. License

🏢 AgentHQ

A pixel-art office for your Claude Code and Codex sessions.

Website · How it works · Develop

AgentHQ: the building of live sessions, then one office: teammates walk from the couch to their desks, to the bookshelf, to the lab, and into the manager's glass office to report

Every live session is an office. Its main agent is the manager, every teammate gets a desk, and the helpers they start sit beside them as interns. Working agents type at their desks, read at the bookshelf, run tests at the lab and walk over to talk to each other; idle ones get coffee, then nap on the couch.

Early (0.2), and moving fast. Works on macOS, Linux and Windows.

Run it

You need Node.js 20 or later. One command:

npx @charonova/agenthq          # opens the office at http://localhost:4747
npx @charonova/agenthq --list   # or print it in the terminal

Or install it: npm install -g @charonova/agenthq, then agenthq.

The building: three live sessions as offices on one map, with a list of offices on the right Inside an office: the manager in a glass office, staff at desks, the bookshelf, lab and couch, and a selected agent's details
The building · every live session, on one map An office · click anyone for their task, tool, model and context
An agent's conversation open over its office: the prompt, a Markdown reply, a command with its output, and a teammate's message
A conversation · anyone's full chat, live, with every tool call and its output

The pictures come from made-up sessions (pnpm media); AgentHQ shows your own.

  • The building: every live session as an office on one map. Drag to move around, scroll to zoom, click an office to go inside.
  • In an office: the manager in a glass office, staff at desks in their team colour, interns beside whoever started them. Bubbles say what each one is doing; click anyone for their task, tool, model, context and last words.
  • Where they go: writing code → their desk · reading → the bookshelf · commands → the server rack · tests → the lab · web → the window · plans → the whiteboard · messaging a teammate → that teammate's desk · waiting for you → a raised hand · idle → coffee, then the couch. They walk around the furniture.
  • It tells you when someone needs you: a desktop notification and a chime when an agent starts waiting for you (🔔 in the header); click it to jump there. The tab title shows how many are waiting, and the ✋ need you counter goes to each in turn. Optionally, also when a session finishes.
  • A timeline per agent: its latest tool calls, with times, under its details.
  • 💬 The whole conversation: open anyone's conversation, manager, teammate or helper, Claude Code or Codex: your prompts, its replies, every tool call with its input and output, messages between teammates. It follows along live, loads older messages as you scroll up (even in multi-gigabyte sessions), and you can search it.
  • ✋ Answer from AgentHQ (Claude Code, opt-in): permission prompts and questions show up in the agent's conversation. Allow once, pick one of Claude Code's own "always allow" choices, deny with a note on what to do instead, or choose the answers to its questions (or type your own). The terminal still shows the prompt and can answer it too; whichever answers first wins. Turn it on under 🔔: it adds one PermissionRequest hook to ~/.claude/settings.json (a copy of the file is saved first, your other hooks stay), and it does nothing while AgentHQ is closed. Turning it off removes it.
  • Go straight to a session: double-click anyone (or Go to ↗ in their details) and its window comes forward: the exact tab in Terminal or iTerm2, the project's window in VS Code, Cursor or Windsurf, or the app it runs in (macOS). Elsewhere, or when it can't, the command that resumes the session is copied for you.
  • Codex too: each Codex thread is an office, with its sub-agents (like the guardian) as staff, named as in Codex's app.
  • Day and night follow your clock.

How it works

AgentHQ only reads what Claude Code writes in ~/.claude, and nothing leaves your computer (the page is served on 127.0.0.1 only). The one exception is answering from AgentHQ, when you turn it on: then it adds its hook to ~/.claude/settings.json, and keeps its own files in ~/.agenthq (the hook, the running server's address with a secret made fresh each start, and a log of what you answered, names and choices only).

OfficeFrom
OfficesSessions in ~/.claude/projects/*/*.jsonl active in the last 30 minutes
ManagerThe session's own transcript
StaffTeammates: <session>/subagents/agent-*.jsonl whose .meta.json says spawnDepth: 0 (name, colour, model)
InternsHelpers they started: spawnDepth 1+, with parentAgentId
What each one doesThe last lines of its transcript: the tool it called, and how long ago
Where a session runs~/.claude/sessions/<pid>.json (which process runs which session), then the app above that process
Codex~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl (a sub-agent's thread names its parent), names from ~/.codex/session_index.jsonl

Only the end of each transcript is read, so multi-gigabyte sessions stay fast; a conversation is read a page (192 KB) at a time, as you scroll. Settings: AGENTHQ_JUMP=copy makes "go to session" only copy the resume command; AGENTHQ_CLAUDE_HOME reads another folder; AGENTHQ_IGNORE=frag1,frag2 leaves out sessions whose folder contains those (claude-mem's background sessions are left out by default).

Develop

A pnpm workspace:

PackageWhat
packages/coreThe reader: live sessions → offices (Node, no dependencies)
packages/cli@charonova/agenthq: the command, the local server (Server-Sent Events), and the built web app
apps/webThe office: Vite + React + PixiJS (pixi-viewport for the camera), Zustand for state
e2ePlaywright tests on a made-up ~/.claude
pnpm install
pnpm dev          # server + Vite with hot reload: http://localhost:5173
pnpm check        # lint, format, types, unit tests
pnpm build        # web app, then the CLI with it inside
pnpm e2e          # end-to-end tests (after a build), with screenshots in test-results/
pnpm start        # build, then open the office
pnpm media        # the README's screenshots and GIF, from made-up sessions

CI runs the checks on Linux, macOS and Windows, and the end-to-end tests on Linux.

License

MIT

版本与发布记录

@charonova/agenthq 共发布 3 个版本,首次发布于 2026/10/31;过去 12 个月发布了 3 个版本。

版本发布日期距今
0.3.0latest2026/11/012 天前
0.2.02026/10/312 天前
0.0.0-stage2026/10/312 天前

关于 @charonova/agenthq 的常见问题

@charonova/agenthq 是什么?

为你的《Claude Code》和《Codex》设置一个像素级的办公室:每个会话都是一个办公室,主代理是它的经理,每个子代理都是一张桌子。

如何安装 @charonova/agenthq?

在项目目录运行 npm install @charonova/agenthq,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 agenthq,可以用 npx agenthq 直接运行。

@charonova/agenthq 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/charonova__agenthq 是否存在。

@charonova/agenthq 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@charonova/agenthq 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@charonova/agenthq 可以商用吗?

@charonova/agenthq 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@charonova/agenthq 还在维护吗?

最新版本 0.3.0 发布于 2026/11/01(2 天前);至今共发布 3 个版本,其中过去 12 个月发布了 3 个;首次发布于 2026/10/31。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。