H0nGzA1

Agents View — AI skill for Claude Code

AI community

Live local tree view of your AI coding agent sessions — Claude Code, Codex, OpenCode, omp, pi.

How to install Agents View

This entry records only its repository, not the path inside it, so there is no exact command to give. Open H0nGzA1/agents-view and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agents View does

Live local tree view of your AI coding agent sessions — Claude Code, Codex, OpenCode, omp, pi.

Alternatives in AI

  • Botmux — Bridge Feishu/Lark to AI coding CLIs — Claude Code, Codex, Gemini, OpenCode… every DM, group or topic spawns i 1.2k ★
  • Claude Replay — Convert AI coding agent sessions (Claude Code, Cursor, Codex, Gemini, OpenCode) into self-contained, embeddabl 644 ★
  • Codbash — Termius-style browser dashboard for Claude Code & Codex sessions 195 ★

README

Agents View

本地 AI 编程 agent 会话的实时树状视图。打开浏览器就能看到每个工作会话里:主 agent 派出了哪些子 agent、各自用什么模型、在做什么、跑了多久、花了多少钱。

A live, local tree view of your AI coding agent sessions — Claude Code, Codex, OpenCode, omp and pi.

![Agents View](docs/screenshot.jpg)

特性

  • 多 agent 产品:Claude Code、Codex、OpenCode、omp、pi,侧栏可按产品筛选
  • 子 agent 树:主会话为根,子 agent 按真实的派生关系挂在下面,可展开/折叠
  • 实时:每 2 秒刷新,新子 agent 淡入,费用数字滚动,运行中的计时器逐秒跳动
  • 费用:Claude 按官方价格计算(含缓存读写与 fast 模式);OpenCode / omp / pi 用它们自己记录的费用;没有价格数据的显示 token 数,不瞎估
  • 真实图标:按模型自动识别厂商(Anthropic、OpenAI、Gemini、智谱 GLM、Kimi、DeepSeek、Qwen、MiniMax、MiMo…)
  • 明暗主题、零依赖、无需构建

快速开始

需要 Python 3.10+,没有任何第三方依赖。

git clone https://github.com/H0nGzA1/agents-view.git
cd agents-view
python3 server.py          # 默认端口 7788,可传参:python3 server.py 8080

打开 。

读取的数据

全部**只读**,从不修改任何日志。

产品 位置 子 agent 树 费用来源
Claude Code ~/.claude/projects/ ✅ 按价格表计算
Codex ~/.codex/sessions/ — 显示 token
OpenCode ~/.local/share/opencode/opencode.db ✅ OpenCode 记录
omp ~/.omp/agent/sessions/ ✅ omp 记录
pi ~/.pi/agent/sessions/ — pi 记录

没装的产品会被自动跳过。

工作原理

各产品的本地日志 ──增量读取──▶ server.py ──JSON 轮询──▶ index.html
  • sources.py:每个产品一个适配器,把各自的格式(jsonl / SQLite)统一成 core.Log 记录
  • core.py:价格表、图标映射、状态判断、节点树与费用汇总
  • server.py:标准库 HTTP 服务;日志按字节偏移增量解析,大文件刷新也只需几毫秒
  • index.html:原生 JS,按节点 id 原地更新 DOM;连线、折叠、主题全部由 CSS 完成

添加新的 agent 产品

在 `sources.py` 里写一个适配器类(`key`、`label`、`icon`、`sessions()`、`tree(ref)`),把它的日志字段填进 `Log`,然后加入 `SOURCES` 列表即可。

安全与隐私

  • 只监听 127.0.0.1,并校验 Host 头,防止 DNS 重绑定读取你的会话内容
  • 会话 id 只能匹配服务端自己列出的会话,不会用请求参数拼接文件路径
  • 不联网、不上传任何数据

已知局限

  • 运行状态(Running / Done / Stopped)目前是基于"最近是否有写入"的简单启发式,见 core.status_of()
  • Codex、pi 的日志里没有父子关系,只显示为单个节点

图标致谢

图标版权归各自所有者,商标归各品牌所有,仅用于标识对应产品。