Agent Graph

Getting started

Install agent-graph and start recording your agents’ sessions. Choose where they run:

macOS

  1. Install agent-graph 0.1.19:brew tap chofter/tap brew trust chofter/tap brew install --cask chofter/tap/agent-graphOr, without Homebrew:curl -fsSL https://agentgraph.chofter.com/install.sh | shOr download the program itself (unpack it, and put agent-graph on your PATH):macOS · Apple siliconmacOS · Intel
  2. Start recording Claude Code sessions:agent-graph install claude-codeUsing Codex? Record its sessions too:agent-graph install codex

Linux

  1. Install agent-graph 0.1.19:curl -fsSL https://agentgraph.chofter.com/install.sh | shOr with Homebrew:brew tap chofter/tap brew trust chofter/tap brew install --cask chofter/tap/agent-graphOr download the program itself (unpack it, and put agent-graph on your PATH):Linux · x86_64Linux · ARM64
  2. Start recording Claude Code sessions:agent-graph install claude-codeUsing Codex? Record its sessions too:agent-graph install codex

Windows

  1. Install agent-graph 0.1.19:irm https://agentgraph.chofter.com/install.ps1 | iexIn PowerShell. It puts agent-graph.exe in %USERPROFILE%\.local\bin, and adds that to your PATH. Run it again to upgrade.Or with Node (npm):npm install -g @chofter/agent-graphOr download the program itself (unpack it, and put agent-graph on your PATH):Windows · x64Windows · ARM64
  2. Start recording Claude Code sessions:agent-graph install claude-codeUsing Codex? Record its sessions too:agent-graph install codex

npm

  1. Install agent-graph 0.1.19:npm install -g @chofter/agent-graphFor macOS, Linux and Windows, with Node 16 or later. Install it globally, not with npx: the hooks run the program from where npm puts it. npm update -g @chofter/agent-graph upgrades it.
  2. Start recording Claude Code sessions:agent-graph install claude-codeUsing Codex? Record its sessions too:agent-graph install codex

Claude Code cloud

  1. On your computer, with agent-graph installed (as for macOS or Linux), go to the root folder of your copy of the GitHub repository you’ll open in the cloud, and add the cloud’s hooks to its .claude/settings.json:agent-graph install claude-code --cloud
  2. Still in that repository, commit the file and push it to the branch cloud sessions start from (usually main). A cloud session works in a fresh clone from GitHub, so that’s where it finds the hooks. On your computer they do nothing.git add .claude/settings.json && git commit -m "Share cloud sessions to Agent Graph" && git push
  3. In this site’s account page, under API tokens, make a token, and copy it.
  4. At claude.ai/code, open the environment menu beside the repository picker, and open the settings of the environment you’ll use. (Not claude.ai’s own Settings page: its network settings are for chats, not Claude Code.) There, add the token under environment variables:AGENT_GRAPH_TOKEN=agt_…and set network access to Custom, allowing these two domains:agentgraph.chofter.com firebasestorage.googleapis.comThe environment’s setup script can stay empty.
  5. At claude.ai/code, start a session in that repository, with that environment. It installs agent-graph, records the session, and shares it live: watch it at /watch.

