Observed since 20 Oct, 23:30 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Show Antigravity CLI, Claude Code, Codex and Grok Build sessions and their subagents as a live tree: model, effort, context use, elapsed time, status.
agents-tree is a live terminal CLI and optional herdr plugin for viewing
coding-agent sessions and their nested subagents as a tree. It shows Antigravity
CLI (agy), Claude Code, Codex and Grok Build with each agent's model and effort,
context use, elapsed time and status.
In a terminal, agents-tree .:

As a live overlay in herdr, one key away (prefix+a):

It reads the transcripts Antigravity CLI (agy), Claude Code, Codex and Grok Build keep on disk and never talks to a session, so nothing it prints ends up in an agent's context. It has no dependencies beyond Python 3.10.
Antigravity CLI (agy), Claude Code, Codex and Grok Build are supported.
uv tool install agents-tree # or: pipx install agents-tree
From a checkout: uv tool install ., or run it in place with
PYTHONPATH=src python3 -m agents_tree.
Install the plugin to open the live tree over the focused agent pane with one key:
herdr integration install claude # herdr learns each pane's session id
herdr plugin install blavka/agents-tree
herdr plugin action invoke agents-tree.setup-keys
agents-tree # every running session on this machine
agents-tree . # sessions running in this directory (or its newest session)
agents-tree ~/src/api # same, for another directory
agents-tree 1a2b3c4d # one session, by id or a unique prefix (an ambiguous one lists the matches)
agents-tree -r # only running subagents and their parents
agents-tree -w # live view like top, refreshed every 2 s (-n 5 for 5 s)
agents-tree --json . # one schema-versioned JSON document for scripts
agents-tree --provider agy # Antigravity CLI sessions
agents-tree --provider codex # Codex sessions under ~/.codex (or $CODEX_HOME)
agents-tree --provider grok # Grok Build sessions under ~/.grok (or $GROK_HOME)
--json writes the provider-neutral session and agent tree, including each
agent's detail, to stdout. It is intended for scripts and other tools; errors
go to stderr and it cannot be combined with --watch.
In the live view:
| Key | Does |
|---|---|
↑ ↓ / j k / wheel | select an agent |
Enter / → / click | open its detail: the prompt it was given, its tool calls (and the one it is waiting on), its last message, request and token counts, transcript path |
Esc / ← / q | back to the tree (in the tree: clear the selection, then quit) |
PgUp PgDn Home End | scroll the detail, or jump through the tree |
r | toggle running-only |
Ctrl+C | quit |
The live view takes the mouse for clicks and the wheel; most terminals still
select text with Shift held, or start it with --no-mouse. When the tree is
taller than the terminal, the oldest finished agents are folded into a
"… N older finished agents hidden" line.
Enter on a row opens that agent's detail:

| Column | Meaning |
|---|---|
| label | agent-type: description as the spawning agent gave it; main for the session itself |
| model (effort) | model of the agent's latest request, and its effort level (models without effort show none) |
| context | tokens in the latest request (input + cache + output), and that as a share of the context window |
| elapsed | first to last transcript entry; up to now while the agent runs |
| status | subagents: running (active in the last 2 minutes, or waiting on a tool call), completed / failed (as Claude Code reported), done (finished, no outcome recorded), idle (a teammate waiting for its next message), stale (no sign of life and no completion marker); main: the session's own state, or not running |
summary.json when set; otherwise 2M for grok-4 /
grok-code, 128k for other models. Override with --window 200000 or
AGENTS_TREE_WINDOW.- until agents-tree is updated.claude agents --json; without
claude on PATH, agents-tree falls back to ~/.claude/sessions/
(interactive sessions only).~/.grok/active_sessions.json
(or $GROK_HOME) whose process is still alive, including a session that is
only waiting. A session also counts while its updates.jsonl was written in
the last two minutes, or while a subagent's meta.json still says running.~/.gemini/antigravity-cli/brain/ (or
$ANTIGRAVITY_HOME). The older ~/.gemini/antigravity/ layout remains supported.herdr shows your agents, not their subagents. The plugin in this repository opens the live tree for the focused agent pane over that pane; closing it gives the layout back.
| Key | Action |
|---|---|
prefix+a | live tree of the focused agent's session; q or the same key closes it |
prefix+shift+a | live tree of every running session |
On a pane without an agent, prefix+a shows every running session. The plugin
runs the copy of agents-tree bundled in the repository, so it needs only
python3 3.10+ (or AGENTS_TREE_PYTHON pointing at one). setup-keys writes
one marked block into your herdr config.toml (backed up first) and leaves keys
you already use alone; agents-tree.remove-keys takes it out again. The
open-split and open-tab actions show the same tree in a split or a tab.
For development, link a checkout instead: herdr plugin link /path/to/agents-tree.
uv sync
uv run pytest
uv run pylint src
uv run pylint tests --disable=redefined-outer-name,protected-access,unused-argument
uv run pyright
CI (.github/workflows/test.yaml) runs the same on every push and pull request:
lint and types on Python 3.12, then the tests, a test run and a package build on
3.10 to 3.14.
To release, bump version in pyproject.toml, src/agents_tree/__init__.py and
herdr-plugin.toml, then push a matching tag (git tag v0.2.0 && git push origin v0.2.0). .github/workflows/publish.yaml checks the tag against the version,
tests, builds and publishes to PyPI through trusted publishing.
AGENTS.md is the guide for working on the code, including adding a provider; docs/demo/ shows how to check agents-tree against a real agent run in a throwaway project.
Providers live in src/agents_tree/providers/: each turns one agent CLI's files
into the provider-neutral Session/Agent model in model.py, which
render.py draws.
MIT
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.2.0 | 8 Oct 2026 | 0 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 23:30 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:e234373d54e17ce9932a2978f99d2b74282cbdd47f9d7f99729a7ed949a217cf