Codex cloud

  1. On this site’s account page, under API tokens, make a token, and copy it (it starts with agt_). It’s shown only once, so keep the page open until step 4.
  2. Go to chatgpt.com/codex and sign in with your ChatGPT account. If you see a page that says “Build anything with Codex”, click Go to Cloud at its top right.
  3. Click the gear icon at the top right (beside the bell and your picture), then Environments. Click the environment for the GitHub repository you’ll work in (create one for it there first, if there isn’t one), then click Edit. Everything in steps 4 to 7 is on that Edit page. (Not ChatGPT’s own settings, whose options are for chats.)Each environment has its own settings: only tasks in an environment set up this way are recorded. If you have more than one, do steps 3 to 7 for each of them (step 9 says so again).
  4. Under Environment variables, add one named AGENT_GRAPH_TOKEN, with the token from step 1 as its value:AGENT_GRAPH_TOKENNot under Secrets: a secret reaches only the setup script, not the task, so nothing would be shared.
  5. Under Setup script, choose Manual, and add these two lines to the box, after anything already there:curl -fsSL "https://agentgraph.chofter.com/install.sh?cache_bust=$(date +%s)" | sh ~/.local/bin/agent-graph install codex --cloud --yesThey install agent-graph in the cloud’s machine (not on your computer), and the hooks that record each task there and share it.
  6. Under Agent internet access, choose On. Keep the Domain allowlist as it is, and in Additional allowed domains add (after a comma, if there are domains there already):agentgraph.chofter.comSet Allowed HTTP Methods to All methods: sharing sends the session with POST requests.
  7. Click Save environment, at the bottom right.
  8. Back on the environment’s page, click Use this, and give Codex a task. Its session is recorded and shared live: watch it at /watch, where it’s labelled “Codex cloud”. Every task in that environment is shared the same way, with nothing more to do.Nothing at /watch? On the environment’s page, click Reset cache, so the setup script runs again, then start a new task. Codex can read the token, as it can any environment variable, but it can only share to your account; delete it on your account page to stop it working.
  9. Using other environments too, ones you already had or new ones? Each needs the same settings: go back to Environments, and do steps 3 to 7 for each of them. You can use the same token in all of them. Tasks in an environment without them aren’t recorded.

Reference

The agent-graph command

Record, watch and share a live graph of your AI coding agents.

Agent Graph records what your coding agents do, from their own hooks, and shows how the sessions relate:

  • which session started which agents, and who is waiting on whom
  • what needs you: permission prompts, questions, plans to approve
  • what looks stuck or deadlocked, and how much work is left
  • what the sessions sent each other

Everything is recorded on your local machine, the one agent-graph runs on. Nothing leaves it unless you share it, with watch-remote or at https://agentgraph.chofter.com

First steps

  1. agent-graph install claude-codeAdd the recording hooks and the /agent-graph command.
  2. Start a new Claude Code session. Sessions that were already running aren't recorded. Using Codex? agent-graph install codex records its sessions too.
  3. agent-graph tailWatch it live in this terminal, or in your browser with agent-graph view --open.

Examples

agent-graph tree --all

Every session, once, as text.

agent-graph snapshot

A picture of this session, sized for a phone.

agent-graph watch-remote

Share it live, to your account; prints where to see it.

agent-graph install codex

Record Codex's sessions as well.

Where things live

~/.agent-graph/events/One JSON Lines file per session
~/.agent-graph/images/Pictures from snapshot

On Windows the folder is %USERPROFILE%\.agent-graph.

Settings (environment variables)

AGENT_GRAPH_HOME=<dir>Keep data somewhere else
AGENT_GRAPH_CAPTURE_BODIES=1Also record message bodies and final agent messages
AGENT_GRAPH_RAW=1Also keep raw hook payloads, for building adapters
AGENT_GRAPH_NOW=<RFC 3339 time>Read logs as if it were this time
AGENT_GRAPH_AGENT_COMMANDS=a,bMore programs that start an agent session when run from an agent's shell (claude, codex, gemini and other common ones are known)
AGENT_GRAPH_TOKEN=<API token>Log watch-remote in with an API token from your account page, not the browser: for a cloud instance, say

Commands

agent-graph <command> -h (or --help) explains a command in full, with examples.

agent-graph install

Set up a coding agent: hooks that record its sessions, and an /agent-graph command

Set up a coding agent to work with Agent Graph. For Claude Code this does two things:

  1. Adds hooks to Claude Code's settings, so every new session is recorded, including sessions one starts from its shell (claude -p, codex exec, agent-graph run), which appear under it. Each hook runs agent-graph emit in the background: it takes a few milliseconds, never blocks the agent, and never sends anything anywhere. Everything else in the settings file is kept, and the file as it was without Agent Graph is backed up beside it (settings.json.agent-graph.bak); installing again or uninstalling keeps that backup. Sessions that were already running aren't recorded; start a new one. Installing again brings older hooks up to date.
  2. Adds an /agent-graph command (a skill). Run it in any session for a picture of the session and a short summary of what needs you, what looks stuck and what's in progress. /agent-graph all covers every session from the last day, and /agent-graph share gives you a live link. Claude can also use it by itself when you ask how your agents are doing.

For Codex it does the same: hooks in Codex's hooks file (~/.codex/hooks.json, or $CODEX_HOME's), with the file as it was backed up beside it (hooks.json.agent-graph.bak), and the $agent-graph command. Codex only runs a hook once it's trusted, so it also trusts Agent Graph's, in Codex's config.toml, as Codex's /hooks would (backing that file up too, as config.toml.agent-graph.bak), and turns on Codex's plan tool (update_plan, off by default) unless that file already says either way. Nothing else there changes. Codex reads its hooks only when it starts, so afterwards restart the ChatGPT app (quit it with Cmd+Q) and any Codex already running in a terminal; the install ends by saying so. Sessions in the terminal and in the ChatGPT desktop app (which runs the same Codex) are recorded: a session's plan, the subagents it starts and waits for, when it needs your approval or an answer, and sessions it starts from its shell.

In the cloud: install claude-code --cloud adds hooks for Claude Code's cloud (claude.ai/code) to a project's settings, to commit; install codex --cloud, run in a Codex cloud environment's setup script (chatgpt.com/codex), adds hooks for Codex's cloud to Codex's own files there (in /opt/codex, its home in the cloud). Either way, each cloud session is recorded and shared live, at agentgraph.chofter.com/watch, to the account whose API token the environment gives as AGENT_GRAPH_TOKEN. The site's Download section has the steps, for each.

For Gemini CLI it adds just the command for now. Its own sessions aren't recorded yet, so it shows the Claude Code and Codex sessions that are.

Where the command goes (with --scope user)

Claude Code~/.claude/skills/agent-graph/SKILL.md; run it as /agent-graph
Codex~/.agents/skills/agent-graph/SKILL.md; run it as $agent-graph
Gemini CLI~/.gemini/commands/agent-graph.toml; run it as /agent-graph

What --scope changes

userEvery project: files in your home folder. The default.
projectJust this project: .claude/ (or .codex/ and .agents/, .gemini/) in this folder, which you'd usually commit. Its hooks run agent-graph from PATH, so everyone who uses the project needs it installed. Codex only runs a project's hooks once you've trusted the project in Codex.
localLike project, but Claude Code's hooks go in .claude/settings.local.json, which isn't committed. Codex has no such file, so its hooks aren't added. (The command still goes in the project's folder: there's nowhere else. Uninstalling with --scope local leaves it if it's committed, since it's then the project's.)

It lists what it will change and asks before writing: --yes skips the question, and --dry-run only shows the changes. Installing again changes nothing unless something is out of date. A command file of the same name that you wrote yourself is never overwritten.

Options

<claude-code|codex|gemini>The coding agent to set up.
--scope <user|project|local>Every project (user, the default), or just this one (project, or local to keep Claude Code's hooks out of version control).
--dry-runShow what would change, and change nothing.
-y, --yesDon't ask before making the changes.
--command <COMMAND>The command the hooks run, which must contain emit --provider claude-code (or codex: it's how they're found again). Defaults to this executable's emit, or with --scope project, agent-graph emit from PATH.
--no-slash-commandDon't add the /agent-graph command; just the hooks.
--cloudFor Claude Code: add the hooks for Claude Code's cloud (claude.ai/code) to this project's settings (.claude/settings.json), to commit. They do nothing on a computer; in a cloud session they install agent-graph if it isn't there, record the session, and share it live to the account whose API token the cloud environment gives as AGENT_GRAPH_TOKEN. The environment's network access must allow agentgraph.chofter.com and firebasestorage.googleapis.com. For Codex: run in a Codex cloud environment's setup script (chatgpt.com/codex), after installing agent-graph there, with --yes. It adds the hooks to Codex's files in the cloud (/opt/codex), all run as they happen, since the cloud doesn't run hooks in the background; the session's first starts sharing it live, to the account whose API token the environment gives as AGENT_GRAPH_TOKEN. The environment's agent internet access must allow agentgraph.chofter.com, with all HTTP methods.

Examples

agent-graph install claude-code

Hooks and /agent-graph for every project.

agent-graph install claude-code --dry-run

Show exactly what would change, and change nothing.

agent-graph install claude-code --scope project

Just this project, in .claude/ (usually committed).

agent-graph install claude-code --cloud

Record and share this project's sessions in Claude Code's cloud (claude.ai/code): commit .claude/settings.json, and give the cloud environment an API token.

agent-graph install codex --cloud --yes

In a Codex cloud environment's setup script (chatgpt.com/codex), after the install script: record and share its tasks, given an API token in the environment's variables.

agent-graph install claude-code --no-slash-command

Just the hooks.

agent-graph install codex

Record Codex's sessions too, and add $agent-graph to it. (gemini adds just the command.)

agent-graph install claude-code --command "/opt/bin/agent-graph emit --provider claude-code"

Register a different path for the hooks. They use this executable by default.

agent-graph uninstall

Remove what install added

Remove what install added: Agent Graph's hooks from the agent's settings, and the /agent-graph command if Agent Graph wrote it.

Everything else in the settings file is kept, and so is the backup install made of it before it had the hooks (settings.json.agent-graph.bak). A settings file left with nothing in it ({}) is removed too, unless there's a backup beside it, and so is a .claude, .agents or .gemini folder left empty. A command file you wrote yourself is left alone. Use the same --scope you installed with.

What's already been recorded stays in ~/.agent-graph; delete that folder to remove it.

Options

<claude-code|codex|gemini>The coding agent to remove Agent Graph from.
--scope <user|project|local>Where it was installed: every project (user, the default), or this one (project or local).
--dry-runShow what would be removed, and remove nothing.
-y, --yesDon't ask before removing.

Examples

agent-graph uninstall claude-code

Remove the hooks and the command from your user settings.

agent-graph uninstall claude-code --scope project

Remove them from this project.

agent-graph uninstall claude-code --dry-run

Show what would be removed, and remove nothing.

agent-graph uninstall codex

Remove the hooks, their trust and the command from Codex.

agent-graph tail

Watch the graph live in this terminal

Watch the graph live in this terminal.

Takes over the terminal like top and redraws as events arrive. The top line sums everything up: how many sessions and working agents, and, in colour, how many need you, look stuck or are deadlocked. Below it, each session is a tree of its agents, most recently active first:

claude-code:e0000002  search-indexer  [working]  Rebuilding the index schema
└─ Explore a91d0160  [working] (stale?)  Profile the slow bulk import

How to read it

[working] [idle] [input_required] [completed] [failed] [canceled]The state. idle means its turn is over and it's waiting for your next message.
needs you: …It's waiting on you: a permission prompt, a question, or a plan to approve.
(stale?)Working, but no events for --stale-minutes (30 by default). It may have hung or crashed, or be in one long, quiet command.
waiting on …Blocked on another agent or session, with how much work is ahead of it. "looks stuck" names a stale one it's waiting on.
DEADLOCKSessions waiting on each other: none of them can finish.
tasks 3/5Its task list: done out of total.

Keys

q, Esc, Ctrl+CQuit. The terminal is put back as it was.
aShow or hide sessions with no activity in the last day.

It checks for new events four times a second, and redraws at least every five seconds so "stale?" keeps up with the clock. Lines are cut to the terminal's width; if there are more than fit, it says how many more.

When its output isn't a terminal (piped or redirected), it prints the whole picture each time something changes instead, so it can be logged.

Options

--session <SESSION>Follow one session: its id, the first few characters of it, or current (the one this runs in).
--allStart with sessions older than a day shown too.
--asciiDraw the tree with plain ASCII characters.
--stale-minutes <MINUTES>Flag working agents with no events for this long as stale.

Examples

agent-graph tail

Every session from the last day.

agent-graph tail --session current

Just the session this runs in (or the latest one in this folder).

agent-graph tail --session 5f2c

Just the session whose id starts with 5f2c.

agent-graph tail --ascii

Plain | and for the tree, for terminals without Unicode.

agent-graph tail --stale-minutes 10

Flag quiet agents sooner.

agent-graph tail | tee graph.log

Not a terminal: a new frame is printed on each change.

agent-graph view

Watch the graph live in your browser, with a timeline to step through

Watch the graph live in your browser, and step back through its history.

Serves a web page on port 7777 (or --port) until you stop it with Ctrl+C, and prints its link (http://127.0.0.1:7777/?key=…), which carries a key made for this run: only someone with the link can use it, so other accounts on the machine agent-graph runs on can't. It's only reachable from that machine, and it refuses requests made by other websites. --open opens the link in your browser. If a viewer is already running on the port (one from an older version, say), it's stopped and this one takes its place; anything else on the port is left alone.

The page has

SessionsEvery session, with anything that needs you, is deadlocked or looks stuck called out. "Older" shows sessions from before today.
TreeThe selected session's agents, what each is doing, its task progress, and what it's waiting on.
DetailsClick any session or agent: its tasks, what it's waiting on, the agents it started, its messages, and when things happened.
TimelineEvery event in the session is a stop on a slider. Drag it, click it, or use ← and → to see the graph exactly as it was at that moment; the node that step changed is ringed. "Live" (or L, or End) jumps back to now.
Save imageA picture of the session as it is at the step you're on.
ResumeA Claude Code or Codex session's details have a button that reopens it: in the Claude app or the ChatGPT app if that's where it ran, else in a new terminal window, in its folder (claude --resume, codex resume). One that hasn't ended is probably still open somewhere, so that opens a copy of its conversation instead (codex fork). If it can't open a window, it tells you the command to run. The shared site doesn't have this.

The page updates as events arrive, without reloading.

Options

--port <PORT>The port to serve on.
--openOpen the page in your browser.
--stale-minutes <MINUTES>Flag working agents with no events for this long as stale.

Examples

agent-graph view --open

Start it, and open it in your browser.

agent-graph view --port 8080

Use another port (if 7777 is taken, or to run two).

AGENT_GRAPH_HOME=examples/logs AGENT_GRAPH_NOW=2026-09-25T12:00:00Z agent-graph view --open

Browse the example logs that come with Agent Graph's source.

agent-graph tree

Print the graph once, as a text tree

Print the graph once, as text, and exit.

Shows each session active in the last day (--all for every one) with its agents underneath, using the same markers as tail (agent-graph tail -h explains them). Handy in scripts, or to paste into a message.

Options

--allInclude sessions with no activity in the last day.
--stale-minutes <MINUTES>Flag working agents with no events for this long as stale.

Examples

agent-graph tree

Sessions from the last day.

agent-graph tree --all

Every session ever recorded.

agent-graph tree --stale-minutes 10

Flag quiet agents sooner.

agent-graph snapshot

Save a picture of a session, sized for a phone, and print its path

Save a picture of a session and print where it went.

The picture is sized for a phone (1080 pixels wide). From the top: the session's name and state, a callout for anything that needs you, its agents as a tree (stuck ones flagged), and its task list. A big session shows its first 30 agents and counts the rest. It's made for sharing: an agent can run this and send you the image, which is what the /agent-graph command does.

Which session it draws

--session <id>That session: its id, or the first few characters of it.
--allEvery session active in the last day, one after another.
--session currentThe Claude Code or Codex session this runs in, then the latest session in this folder, then the latest anywhere. This is also the default for a picture.

Only the file's path is printed, so scripts can use it. By default the picture goes in ~/.agent-graph/images/ with a new name each time. --out chooses the file, and its extension chooses the format: .png, .svg, or .json. As .json, it's the graph as data: with --session or --all, just the sessions they choose and any they exchanged messages with, plus any of those wait on (directly or not); with neither, every session, as --json prints. It won't replace a file that's already there unless you add --force.

Options

--session <SESSION>The session to draw: its id, the first few characters of it, or current (the default for a picture).
--allDraw every session active in the last day instead.
-o, --out <FILE>Where to write it. The extension picks the format: .png, .svg or .json. An existing file is left alone unless you add --force.
--forceReplace the file at --out if there is one.
--jsonPrint the whole graph as JSON instead of drawing it.
--theme <light|dark>The picture's colours.
--stale-minutes <MINUTES>Flag working agents with no events for this long as stale.

Examples

agent-graph snapshot

This session (or the latest one here), as a PNG.

agent-graph snapshot --session 5f2c --theme dark

The session whose id starts with 5f2c, in dark colours.

agent-graph snapshot --all

Every session from the last day, in one tall picture.

agent-graph snapshot --out graph.svg

As SVG, to the file you name.

agent-graph snapshot --json

The whole graph as JSON on standard output, for scripts.

open "$(agent-graph snapshot)"

Make one and open it (macOS; use xdg-open on Linux).

agent-graph watch-remote

Share the graph live on the web, to your account

Share the graph live on the web, to your account, and print where to see it.

It sends the event log to the Agent Graph site (https://agentgraph.chofter.com, or --url), prints the address of your live share straight away (the site's /watch), then sends each new event as it's recorded, until you stop it with Ctrl+C. Open it anywhere you're logged in, including on a phone: it's the same viewer as agent-graph view, timeline and all.

What's shared: every session on the machine agent-graph runs on, or just one with --session (--session current for the one this runs in). Agent Graph records task names and agent descriptions, not prompts or tool output (unless you've set AGENT_GRAPH_CAPTURE_BODIES=1). The site stores it encrypted.

Logging in

The first time, it opens your browser at the site's login page: log in with Google, or an email and password (or create an account), and agent-graph is told when you're done. Its login is kept in ~/.agent-graph/account.json, readable only by you, for next time. --logout ends it (on the site too), and you can log a computer out from the site's account page. If it can't open a browser, it prints the address to open yourself.

On a machine where you can't log in in a browser (a cloud instance, say), make an API token on your account page instead, and give it as AGENT_GRAPH_TOKEN: AGENT_GRAPH_TOKEN=agt_… agent-graph watch-remote. The site's asked whose it is, and it's kept as that machine's login, so --autostart works with it too. Revoke it on your account page when you're done with it.

Subscribing

Where the site charges for sharing live, a new account can share for its first week (or however long the site allows) without paying. After that, it opens your account page in the browser for you to subscribe, and waits: once you have, it carries on sharing by itself. A run that's sharing when the time runs out does the same.

Who can see it

Only you, logged in to the site: /watch shows your latest live share. Nobody else can open it. Your login is only sent over HTTPS, or to your own machine.

Who can change it

Only you. The site gives the share a key when it's made, and every update must carry it. It's kept in ~/.agent-graph/shares/, readable only by you, so the next run can carry on.

It checks for new events once a second, and sends them at most every 5 seconds, together. If the connection drops, new events are kept and sent when it's back. If the site refuses them outright, it stops and says why. The site deletes a share that has had no new events for a week: sharing it then stops.

Running it again

The next run for the same site, account and sessions carries on with the same share. What the site already has isn't sent again: it starts again from one summary of the log as it is now, and deletes what came before. --new starts a new share instead, as does logging in as someone else, and a share the site has deleted. If it's being shared now, by another run, it's left to that run.

Sharing whenever you log in

--autostart has it start by itself whenever you log in to this computer, and share every session, so you never have to run it. On macOS it's a launchd agent (~/Library/LaunchAgents/com.chofter.agent-graph.watch-remote.plist; what it says goes to watch-remote.log in ~/.agent-graph); on Linux, a systemd user service (agent-graph-watch-remote.service; journalctl --user -u agent-graph-watch-remote shows what it says); on Windows, one of your Startup apps (AgentGraphWatchRemote, in the registry's Run key; what it says goes to watch-remote.log in %USERPROFILE%\.agent-graph), which starts it without a window. If it fails (the network isn't up yet, say), it's started again a minute later. It never opens a browser: if you have to log in again, it stops and says so, until you do. Setting it up logs you in first, if you aren't. agent-graph install claude-code offers to set it up too. --no-autostart stops it and removes it.

Options

--url <URL>The site to share on.
--session <SESSION>Share just this session, with the sessions it started: its id, the first few characters of it, or current (the Claude Code or Codex session this runs in; if that isn't recorded, it stops rather than guess).
--newStart a new share, rather than carry on with the last one.
--logoutLog this computer out of the site, and forget the login. The next run asks you to log in again.
--autostartShare every session whenever you log in to this computer, without running this yourself: it's started now, and at every login (on macOS, Linux and Windows). If you aren't logged in, you log in first, in the browser.
--no-autostartStop sharing at login: what --autostart set up is stopped and removed.
--backgroundRun unattended, as --autostart does: it never opens a browser, stops quietly if you have to log in again, and waits while another run is sharing.
--checkCheck what sharing from a coding agent's cloud needs, and share nothing: that the site can be reached (it's pinged), and that AGENT_GRAPH_TOKEN is set and is a valid login. Prints ✓ or ✗ for each, and fails if either isn't in place. Run it in a cloud task to check the task's own internet access: a cloud's setup script may have more than its tasks do.

Examples

agent-graph watch-remote

Share every session, live, to your account (logging in the first time). The first line printed is where to see it.

agent-graph watch-remote --session current

Share just the session this runs in.

agent-graph watch-remote --new

Start a new share of every session, rather than carry on with the last one.

agent-graph watch-remote --logout

Log out on this computer.

agent-graph watch-remote --autostart

Share every session whenever you log in to this computer, from now on.

agent-graph watch-remote --url=http://localhost:3000

Share to a copy of the site you're running yourself.

agent-graph run

Run any command as part of the graph, linked to whatever started it

Runs a command and puts it in the graph as a node of its own: working while it runs, then completed, or failed with its exit code. Its input and output pass straight through, and run exits with its exit code.

Use it for agents without hooks (agent-graph run -- aider), or for a script that starts several agents, which then appear under it.

How it links

  • Started from an agent's shell (or anywhere AGENT_GRAPH_PARENT is set), it goes under that session.
  • The command gets AGENT_GRAPH_PARENT and TRACEPARENT for the new node, so agents it starts that have Agent Graph's hooks go under it.
  • When a Claude Code or Codex session runs it in its shell, the session waits on it, as on any agent it starts.

Put the command after --, so its own options aren't read as run's.

Options

--name <NAME>What to call it in the graph. Defaults to the program's name.
<COMMAND>...The command to run, and its arguments.

Examples

agent-graph run -- aider --yes

Aider has no hooks: this shows it in the graph while it runs.

agent-graph run --name nightly -- ./start-workers.sh

Group the sessions a script starts under one node called nightly.

agent-graph run -- claude -p "update the changelog"

A headless Claude Code session, under a node that records how it exited.