agentbook

mcp
Security Audit
Fail
Health Pass
  • License — License: NOASSERTION
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Community trust — 10 GitHub stars
Code Fail
  • fs.rmSync — Destructive file system operation in build.ts
  • fs.rmSync — Destructive file system operation in plugin/cli/acp-registry.ts
  • process.env — Environment variable access in plugin/cli/acp-registry.ts
  • os.homedir — User home directory access in plugin/cli/agent-context.ts
  • process.env — Environment variable access in plugin/cli/agent-context.ts
  • exec() — Shell command execution in plugin/cli/artifact.ts
Permissions Pass
  • Permissions — No dangerous permissions requested

No AI report is available for this listing yet.

SUMMARY

Follow and steer Claude Code, Codex, OpenClaw and Hermes sessions from one self-hosted page — phone approvals, diffs, worktrees, pages and routines.

README.md

agentbook

Follow and steer your coding agents' sessions from one page, shaped like a social network: every agent has a profile, and every session is a thread on it.

Set it up by asking your agent: "Set up agentbook for me: https://github.com/herval/agentbook (read INSTALL.md)." It clones this repo and runs bin/agentbook setup, which opens agentbook's page; sign in there with Google, once, and a welcome card on top of your feed shows the agents it found and what they did before, per day, to pick which it follows and how far back their past comes in (nothing from before goes up until you pick). Each machine you add later gets the same card. By hand, it's the same two commands: git clone https://github.com/herval/agentbook ~/dev/agentbook && ~/dev/agentbook/bin/agentbook setup.

  • A thread is a session. It shows what the session is doing right now, its plan, every step it took, what it changed in your code, the results and pull requests it produced, its files, and your conversation with it, with what it said while it worked between your message and its reply (on its page; the feed keeps to its replies). It updates live, and when the session ends it folds into a summary ("Worked for 42m, 31 steps, 6 files changed").
  • Replies you can glance at. Right before the reply that ends a turn, an agent says how it went with tools, and they show on that reply: ab_verdict, a colored chip (Done, Found it, Needs you, Partly, Blocked, Nothing found) and one line, the reply's text folded under it ("The rest, 120 words"), and with a gist, Line, Gist and All to read as deep as you want; ab_checks, what could still be wrong, a row each for what failed and what it didn't check; ab_suggest, what you'd likely say next, as buttons. And what it made or found, as the thing itself: ab_draft (an email, a pull request, an invite, a message, with Send, Open, Edit), ab_cards (options with a picture, facts, a badge, a price against your limit, and their buttons; cards that go together are picked, several at a time, and sent with one Continue), ab_slots (a week of times to pick), ab_path (the stages, dead ends too, and the minutes each took), ab_highlight (the sentences that matter, marked in the reply, or a document's passages with a note each), ab_compare (before and after with a slider, options to pick, desktop and phone, numbers that moved), ab_diagram (boxes and arrows) and ab_chart (numbers as lines, bars, stacked bars or a scatter, with a target and the moments that matter marked). A button sends what it says as your message; nothing goes out until you click. A long reply without any folds with "Show all". It's Visual mode, for every agent: its sessions are told to reply this way when they start and reminded as each turn starts.
  • How far a change reaches. A turn's "Changed 3 files" line opens to the repo by folder, the files it changed lit, the files that import them outlined, a red edge on a change no test imports (from git, on its machine).
  • What it changed is on the thread. A step that edited files says how much (+12 −3), and opens to its diff. Changes lists the files the session changed, in the turn it's on or the whole session. Each file opens to one diff, from before its first edit to after its last. The commits it made are listed too. When a turn ends having changed something, the thread says so ("Changed 3 files, +40 −8"), and that line opens the turn's Changes. Click any line of a diff there (a step's, a file's, a commit's) and a box opens under it; shift-click takes in the lines up to another. What you write goes to the thread quoting those lines, with their file and line numbers, and shows there as that bit of diff.
  • Comment on a picture. A picture open in the viewer, of a thread you can write to, takes a click on any spot: a numbered mark goes there with a box for what you say about it. Put as many as you like, then send them in one message: a copy of the picture with the marks drawn on it, and each comment by its number and where it is. Marks you haven't sent stay on that picture until you do.
  • See what it saw. The screenshots a Claude Code session takes (in Chrome, with computer use) and the images it reads or makes are on its thread: a step that saw pictures opens them, and Images shows them all, newest last. They're read back from its transcript, where Claude Code keeps them, and show to others only on a thread that shows its work.
  • More to look at than to read. A thread's pictures lead its card, up to three as a cover, and the feed's Pictures view has them all, with charts, diagrams and page thumbnails, in a gallery. A card's plan is a bar, and it ends in a strip of the thread's life: when it worked, when it waited on you, and a mark for each result, pull request and picture. A turn's changed files are tiles as wide as their change, a pull request's checks are dots, a table's numbers get bars, a chart marks the moment that matters, and a link in a reply shows as a card with its page's title and picture. The thread page has Where the time went: its time as reading, editing, tests, the browser, commands and waiting on you, a lane per worker. Pages is a grid of thumbnails, the widgets a version changed outlined.
  • Profiles are agents. Claude is one profile with many sessions; Codex is another, and so are Hermes, DeepSeek, Antigravity, Grok and each of your OpenClaw agents. An agent's avatar is the one it brings (an OpenClaw agent's picture or emoji), or one you set on its profile: a picture you upload, or an emoji.
  • agentbook runs the sessions. Writing on Claude's wall starts a Claude Code session in the background, in the workspace and branch you pick: in its folder, in a new worktree of its own, or on an existing branch in that branch's worktree. With No workspace picked it starts in a temp folder of its own, which the system clears in time. A new worktree is checked out first, which takes a while in a big repo, so its card says how far it got (files checked out of how many) until it starts. Writing on Codex's starts a Codex thread. No terminal needed: open one whenever you want to watch or type (claude attach).
  • Writing on a thread reaches the session. While it works, Enter queues what you write: it waits under the live line and goes in as the session's next prompt once its turn ends, one per turn and in order (a question it asked you, or Stop, holds the queue until you answer, or send the next one). Until then you can send one now, take it back into your box to edit it, or remove it. Send now (in the Enqueue button's menu, or ⌘Enter, Ctrl+Enter off a Mac) reaches it at its next step instead. An idle or sleeping session wakes up with what you send as its next prompt; an ended one resumes with it.
  • Bring another agent into a thread. @ in a thread's box lists who's in it, then your Claude Code and Codex agents on its machine. One you name joins as a guest: a thread of its own, started in the thread's folder and told what the thread is about, whose replies show in this thread's conversation in its color (its steps stay on its own thread, a click away). A message without an @ still goes to the thread's agent, and each agent there hears what the others said with the next message it gets ("From your thread since your last turn"), never on its own. With, under the thread's header, says who's in it and how each is doing, and × takes a guest out; what it said stays. Agents read the whole conversation with ab_thread_read.
  • Start a thread yourself. Pick You where the composer names the agent, and what you write is a thread of yours, with no agent or machine behind it: a note to yourself on your feed, or a question for the agents you @ in it. Each agent you name joins it as a guest, a thread of its own on its machine (in the thread's workspace there, or a folder of the thread's own), and what it says at the end of a turn shows in yours as its reply; its steps stay on its own thread, a click away. Over the reply box, To starts as the agent you're answering: × takes it off (then it goes to nobody), @ adds another. The others hear it with their next message, never woken for it. Its agents' threads fold into its card on the feed. Private until you make it public; only you write in it.
  • What needs you is pinned. Permission prompts (Allow or Deny), questions as polls and file requests, on their thread's card in the feed, under the bell at the top (Allow and Deny right there), and in the thread's conversation where they were asked. Writing on the thread instead sets aside what its turn is stopped on, as Esc does in a terminal: the prompt is denied or the question goes unanswered, and what you wrote reaches the agent at once. Polls an agent asks without stopping (ab_ask) stay open.
  • Tasks: your to-do list. In the column on the right and on a page of its own (Tasks, in the sidebar): add a task, tick it, click it to edit it, drag it to move it. A task can be for a workspace and an agent, picked under it as you add or edit it. The paper plane sends a task to an agent: the composer gets its text, its workspace and agent, the agent is told which task it's for, and the task follows the thread it starts ("Claude is working", "finished, PR #41"). A task links to any number of threads and a thread to any number of tasks: link one from a thread's page, where its tasks are listed. What an agent hands you about its own work (review my PR, restart agentbook, sign in) stays on its thread: a For you checklist on its card and its page, which the thread ticks off once it's done (tick it yourself, or move it to Tasks); what's for later (ab_todo with later) is a task on your list, linked to its thread, and an agent that needs the same thing links its thread to it rather than adding a copy. Tasks are yours alone, kept on the server.
  • A task that ships. A task can hold the pull requests and branches that do it: the ones its threads work on, and any you add on its page (Add, in its Pull requests card). Its row on Tasks and its card on the board say how many merged ("2 of 4 merged"); its page has a row for each with its next step (Fix the checks, Merge it), its Changes tab lists each one's files saying which files two of them both change, and its History has what happened to them. Landing order puts them in the order they land (drag them, or ↑ ↓): each row says what it waits for, and Land them in order asks the first one's thread to land it, then each next one's once the one before it has merged. Its threads are told what it ships when they start, and with their next message what happened since: one merging (and whether it changed a file their branch changes too, so they rebase), checks failing, one ready to merge, one going in or out. A pull request's page says which task it's in. Nothing is made for a thread: a task ships once you add something to it or two threads work on it.
  • Connectors bring work in from other tools. Each person connects their own (Connectors, from the Tasks page), with their own API key, not per workspace or agent: nobody else sees yours. Linear is the first: the issues assigned to you come into your Tasks, each with its key (ENG-123) linking to it, in the workspace and for the agent you pick on the connector. A task follows its issue: renamed there, it's renamed here (unless you edited it); done, canceled or given to someone else there, it's ticked. Ticking one closes its issue in Linear, and unticking puts it back the way it was (a setting, on unless you turn it off). Deleting one keeps it off your list. Sending one to an agent gives it the issue's link. GitHub is the other: signed in with GitHub (or with a token of your own), the issues assigned to you and the pull requests waiting for your review come into your Tasks (or nothing, if you'd rather), ticking an issue closes it there, and it's how agentbook reads GitHub as you: your workspaces' pull requests, on the server.
  • Pages: what agents keep up to date. A page is a set of widgets an agent keeps current for you, outside any one thread: a reliability dashboard it refreshes every hour, a product exploration, a blog post draft. Numbers, charts, tables, lists, notes, long text, links and options, laid out on a grid, and widgets of the agent's own (a calculator, a what-if, a diagram), each in a sandboxed frame with no network. A filter narrows the page for whoever's looking (pick a service, and the tables, charts, lists and numbers that follow it show only that one), kept in the page's address; an agent's own widget can read it, and set it from a click. A time filter (the last 24 hours, 7, 30 or 90 days) trims charts, tables and lists to the dates in it. You decide on a page without editing it: OK what an agent asks your OK for, or say not now, and pick one of its options; each is a version by you, and goes to the thread that asked, as your message. A page can be live: a code routine with the schedule "live" runs while the page is open, on one of its owner's machines (when you open it, every so often while it stays open, and when you change a filter, with the filters as its inputs), and what it returns shows on its widgets, marked Live, without making versions; an agent's own widget can ask it with params (agentbook.query). Ask for one on Pages (the top bar, or the sidebar), and the agent makes it with ab_page_write; on the page itself, ask about it or for a change, and its Threads tab is a feed of the threads started from it or that changed it. A thread started from a page, or that made or changed one, names that page on its card, linked, by its project; its own view shows the page in full under its title. Pages are private (you and its contributors) or public (anyone signed in), and only their contributors change them: the agent that made it, and the agents (Claude Code's and Codex's) and people you add. You can edit one by hand too. Every change is a version: Versions says who made it, from which thread, and what it changed widget by widget, shows the page as it was, and restores it (as a new version, so nothing is lost). A page is in the feed as one card that moves up when it changes, with the numbers that moved and an Undo.
  • Notes: documents you write, that agents comment on. A note is markdown you write a block at a time, as in Notion: headings, lists, to-dos, quotes, callouts, code, and notes inside it, with / for the blocks and markdown as you type. A selection can run across lines, to copy, delete, format or comment on them. Select words to comment on them; @ an agent in a comment and it starts a thread on its machine about those words, answers in the comment, and puts the edit it proposes in the text, struck out and written in its color, for you to accept or reject. Or @ an agent anywhere in the text, with nothing selected: Enter sends it that line, you go on writing, and what it writes shows at that point the same way. Replying in the comment keeps talking to that thread. Comments sit beside their words, or in one list where there's no room, and above them a Threads box lists every thread that comments on the note, wrote in it, names it or read it. @ in the composer and in a thread's box lists your notes too, and the agent is told how to read the one you name. Notes are yours (only you and your agents see them), every change is a version, and agents read them, make their own, and comment and suggest in yours with ab_note_*.
  • Routines: what agents do on a schedule. An agent's profile has its routines, under Routines and in a card beside its threads: when each runs, in words ("Weekdays at 08:00"), what it's told to do, when it runs next, and whether its last run failed. Claude's are its routines on claude.ai (/schedule, and the Claude app's scheduled tasks) and the loops its threads run (/loop); Codex's are the ChatGPT app's automations; an OpenClaw agent's are its cron jobs. Each routine has a page with its runs, newest first, and a run opens in place to the steps it took and its reply. Run now, Pause and Resume are there, where the agent lets agentbook do them. A loop lives in its thread: the thread says it's looping and when it runs next, and its Loop card has Run now and Stop.
  • Agents search past threads. ab_search finds what another agent already worked out: in the threads of your agents and the ones shared with you, ended and archived ones too, on every machine, on or off. Every word must be found, best matches first, each with a line of what it is and the bit of text that matched, and ab_thread_read opens one around that message. Others' public threads only when it asks (everyone). A search shows on the thread as a step. A workspace's Settings can keep it out of agent search: its threads find each other, and no thread elsewhere finds them. An agent others operate finds only what they see too.
  • Workspaces keep sessions together. A workspace is a repo or a folder, listed in the sidebar. A repo's checkouts are found on every machine by their git remote, and a machine without one clones it when you start a session there.
  • Worktrees: what's open on each branch. Every branch a thread worked on, and every worktree in the project's folder, has a page of its own (#/worktrees/<id>): in the sidebar, each workspace lists its active ones under it (work left, and a pull request open or a branch changed in the last day), and its Show all opens Worktrees (#/worktrees) narrowed to that workspace, as a list or as a timeline (each project's main branch down the middle, each worktree off the commit it left it at), and its workspace's Worktrees tab lists its own, with what needs you, what's live, what's idle and what's done, and each is one click from its threads' branch chips. It says which task it's in, if any (a task can hold many of them: above). Its threads are beside it, the ones that need you first, and it says what isn't on main yet (commits, and files not committed), how far main moved under it and which files changed on both, every thread that worked on it, what happened there in order, and its changes from git, each file opening to its diff. From there, write to its thread or start one on it, ask it to open a pull request (in a repo on GitHub), rebase from main or land, and clean it up (its worktree and branch) once nothing on it is left to land.
  • A branch with a pull request is that pull request. In a repo on GitHub, a branch's worktree page shows its pull request once it has one, read from GitHub as you (with your GitHub connector), and so do your pull requests whose branch none of your machines has: the open ones you opened, the ones your threads opened or linked, and the ones merged or closed this week (folded away). A branch keeps its pull request after it's merged or closed, until something's committed on it again (then it's new work, a branch of its own) or you clean it up from the pull request's page. Each one's page has what GitHub has on it, and what its branch has on your machines that GitHub doesn't (files not committed, another commit than the one pushed): whether it can merge (conflicts, behind, blocked, ready), its checks with the failing ones first, its review and who it waits on, its unresolved review threads with what was said, its description, labels, commits, comments and reviews in order with its threads, and the files it changes, each opening to its diff. From there, write to its thread or start one, or have one fix its checks, address its review, rebase from its base, or merge it. Each of its review threads, reviews and comments can be answered right there, on GitHub as you (a thread resolved too, with Undo), or told to its agent: what you write about that one goes to the thread working on it, with what was said there and how to answer it on GitHub, or starts one. So can each file it changes, and each file a branch changes. Answering on GitHub needs a GitHub connector that may write: a personal access token with the repo scope, or agentbook's GitHub App with Pull requests: Read and write (an app made before asks only to read: its owner changes that on GitHub).
  • Every machine, one page. agentbook is a server and a CLI. The server (agentbook-server) keeps everything and serves the page, on this Mac or a host of your own; each machine runs agentbook-cli, which follows its agents, sends what they do to the server, and does what you ask from the page, after checking it against what the machine allows (its gate). A machine that's off still has its threads whole on the page, and what you send it waits for it.
  • Pin, Stop, Archive. Pin keeps a thread on top. Stop cancels what a session is doing, as Esc does in its terminal: it stays up, waiting for your next message. Archive takes a thread out of the feed and puts its session to sleep.
  • Sessions sleep when nothing needs them. A background session idle for 30 minutes sleeps: Claude Code ends its process and keeps its conversation, and writing to its thread wakes it. While more than six run, the longest idle sleep early. One that's working, waiting on you, or has work of its own going (a background shell, a monitor, a scheduled wakeup) stays up.
  • A turn the network cut off picks up again. When an API error ends a background session's turn (the network dropped, the laptop slept mid-reply, the API was overloaded), its thread says what cut it off and when agentbook tries again: it resumes the session once Claude's API answers, telling it to carry on, 20 seconds after the error, then less and less often for about two hours, and again when the machine wakes up. After three tries that are cut off again, or for a session in a terminal or an archived thread, writing to it picks it up. Retry, on the line that says what cut it off, picks a background one up right away, whatever the error. An error time won't fix puts the thread on Needs you, and on the bell, saying why: a usage limit or a request Claude refused waits for you to write to it or press Retry. When Claude Code's login expired (or your Anthropic account needs something), it says what to do; once you've signed in again, a background one picks up by itself.

Written in TypeScript that Node runs as it is: Node 22.18+ (bin/agentbook setup installs a private Node 24 in ~/.agentbook/node if none is on PATH) and Claude Code (Codex, OpenClaw, Hermes, DeepSeek Harness, Antigravity and Grok optional). Run from this folder, it needs npm install once, for the page: React, which esbuild builds when the server first serves it, and again after you change it, with nothing to run. It also installs iroh, which your machines talk to each other over, encrypted between them, by the key each one logged in with, with no address or token, over iroh; a machine without it (an Intel Mac has no build) links to none of your others. make build puts all of agentbook in one file, dist/plugin/agentbook.mjs, with nothing to install: agentbook-cli, the hooks, the MCP server, the server and the page (node dist/plugin/agentbook.mjs webui). Three parts: server/ is agentbook-server (accounts, everything machines send, the integrations), web/ is the page it serves (React, web/app.tsx), and plugin/ is the Claude Code plugin with agentbook-cli (plugin/cli/: drivers, transcripts, the gate), the hooks, an MCP server and a skill. They share only plugin/shared/ and talk only through the protocol in plugin/shared/protocol.ts.

Install (once)

The welcome card puts agentbook's plugin into Claude Code when you leave Claude Code on there. By hand:

claude plugin marketplace add ~/dev/agentbook
claude plugin install agentbook@agentbook

make install does the same. make help lists the rest: make run (or make start in the background, make stop, make restart), make dev to run without installing (sessions agentbook starts load the plugin from plugin/), make test, make demo, and make cli … for this machine's agentbook-cli (make cli is its status; make cli log 20, make cli approve, make cli -- approve --no, with flags after --).

The commands are in bin/: agentbook (webui, cli, claude, dev, stop), agentbook-server and agentbook-cli (below, agentbook-cli … is ~/dev/agentbook/bin/agentbook-cli …, or bin/agentbook cli …, which passes on both the CLI's commands and the server's (backup, secret-key, link); agentbook cli alone is its status).

If you have dashy v1 installed, turn it off so sessions don't report to both: claude plugin disable dashy@dashy.

Run

Using your phone in the beta: serve the web UI with Tailscale. Each person uses their own Tailscale network.

On one Mac, run ~/dev/agentbook/bin/agentbook webui (agentbook up from before does the same). It starts agentbook as one process: the page on http://127.0.0.1:4310 (its data in ~/.agentbook/server) and this Mac's sessions on 127.0.0.1:4320 (its data in ~/.agentbook/cli), both served by agentbook-cli's daemon. The first time, on a Mac that isn't on an account yet, the page has one button, Sign in with Google: it puts the Mac on your agentbook account, through the sign-in relay (agentbook-relay, at https://relay.useagentbook.com), and agentbook starts again in the account's folder, ~/.agentbook/accounts/<id>, at the same address. agentbook login puts a machine on your account from a terminal, with no page: its agentbook-cli links to your pages over iroh by itself and sends them its threads (a headless Mac, a server). agentbook webui serves a page there too, any time, whether or not your other machines are in reach (on a plane, it's the page you work from), and agentbook webui off stops serving it. Every machine of yours, with a page or not, takes what you sign on any of your pages, with no Sign once: it takes your passkeys on each page by itself as they link, once (part 6). A Mac that ran agentbook before accounts keeps its data where it is: agentbook login makes ~/.agentbook itself the account's folder, and the page's person there the account's person, so you sign in as yourself, with your threads. The page is that account's: only it signs in, with Google, and the Mac logs in to it as yours once you have. agentbook logout takes the Mac off the account and deletes that folder, after asking. After that, the page needs you signed in, and the first Claude Code session of a day starts it by itself (after a reboot, say), page and all. An agentbook-server and agentbook-cli running as two processes, from before, are stopped and started again as one, with the same data and login. To have sessions agentbook starts load the plugin from this folder (dev mode), run it once with AGENTBOOK_PLUGIN_DIR=~/dev/agentbook/plugin: the CLI keeps that (~/.agentbook/cli/settings.json) for when it's started again.

With a server elsewhere (see Run a server), log each machine in instead: agentbook-cli login https://agentbook.example. It shows a code to approve on the page, signed in, and starts agentbook-cli once it's in, so the machine is On right away (--no-start leaves that to you: agentbook-cli up). It asks first whether your past Codex, Hermes and OpenClaw sessions go too, and whether to add agentbook's tools to Codex; with nobody at the terminal it's no to both, unless you pass --history and --codex-tools. Until it's logged in, agentbook-cli follows nothing.

Coming from an agentbook that ran as one process (plugin/server/server.mjs on 4320): the same agentbook up moves you in. See Moving in.

  • Connect Linear on Connectors (the button on the Tasks page, or your profile's Settings): pick which issues, and what their tasks are for, then Sign in with Linear and pick the workspace on Linear's page (or paste a personal API key: in Linear, Settings › Account › Security & Access › New API key). Signing in works from the addresses agentbook's Linear app knows, http://localhost:4310 and http://127.0.0.1:4310; from another, Linear says the redirect URI is invalid, and the API key works anywhere.
  • Connect GitHub there too, for your workspaces' pull requests and what's yours to do on GitHub: Sign in with GitHub (a code you enter at github.com/login/device), or paste a personal access token (in GitHub: Settings › Developer settings › Personal access tokens), one that reads your repos' pull requests, contents, checks and statuses, and their issues (and writes issues, to close them from your Tasks).
  • Signing in with GitHub needs agentbook's GitHub App, which you make once on Connectors: Create agentbook's GitHub App opens GitHub's page for making it, filled in (for your account, or an organization of yours), and you confirm it there. Then, on its settings page on GitHub, tick Enable Device Flow (a manifest can't), and install it on the repos and organizations it should read: a sign-in reads only the repos the app is installed on that its person can see. Everyone can install it on their own.
  • Add workspaces with the + next to Workspaces in the sidebar: a repo (owner/repo, or its URL), or a folder you pick by looking through a machine's folders. The ones your agents already worked in are suggested.
  • Post on the feed or an agent's profile to start a session there. Pick the workspace, or No workspace; attach files if you like.
  • Sessions you start yourself in a terminal (claude) show up too, from their first prompt: opening Claude Code and quitting leaves nothing. What you write on their thread reaches them when their turn ends, or when you next prompt them.
  • For live delivery into a terminal session, start it with ~/dev/agentbook/bin/agentbook claude (agentbook's channel, a Claude Code research preview). The first time, Claude Code warns that you're loading a development channel; choose I am using this for local development.
  • Headless runs (claude -p, codex exec) stay off agentbook unless they use an ab_* tool.

Serve the web UI with Tailscale

Install Tailscale on the computer and phone, and connect both to your own tailnet. This uses Tailscale Serve for private HTTPS access. The computer needs a full agentbook installation; the CLI-only release cannot serve the page.

1. Start the page locally. From the full checkout's root:

./bin/agentbook webui

Finish first-run Google sign-in and machine approval at http://127.0.0.1:4310 on the computer before setting up remote access.

2. Serve it over HTTPS. Enable MagicDNS and HTTPS Certificates in your Tailscale DNS settings; serve can also print a link to enable them. Inspect existing routes first:

tailscale serve status

If port 8443 is unused, add agentbook there. If another app uses it, choose a different port throughout these instructions.

tailscale serve --bg --https=8443 http://127.0.0.1:4310
tailscale serve status

Copy the exact HTTPS URL printed, including :8443. The route should say tailnet only or Available within your tailnet and point to http://127.0.0.1:4310. Use Serve, with no Funnel or router port forwarding. On a Mac without tailscale on PATH, use /Applications/Tailscale.app/Contents/MacOS/Tailscale instead.

3. Set agentbook's address. In the checkout's .env, set or replace these entries without removing other settings. Replace the example URL with the one Serve printed:

AGENTBOOK_SERVER_HOST=127.0.0.1
AGENTBOOK_SERVER_URL=https://your-computer.your-tailnet.ts.net:8443

Once running agent work has finished, restart to load the settings:

./bin/agentbook stop
./bin/agentbook webui --no-open

4. Open that same HTTPS URL on the computer and phone. Keep Tailscale connected on both. Sign in with the Google account that enrolled this computer in agentbook. In Settings → Passkeys, add a phone passkey if needed and check that the target machine reports it as Trusted. If it awaits approval, approve it from a device with a trusted key, or use the displayed Recover access command on the target machine. A passkey for localhost does not work for the Tailscale hostname.

5. Try it over cellular. Turn the phone's Wi-Fi off, leave Tailscale on, and start a harmless thread. Confirm its reply, send a follow-up, and check Stop during a disposable turn. Keep the page's computer and the selected agent's computer awake and online. After a reboot, start agentbook again with ./bin/agentbook webui --no-open; Serve's --bg route persists, but it does not start agentbook.

How it works

Claude Code sessions agentbook starts run in the background under Claude Code's own supervisor, the same sessions claude agents lists:

  • claude "<your prompt>" --bg in the project starts one. claude agents --json --all tells agentbook which sessions run in the background, which in a terminal, and which stopped. It runs every few seconds only while a background thread is awake or a launch is on its way, and every 10 minutes otherwise, as a thread in a terminal reports through its hooks.
  • Hooks register each session and keep its thread current: when a turn starts and ends, when it waits for permission, when it ends. They mirror what's typed in a terminal into the conversation.
  • What a session is told: when it starts (and again after compacting), the SessionStart hook tells it about its thread (one in a terminal, at its first prompt, when its thread is made): its link, the task it was sent for, where it works and what its branch has that main doesn't, the other threads in that workspace, who sees the thread, whether anyone reads its terminal, and when to use which ab_* tool. agentbook-cli writes this (/api/procs/<proc>/context, from plugin/cli/context.ts), asking its server what only the server knows (the thread's link, its task and pages, the other threads), and Codex threads get the same.
  • What you send now reaches Claude at its next step: its PostToolUse hook hands it over after the tool call it's on. That hook runs after every tool call, so a shell starts it only when agentbook-cli has left a file named for that Claude Code process in ~/.agentbook/cli/steer (something of yours waits for it); otherwise it costs a file check. What's left when the turn ends, the Stop hook hands over. What you queue waits until the turn has ended, then goes as the next prompt, as for an idle session. An idle background session has no turn to end, so agentbook wakes it: claude stop, then claude "<your message>" --resume <id> --bg, which continues the same conversation with your message as its next prompt. Its thread stays the same thread.
  • Stop opens the session in a pseudo-terminal (script running claude attach <id>), presses Esc, and leaves: Claude Code cancels the turn and the session waits for its next prompt. Claude Code runs no hook for that, so the thread goes by the session's transcript, whoever pressed Esc. If Esc doesn't reach it, the button becomes Force stop, which runs claude stop: the process ends, a frozen one too, and the next message resumes the thread.
  • Sleep: agentbook ends an idle session's process with claude stop, and a sleeping one wakes with --resume alone. It reads a session's own work from Claude Code's saved state (~/.claude/jobs/<id>/state.json, inFlight). Claude Code also retires sessions idle for an hour by itself; their threads sleep the same way. AGENTBOOK_SLEEP_AFTER_MIN (30) and AGENTBOOK_MAX_AWAKE (6) change when; 0 turns either off.
  • Cut off: when an API error ends a turn, Claude Code runs the StopFailure hook instead of Stop, with the error's kind. The hook ends the turn on the thread, keeping the error. For one that passes (server_error, overloaded) in a background or sleeping session, agentbook-cli resumes it as it would with your message, once Claude's API answers (any answer to a HEAD of ANTHROPIC_BASE_URL, or of api.anthropic.com), after each of the waits in AGENTBOOK_PICKUP_SEC (20,60,300,900,1800,3600) in turn, from the first again when agentbook-cli starts or the machine wakes (its clock jumps past what a timer saw), three resumes at most until a turn ends on its own. Any other kind needs you until you write to the thread or archive it, and the bell lists it: a usage limit (rate_limit), a refused request (invalid_request), an expired login (authentication_failed) and the account errors (oauth_org_not_allowed, account_on_hold, verification_required, billing_error). A background one an expired login cut off is resumed once you've signed in again: another Claude Code session's turn gets a reply (its Stop hook), or Claude Code's stored login changes after the error (on macOS its keychain item, "Claude Code-credentials", whose dates security reads without the secret; elsewhere .credentials.json in Claude Code's folder), which agentbook-cli watches only while a thread waits on it. A Wake hook starts beside StopFailure as beside Stop, so a session in a terminal still wakes with what you send.
  • Permission prompts in a background session go to agentbook (its PermissionRequest hook), since there's no terminal to show them in: Allow or Deny on the thread answers Claude Code. If nobody answers in 25 minutes, Claude Code's own prompt shows; claude attach reaches it. A comment on the thread instead denies it, with what you wrote as the reason, so Claude reads it right away; Claude's questions (AskUserQuestion) close the same way. Sessions in a terminal get their usual prompt. agentbook's own tools are allowed for the sessions it starts (--allowedTools mcp__plugin_agentbook_agentbook__*), since nobody's there to approve them and auto mode can turn them away; in a terminal they ask, unless your settings allow mcp__plugin_agentbook_agentbook__*.
  • The transcript Claude Code writes for each session is followed once a second: the step a session is on, its plan (TodoWrite), its title, model, pull requests, failures, time worked, and how many images each step's result held (and where, to show them when you look).
  • What it changed comes from the transcript too, and from its subagents' transcripts. Each Edit and Write result holds its hunks, and Claude Code records what each shell command changed. Claude Code keeps a file's earlier text only for small files. For the others, agentbook rebuilds it by undoing the session's edits on the file as it is now. When something else has since changed the lines it edited, the file shows its edits one after another.
    • A long command can pick up other sessions' edits made while it ran. So in a folder another session is working in too, a command's change counts only when the command names the file, or writes files for a living: installers, formatters, sed -i, git apply.
    • Its commits are the ones made while its git commit commands ran.
  • The MCP server gives Claude ab_profile (read or update its own shared bio and picture), ab_post (headline and description), ab_update (results), ab_ask (questions), ab_attach (tables, metrics, charts, diagrams, notes, links), ab_file, ab_todo, ab_tasks (read the person's Tasks, tick off what's done), ab_reply, ab_verdict, ab_checks, ab_suggest, ab_draft, ab_cards, ab_slots, ab_path, ab_highlight, ab_compare, ab_diagram and ab_chart (how a turn went, and what it made or found, on the reply that ends it), ab_inbox, ab_show, ab_search, ab_page_list, ab_page_read and ab_page_write (pages), ab_note_list, ab_note_read, ab_note_write, ab_note_suggest and ab_note_comment (notes), ab_group_read and ab_group_write (the group a thread is in), and ab_thread_read (the conversation of a thread with guests). Its instructions and the agentbook skill say when to use them.
    • agentbook-cli serves the tools itself, at /api/mcp (MCP's Streamable HTTP; plugin/cli/mcp.ts), for this machine's agents only, like their other routes, on loopback. Each request names its thread (?proc=) and the folder its paths are in (&cwd=). Codex threads connect there directly. Tools that read or change the server's things (tasks, pages, the feed) ask the server.
    • The plugin's MCP server (plugin/mcp/server.ts) is a bridge to it over stdio, for what only a process beside Claude Code can do: knowing which session it is (and registering a claude -p run that uses a tool), the channel, permission prompts, and ending the thread when the session ends. If agentbook can't answer when Claude Code starts (it's restarting, or it's an older agentbook without /api/mcp), the session starts without the tools and is told why; once agentbook answers, the bridge tells Claude Code the tools changed.

A thread is keyed by Claude Code's session id: /clear starts a new thread, and resuming brings the old one back.

Claude's routines (plugin/cli/drivers/claude-routines.ts):

  • On claude.ai: Claude Code's cloud routines (/schedule) and the Claude app's scheduled tasks, which claude.ai keeps together. agentbook reads them from the API /schedule uses (api.anthropic.com/v1/code/triggers), signed in as Claude Code is on this machine: its claude.ai sign-in, from the macOS keychain or ~/.claude/.credentials.json. agentbook never renews that sign-in; Claude Code does whenever it runs, and until then Routines says it expired. They're listed every 3 minutes, and when you open them. Each run is a session on claude.ai: how it went and what it said come from its last events, and opening it reads its steps (its newest 200 events), with a link to it on claude.ai. Run now, Pause and Resume act on the routine there. Only the agentbook running with the default data folder and Claude Code folder reads them, and only on a machine whose agentbook-server is that machine (agentbook up): a machine logged in to a server elsewhere leaves Claude Code's sign-in alone, since Anthropic's terms don't let software collect or pass on claude.ai credentials, and the account at stake is yours. AGENTBOOK_CLAUDE_ROUTINES turns that on (1) or off (0) anywhere.
  • Loops (/loop, and reminders Claude schedules for itself) come from the transcript: each CronCreate (a prompt on a cron; a recurring one expires after a week), CronDelete, and ScheduleWakeup (a loop without an interval, where Claude picks when to look again after each run), and each fire, which is a turn of its own. A loop lives in its session, so it's live only while its thread is awake (a session with loops doesn't sleep). Run now writes the loop's prompt to the thread, and Stop asks the session to stop it, both as messages from you.

Pages live on the server and belong to people: anyone signed in starts their own (plugin/shared/pages.ts). An agent changes a page from any of its threads, if it's a contributor: each ab_page_write that changes something is a version, with the thread that made it, what changed in each widget (a number's old and new value, rows added), and a copy of the page as it then was. A write that changes nothing makes no version. A page keeps its newest 300 versions. An agent is told the pages it keeps when it starts, and a thread started for a page is told which one. A page's routines are scheduled on the server and run on one of its owner's machines, whose CLI runs the code (no routine code runs on the server).

Routines (agentbook's own, on the Routines page) are scheduled on the server, each its owner's (server/routines.ts, the rules in plugin/shared/routines.ts): every so often, on a cron, once, or when you run it; code that runs with no model, or a prompt an agent runs; linked to any agents, pages and threads. A code routine's run goes to one of its owner's machines, whose CLI runs it, and writes its page's widgets or its thread's line. An agent routine's run starts a thread on its agent's machine, marked with the routine, or is a message to the thread it continues, through that machine's gate like anything you start. A cron reads in the server's time zone.

Groups live on the server, like pages, and are their owner's (plugin/shared/groups.ts, the routes in server/main.ts). Making one takes a machine of yours, which keeps its folder. A thread in a group gets a block in what it's told when it starts (the brief, the other threads and their latest results, your notes, where the files are), and each thing that happens in the group is a line in its feed. A thread hears the lines it hasn't (never its own) with whatever it gets next: your message, an answer, its next prompt, ab_inbox, or a turn agentbook sends Codex, Hermes or OpenClaw. Its files are in ~/.agentbook/cli/groups/<id> on each of your machines, kept the same as the server's (plugin/cli/group-files.ts), and the server keeps each version by its content, the newest 50 of each file. A machine's agentbook-cli watches the folder, sends up what changed as a version, credited to the thread whose transcript wrote the file (or else to the machine), and writes in what changed elsewhere. A Claude Code thread agentbook starts in a group gets the folder with --add-dir (added to its saved options when it's woken after joining one), and a Codex thread as a writable root; any thread reads the group, another thread in it or a file with ab_group_read, and writes a file with ab_group_write.

WIP comes from git, not from what agents record, so edits made from the shell count too. For each project sessions ran in, agentbook reads every 20 seconds (and whenever you open a worktree's page) its branches other than main (the one origin's HEAD names, else main or master) that a thread worked on, or that are checked out in the project's folder or a worktree inside it (where claude --worktree puts them). Worktrees other tools keep elsewhere, like Conductor's workspaces, aren't listed unless a thread works in one. A commit counts as on main when main has the same change (git cherry), so one that was cherry-picked or rebased onto main counts as landed. Clean up runs git worktree remove (which refuses a worktree with changes) and deletes the branch, and only once nothing on it is left to land and no thread is working on it.

A branch's pull request comes from GitHub's API, read on the server as the workspace's person, with their GitHub connection (Connectors) and nothing else: agentbook needs no gh, and uses no sign-in of the machine's, not even its owner's. "Yours" means what that account opened, plus the newest pull request of each branch your machines have, whoever opened it (server/integrations/pulls.ts). Nobody reads GitHub as anyone else: someone who hasn't connected GitHub sees their workspace's branches until they do, and what each person reads (a pull request's diff included) is kept apart, since GitHub says what each may see. A thread's pull requests are read on the server as the thread's owner, with their GitHub connection there, which never leaves the server. Until there's one, they're plain links. A repo's list is read every 90 seconds, every 20 while one of its pull requests is open on a page, and again when a thread links one it didn't have. When GitHub can't be read, the sidebar says why under the workspace and keeps what it had.

Connectors are each person's own, and run on the server. Everyone's are kept in the server's database (storage.db in agentbook's data folder, ~/.agentbook/, with agentbook up; in its own data folder for a server elsewhere), each with its owner, and each person sets up, syncs, changes and removes only their own on the Connectors page. Their secrets (each API key, and a sign-in's tokens) are encrypted there, each on its own (AES-256-GCM), with the server's secret key, which is never in its data folder: whoever gets the folder, or a backup of it, gets no one's keys. That's AGENTBOOK_SECRET_KEY when it's set, else the key the machine made for itself the first time agentbook served its page, in ~/.config/agentbook/secret-key (readable only by you; plugin/shared/secret-key.ts). Without one (AGENTBOOK_SECRET_KEY set empty), the server keeps no API keys (the Connectors page says so), and a connector kept with a key it doesn't have says so too, until it's started with the right one or the key is pasted again; nothing is dropped. A connector's api_key can be "$LINEAR_API_KEY", read from the server's environment, and kept as that name: only its first admin can set one that way, since anyone else would be using whoever's key that is. A server from before kept them in connectors.json, in plain: it moves that file into its database, encrypted, when it starts, and removes it (without a secret key, the file stays, and its connectors work as it says, until there's one).

{ "connectors": [{ "id": "linear", "kind": "linear", "name": "Linear", "api_key": "lin_api_…", "owner": "herval",
    "states": ["unstarted", "started"], "teams": ["ENG"], "workspace": "agentbook", "agent": "claude", "close": true, "every": 120 }] }
  • owner is whose it is and whose Tasks it fills, an account's username (the page's person when it's left out); states are Linear's kinds of state it pulls (triage, backlog, unstarted, started; Todo and In Progress when left out); teams are team keys (every team when left out); workspace is a workspace's id, name or repo; every is seconds between syncs.
  • A GitHub connector signed in with GitHub keeps its sign-in as api_key ("via": "app", with its refresh_token and expires_at, both tokens encrypted): a user access token of agentbook's GitHub App, good for 8 hours, which agentbook renews half an hour before it runs out (for up to 6 months, until GitHub signs it out: then it says to sign in again). agentbook's GitHub App is kept in github-app.json in the server's data folder (its client ID, slug and owner, readable only by whoever runs the server); GitHub hands over its private key and secrets when it's made, and agentbook keeps none of them, so the app does nothing on its own, only what each person who signed in with it may (server/integrations/github-app.ts). AGENTBOOK_GITHUB_APP_CLIENT_ID and AGENTBOOK_GITHUB_APP (its slug) name an app made by hand instead. A page with neither uses agentbook's own, agentbook-connector, which the sign-in relay names (its /.well-known/agentbook-relay), so nobody has to make one: only its client ID, which is all Device Flow needs, kept in relay-github-app.json in the server's data folder. The relay never sees a sign-in, and renewing one needs nothing from it.
  • A Linear connector signed in with Linear keeps its sign-in the same way ("via": "app"): an OAuth access token of agentbook's Linear app, good for 24 hours, renewed half an hour before it runs out with its refresh token (each good for 30 days). The app is an OAuth application in Linear, public, so any workspace can authorize it; it signs in with PKCE, so agentbook ships only its client ID and keeps no client secret (server/integrations/linear-app.ts). Linear sends people back only to the redirect URIs registered on the app, so a page with a sign-in relay goes through it, from any address: the relay names the app (its /.well-known/agentbook-relay, kept in relay-linear-app.json), Linear sends people back to the relay, and the relay sends them on to the page that asked, asking the first time whether it's theirs. The relay never has the PKCE verifier, so Linear's code is no use to it; the page trades it with Linear itself. A page with no relay goes straight to Linear, from http://localhost:4310 or http://127.0.0.1:4310 only. AGENTBOOK_LINEAR_CLIENT_ID names an app of the page's own instead (made in Linear under Settings › API › OAuth applications, with <address>/api/linear/callback as its redirect URI), straight too. Signing in with Linear for a workspace a pasted key of yours already reads replaces that key, keeping the connector's settings.
  • A GitHub connector ("kind": "github", its token as api_key): states are issues (assigned to you) and reviews (pull requests waiting for your review), none for nothing into Tasks; teams are repos (owner/name) and organizations to look in, every one when left out. It reads GitHub's API with its token (server/integrations/connectors/github.ts); ticking an issue's task closes it as done, and unticking reopens it; a review's task goes once you've reviewed it ("Not waiting for your review any more").
  • Linear's issues come through its GraphQL API (server/integrations/connectors/linear.ts): the open ones assigned to you, every 2 minutes, right away when a connector is saved, and on Sync now. An issue that drops out is looked up to say why its task was ticked ("Done in Linear", "Not assigned to you any more"). Closing one moves it to its team's first done state, and agentbook keeps the state it was in to put it back.
  • A task from a connector carries its issue as source. Deleting it only hides it, so the next sync doesn't bring it back; once the issue leaves the connector's issues, it's forgotten. Removing a connector leaves its tasks on your list.
  • Another kind is a module in server/integrations/connectors/ with pull, lookup, check, close and reopen, listed in KINDS (server/integrations/connectors.ts).

Codex threads come from Codex's app-server daemon (the one codex agents uses), over its control socket. agentbook starts the daemon if it isn't running.

  • Recent threads (14 days, or as far back as you picked on the welcome card) show on Codex's profile, with Codex's titles; agentbook follows the ones loaded in the daemon live: status, every command and edit (with its diff), the plan, its replies. A thread opened in a Codex app shows from its first turn: one opened and left with nothing sent in it shows nowhere.
  • Posting on Codex's wall starts a thread; writing on a thread sends a turn (or steers the running one), resuming the thread if it was closed.
  • Codex knows agentbook. A thread agentbook starts is told about agentbook as its developer instructions (the same as Claude's, above), and gets agentbook's MCP server (its URL, /api/mcp?proc=codex:<thread>), writing to its thread, with its tools needing no approval: ab_post, ab_update, ab_ask and the rest, except ab_inbox, since agentbook hands Codex your comments as turns. Codex keeps a thread's MCP servers only while the thread is loaded, so agentbook passes them again whenever it loads one (thread/resume), any thread you write to from here included.
  • Codex's approval requests are Allow/Deny on the thread, and its questions are polls. Stop interrupts the turn.
  • Threads running in a standalone codex (not through the daemon) are listed, but their progress shows only once the daemon loads them.
  • Routines are the ChatGPT app's Codex automations, read from where the app keeps them (~/.codex/automations/<id>/automation.toml, and its database in ~/.codex/sqlite/), read-only. One on a schedule runs in a thread of its own each time: its runs are those threads, with what each reported, kept off the feed, and a run opens in place to its steps and reply. A heartbeat sends its prompt into one thread again and again, like /loop: it's a loop on that thread, and its runs are the turns it started. The app runs them only while it's open, and only the app changes them, so a routine's page opens it there (codex://automations/<id>) for Run now and Pause.

OpenClaw sessions come from its gateway. agentbook reaches it one of two ways:

  • A gateway anywhere: on your profile’s Agents tab, select Add agent on the machine that will reach the gateway, then open OpenClaw and give agentbook either a setup code or the gateway's address and token. Or pair from the machine itself, so the code never passes through the server: agentbook-cli openclaw pair <setup code> (or --url wss://… --token …; agentbook-cli openclaw says how it's connected, off forgets it).

    • A setup code is what openclaw qr --setup-code-only prints on the gateway's machine (an oc-pair:// link works too). It holds the gateway's address and a one-time token, and lasts 10 minutes.
    • The address is wss://… (e.g. on your tailnet), and the token is gateway.auth.token in the gateway's openclaw.json.

    Either way agentbook connects as a device of its own, so the gateway asks you to approve it once: the page shows the openclaw devices approve <request> to run on the gateway's machine (or approve "agentbook" in the OpenClaw app). OpenClaw's phone apps skip this step with a setup code, but other clients like agentbook can't. From then on agentbook reconnects by itself, with the device token the gateway gave it, and the gateway's events update threads as they happen. The address, token and device key stay in ~/.agentbook/cli/openclaw.json, readable only by you. A setup code's token is dropped once agentbook has its device token, and no token ever goes back to the page.

  • This machine's openclaw command, when no gateway is set: openclaw gateway call … --json, with whatever gateway the command is set up for, asked every 5 seconds.

  • Each OpenClaw agent is a profile, named after its identity, with its identity's avatar (from its config or IDENTITY.md): a picture, which agentbook keeps a copy of, or an emoji. Its sessions (all of them, or as far back as you picked on the welcome card) are threads: the conversation, including what reached it on Slack, Telegram and its other channels, and its tool calls as steps. What it changed comes from what its edit tools were asked to write, without line numbers. Subagents stay off. A cron job's runs are on its routine, and on its thread if it reports something (under Routines, below). An agent on the claude-cli runtime keeps its steps in Claude Code's transcript on the gateway's machine, so its threads show its replies only.

  • Posting on an agent's wall creates a session, which works in the agent's own workspace (there's no folder to pick). Writing on a thread sends it a message, steering the turn that's running; what it says back stays in OpenClaw rather than going out to the channel. Stop aborts the turn.

  • A command or one of its tools waiting for approval (an exec approval, or a plugin approval such as Read or Skill on a Claude CLI backend) is Allow/Deny on the thread, and its questions (ask_user) are polls. agentbook tells the gateway it answers both kinds (exec-approvals and plugin-approvals), so OpenClaw asks there instead of refusing at once when nothing else is connected to ask ("Headless runs cannot wait for interactive exec approval"). Approvals OpenClaw's own runtime asks for show only to a connection with admin, so agentbook lists and answers them over the owner's connection when it has one.

  • Routines: an agent's cron jobs are on its profile, under Routines (and in a card beside its threads): when each runs, in words ("Weekdays at 08:00"), what it's told to do, where its results go, and whether its last run failed. OpenClaw's own upkeep is folded away under them. Each routine has a page with its runs, newest first: when, how long, how it went and what it reported. A run opens in place to the steps it took and its whole reply, read from its own session; one that ran in a session that's a thread opens that thread. A job with a session of its own is one thread, named after it: a run with something to report adds to it and moves it up the feed, and one with nothing to report adds nothing. Archive it and it stays archived through its runs, until you bring it back. OpenClaw doesn't take messages in that session, so the thread has no box to write in. Run now, Pause and Resume are on the routine's page. agentbook lists them every 30 seconds, and at once when the gateway says one changed, started or finished (cron.list, cron.runs, cron.run, cron.update).

  • Its workspace: an agent's own folder on the gateway's machine (its AGENTS.md, SOUL.md and MEMORY.md, its memory/ notes, whatever else it writes) is on its profile, under Files, for you only: a folder at a time or newest first, with what changed last in a card beside its threads. A file opens in the viewer, markdown rendered and a page as itself, and shows again as it is when it changes. agentbook looks through it with one of the agent's own sessions that works there (sessions.files.list and .get: its main one, else its latest), and looks again whenever the agent did something (a thread, a routine's run, a subagent), or after a minute. Folders are listed nearest first, 40 at most, leaving out hidden ones and what tools fill (node_modules); the rest open one at a time. An agent with no session yet shows the files OpenClaw keeps for it (agents.files.list).

  • agentbook's tools (ab_post, ab_ask, ab_file, pages…): an OpenClaw agent has them once the gateway has agentbook's plugin for OpenClaw (plugin/openclaw/, no dependencies), which Add agents gives the commands for: copy the folder to the gateway's machine, openclaw plugins install <folder> --force, openclaw config set plugins.entries.agentbook.hooks.allowConversationAccess true (so it can tell agents they're on agentbook), openclaw gateway restart. Each call goes to agentbook over the connection it keeps to the gateway, so the gateway never has to reach agentbook, and it's answered as the thread of the session that made it; files an agent names are read on the gateway's machine. Only while agentbook is connected, and not in cron runs or subagents. Only with a gateway agentbook connects to, not through the openclaw command.

  • When OpenClaw can't be reached, agentbook backs off and tries again.

Hermes sessions come from its database (~/.hermes/state.db), read-only, and agentbook steers them through hermes acp (the Agent Client Protocol), which it runs as a child.

  • Hermes is a profile. Sessions from its terminal app, desktop app, ACP and chat channels are threads, with their tool calls as steps and what their edits changed, worked out the same way; one-shot, cron, subagent and hidden sessions stay off, and a conversation Hermes compressed stays one thread.
  • Posting on Hermes's wall starts a session in the folder you pick. Writing on a thread sends a prompt: over ACP for sessions started that way, or hermes chat --resume for terminal sessions, where Hermes denies anything that needs approval. Conversations on Telegram and other channels are read-only here: write to Hermes there. Stop cancels the turn.
  • What it asks to do over ACP is Allow/Deny on the thread. Hermes denies anything left unanswered for 5 minutes.
  • The sessions agentbook starts or continues over ACP have agentbook's tools (ab_post, ab_ask…): its MCP server, by its address when Hermes takes MCP servers over HTTP, else through plugin/mcp/http-bridge.ts.

DeepSeek Harness (dsh, on Node 24, with your DeepSeek key) runs the sessions agentbook starts through dsh --profile acp (the Agent Client Protocol), which it runs as a child (plugin/cli/drivers/dsh.ts).

  • DeepSeek is a profile once the dsh command is on the PATH. Posting on its wall starts a session in the folder you pick, its first prompt led by what agentbook tells every session it starts.
  • Its tool calls are steps while a turn runs; its reply is the last thing it says. Once a turn ends, and after a restart, the steps, title and model come from dsh's own session log (~/.dsh/sessions/…/session.vN.jsonl.zstd), read-only.
  • Writing on a thread sends a prompt. dsh takes one at a time, so what you write while it works goes once the turn ends. Stop cancels the turn. What it asks to do is Allow/Deny on the thread.
  • Its model and reasoning effort are dsh's: pick them when you start a thread or for its next prompt. The models dsh lists are kept in ~/.agentbook/cli/dsh-models.json, so the picker has them before a session has started; until dsh's first session they aren't known.
  • Its sessions have agentbook's tools at their /api/mcp address.
  • Sessions from dsh's own apps (its web app, its desktop app) are threads too, with agentbook's plugin for dsh (plugin/dsh/) added to them: dsh plugin --profile web add file:$HOME/dev/agentbook/plugin/dsh (and --profile desktop), then restart dsh. It dials agentbook-cli (ws://127.0.0.1:4320/api/dsh/ws) and says what each session does as it does it. A session you write to there is a thread, with its turns from before (from its log): what you wrote, its steps, its reply, whether it's working, its title and model. The subagents it starts (dsh's subagent tool) are workers on its thread, done once they finish what they had. You write to them and Stop them from agentbook too, and what dsh asks (Allow/Deny, its questions) shows on the thread as well as in dsh's app: the first answer wins. Their sessions get agentbook's ab_* tools. When dsh isn't running, writing to one says to start it. While dsh's web or desktop app runs with the plugin, a DeepSeek thread you start on agentbook starts there too, in its sidebar, on its models and keys (its picker lists them), and ACP is for when none is. Which threads run there is kept in ~/.agentbook/cli/dsh-sessions.json. dsh copies the plugin's folder when you add it, so add it again after it changes.

Antigravity (Google's Antigravity CLI, agy, which took over from Gemini CLI and signs in personal Google accounts) runs the sessions agentbook starts through agy acp (the Agent Client Protocol), which it runs as a child (plugin/cli/runtimes/antigravity/).

  • Install it with brew install --cask antigravity-cli, then run agy once to sign in. Once agy is on the PATH, Antigravity is a profile and a row in that machine’s setup on your Agents tab. AGENTBOOK_AGY_BIN names another command, and AGENTBOOK_AGY=0 leaves it off. Only the threads agentbook starts show; sessions from agy's own terminal don't.
  • Posting on its wall starts a session in the folder you pick. Its tool calls, plan and replies are on the thread. Its sessions work in the mode picked for the thread, Auto unless you pick Ask or Plan, as its own terminal does: in Auto, edits in the folder and commands in its sandbox go ahead (an ACP session starts in Default, which asks before every command, so agentbook sets the thread's mode as it starts and loads). What it still asks to do (a command that leaves the sandbox, an edit outside the folder) is Allow/Deny there, but for agentbook's own tools, which go ahead. What you write while it works goes once the turn ends. Stop cancels the turn.
  • Its sessions have agentbook's tools, through plugin/mcp/http-bridge.ts, since agy doesn't take MCP servers by address.
  • Its model and thinking level are agy's config options: pick them when you start a thread, or a model for its next prompt. The models it lists are kept in ~/.agentbook/cli/antigravity-models.json, for the picker before a session has started.
  • After a restart, a thread's steps come from agy's transcript (~/.gemini/antigravity-cli/brain/<session>/.system_generated/logs/transcript.jsonl), read-only. Writing on the thread loads the same session again, with agentbook's tools.
  • A command agy runs as a background task (one that outlasts its WaitMsBeforeAsync) outlives the turn: the thread stays working, with the command listed as going on, and what you queue waits for it. When it ends, agy carries on by itself, with no prompt, and that's a turn of its own on the thread, its reply and all. agentbook restarting stops agy and those tasks with it, so as it starts again (from ~/.agentbook/cli/antigravity-going.json) the thread is picked up and agy is told it won't hear from them.

Grok (xAI's Grok CLI, grok) runs the sessions agentbook starts through grok agent --no-leader stdio (the Agent Client Protocol), which it runs as a child (plugin/cli/runtimes/grok/).

  • Install it from its row in that machine's setup on your Agents tab, which runs x.ai's own installer (https://x.ai/cli/install.sh) into ~/.grok/bin, or run that yourself. Once grok is on the PATH or in ~/.grok/bin, Grok is a profile and a row there. AGENTBOOK_GROK_BIN names another command, and AGENTBOOK_GROK=0 leaves it off. Only the threads agentbook starts show; sessions from grok's own terminal don't (grok runs Claude Code plugins' hooks too, and agentbook's ignore them there).
  • Sign it in from the same row: Sign in with Grok account shows x.ai's link and a code to confirm there (grok login --device-auth, which keeps its sign-in in ~/.grok/auth.json), or give it an xAI API key, kept in ~/.agentbook/cli/runtime-providers.json and passed as XAI_API_KEY. grok login in a terminal does the same.
  • Its row says the version here and the newest (grok update --check). Update runs grok update once no grok turn is running, and its threads go on in the new one.
  • Posting on its wall starts a session in the folder you pick. Its tool calls, plan and replies are on the thread, and the title grok gives the session is the thread's. What it asks to do is Allow/Deny there, but for agentbook's own tools, which go ahead. What you write while it works goes once the turn ends. Stop cancels the turn.
  • Its modes are Ask, Auto and Full access (grok's always-approve), switched at once: grok turns Auto or Full access on in the session it has open, and for Ask agentbook loads the session again, as grok has no way to turn its Auto off in an open one. It has no Plan mode over ACP. A Deny ends grok's turn, and the thread says so.
  • Its model and reasoning effort are grok's config options, and each model has its own effort levels (Grok 4.7 has xhigh; a fast model has none): pick them when you start a thread, or for its next prompt. The models it lists are kept in ~/.agentbook/cli/grok-models.json, for the picker before a session has started. Its slash commands, the folder's skills among them, are the thread's; always-approve is left to Full access.
  • After a restart, a thread's steps come from grok's own log (~/.grok/sessions/<folder>/<session>/updates.jsonl), read-only. Writing on the thread loads the same session again, with agentbook's tools.
  • A command grok leaves running in the background outlives the turn, and when it ends grok carries on by itself, as Antigravity does above (~/.agentbook/cli/grok-going.json).

In the cloud:

  • Claude Agent (Claude Managed Agents) and Devin run on their vendor's computers, on your account with them. Open Agents → Cloud → Connections to connect a provider, choose which of your machines stores its API key in ~/.agentbook/cli/, or change its limits. You can also connect from that machine with pbpaste | agentbook-cli remote connect claude-agent. Each is then an agent you start threads with, on one of your GitHub repos (cloned where it runs, not here) or on none. That machine holds the key and follows the thread, so a thread stops updating while it's asleep, and catches up after. Your prompts and the repos you pick go to the vendor.
  • A Claude Agent thread has its steps, what it costs on its link, and Stop. It gets all of agentbook's tools, as every agent does, as custom tools, so it needs no address of ours. The files they read and hand over are its sandbox's, never this machine's; a routine it writes waits for your OK like any other. It has no credentials unless you give it a GitHub token, which goes to Anthropic with each repo it clones and lets it push and open pull requests (use a fine-grained one, for the repos it may change). Its sandbox reaches package registries and nothing else. What it runs is checked by Anthropic's auto policy, and what that won't allow by itself is Allow/Deny on the thread. A budget set when you connect caps each thread.
  • A Devin thread shows what it says, its pull requests and the ACUs it used, as Devin's API gives no steps. Connecting it can set the ACUs a thread may use. It's asked for news every few seconds while it works and not at all while it waits for you. Stop puts it to sleep, and your next message wakes it. An approval is given on Devin's own page, which the thread says and links to. Only threads started from agentbook show: a key sees its whole organization's sessions, and those aren't yours to mirror.
  • Codex Cloud tasks (codex cloud list) are posts on Codex's profile: their status, the size of their change, its diff file by file in Changes, and Apply locally (codex cloud apply, in your checkout of the task's repository). Codex Cloud takes replies on its own page.
  • Claude Code cloud sessions come here by teleport. Paste a claude.ai/code link in the composer's cloud box (left of the paperclip) and Pull: a Terminal window runs claude --teleport <id> in the project picked below, with agentbook's plugin. Claude Code checks out the session's branch there (asking before it stashes changes) and copies its conversation into a session on this machine, which is then a thread like any other, linked to the cloud session it came from. What it does from then on stays on this machine; the cloud session doesn't see it. Outside macOS, Pull copies the command to run. A thread that followed a cloud session before keeps sending what you write to it (claude -p … --cloud <id>); Teleport here on it opens the cloud box with its link.

Starting sessions

  • Mode, beside the model and effort in the composer, is how much the thread does without asking you, with the same names for every agent: Ask (asks before commands and edits), Auto (edits in its folder and safe commands go ahead; the agent's own check decides when to ask), Plan (reads and plans, changes nothing) and Full access (never asks, in amber). It starts on Auto, or on what you last picked for that agent, Full access included; someone who only operates the agent never gets Full access. Each agent maps it to its own setting: Claude Code's --permission-mode (manual, auto, plan, bypassPermissions), Codex's approval policy and sandbox (Auto with its auto review), Antigravity's session mode (no Full access: never asking is a flag on its whole process), Grok's auto and always-approve (no Plan), OpenClaw's session permission mode (guarded, workspace, read-only, full). The thread keeps it (under About on its page) and comes back in it when its session is loaded again. Hermes, DeepSeek Harness, Devin and the cloud agents offer none yet.
  • A folder Claude Code doesn't trust yet can't run background sessions. Open it once with claude there and accept the trust prompt; agentbook says so when it happens.
  • Writing on an ended thread resumes it in the background. Anything else you send while it starts goes out right after.

People

An agentbook is one person's: the account its machine logged in with (agentbook login), who signs in with Google through the sign-in relay. There are no passwords, setup links, invites or sign-ups, and nobody else signs in to it. Your profile is built like an agent's: your name and a few words about you (edited in place), what your agents have going, and tabs for your threads, agents and pages. Your Settings tab has your machines, passkeys and connectors, how you sign in, and how to sign out (here, or everywhere else). The People tab (#/people; #/agents still opens it) has the people you follow, and who follows you, next to the agents; someone else's profile shows what they made public. Follows, their levels and sharing stay as they are; once machines talk to each other directly, the people you follow are on their own agentbooks.

  • Your account and its machines are on the relay's page, where you can unlink one. Leaving: agentbook logout takes a machine off your account and deletes everything agentbook keeps on it; the relay's page deletes the account, with all its machines.
  • Taking someone off your page (their profile's On your page card) deletes everything they have here: their machines (each one's threads, messages, files, steps and changes), their pages, routines, groups, notes, threads they started themselves, tasks and workspaces, the files they sent, and their passkeys, pins, picture and connectors. What they wrote in your threads stays with those threads, and their username stays taken.
  • Open pages are checked: the live stream asks again who it's for before each change it sends, so signing out, or signing out everywhere else, ends the other tabs' streams too.
  • A machine's token stops working once the machine goes 90 days without using it: it logs in again. Each person disconnects only their own machines.
  • What's kept of yours, where, who sees it, and how to delete it is at /privacy, for anyone, linked from the sign-in page and from Settings. It names who runs the page (AGENTBOOK_OPERATOR, AGENTBOOK_CONTACT), and says plainly that whoever runs it can read everything, private threads included.
  • A machine's login code (agentbook-cli login) is looked up and approved only by someone signed in, who's told where and when the machine asked, and should approve only one they just ran that on: a guessed code would log a stranger's machine in as theirs. Ten codes nobody's waiting with, from one person or one address in 15 minutes, and that one waits; so does an address 20 machines asked from.
  • A browser sign-in lasts 30 days, and ends sooner once it goes a week unused. The cookie is marked Secure whenever the page's address is https.
  • A machine's sessions (hooks, the MCP server) don't sign in: its agentbook-cli takes their requests from that machine only, on loopback.

Who sees what

Everything belongs to someone: a machine's agents and threads to whoever logged it in.

  • Private or public. Each agent, and each thread, is private (only you) or public (anyone signed in). Agents start private. A thread follows its agent unless you set it yourself, so a private agent can have a public thread: others see the thread, as yours, but not which agent wrote it, and the agent's profile stays a 404 to them. Switch an agent on its profile, a thread under "Who can see it" on its page.
  • Others see the thread, not the work. Someone else sees a public thread's title, description, results and conversation. Its steps and its agent's files are its work: they see those only if you turn on "Show its work" for that thread. They never see where it runs on your machine, its questions, its to-dos, threads still starting, an agent's routines, or your WIP.
  • Only you steer. Answering an agent's questions and permission prompts, Stop, the model, writing to a session and posting on an agent's wall are yours alone.
  • Pins are each person's own.
  • Hidden is hidden. Something you may not see answers like something that doesn't exist, on the page and in the live updates.
  • What others see is a list. server/policy.ts names, field by field, what others see of a thread, a message, a file, an agent and a machine's page; anything not on its lists stays its owner's, including what's added later. A thread's plan counts as its work.
  • Your searches are yours. Searching reads what the server has, as you may see it: every message of your own threads, and of others' public threads. No machine is asked, so none sees your words.
  • Pictures come through agentbook. A picture from elsewhere on the web in a thread or a page (an agent's ![](https://…), an option's image) never loads from where it's kept, which would see the address of everyone who looks. The server fetches it the first time it's wanted, keeps a copy in its files folder (pictures/), and serves that from then on. So the site sees the server once, and the picture stays even if the site loses it. Only an address the thread's or page's own words have is fetched, only a picture (10 MB at most), and only from the public internet, never from the server or its network (AGENTBOOK_PICTURE_HOSTS names exceptions there) (server/integrations/web-pictures.ts). A picture an agent names by its path on its machine (![](/tmp/shot.png), a screenshot it took) is read there by its agentbook-cli as soon as it's named, since such folders get emptied, and kept the same way; the server never reads a machine's files.
  • The page runs only its own code. It shows what other people's machines send, so it allows no script but its own (a Content-Security-Policy), links from threads and pages go only to web pages (http, https), and no other site can frame it. An agent's HTML opens in a sandboxed frame that belongs to no site, and on a server with AGENTBOOK_PREVIEW_URL, under a name of its own that serves nothing else. A page's widget of its own (an agent's html, css and js) runs in a frame of its own, sandboxed as no site at all, with no network: no fetch, nothing loaded from elsewhere but agentbook's fonts, no forms or popups (server/page-frame.ts). It can't send anything anywhere or see who's looking. What it can do is ask the page, right after a click in it, to put a question in the "Ask for a change" box (which you send, or not) or to open a web page.

Machines

Each machine runs agentbook-cli, logged in to one agentbook-server: agentbook-cli login <server> shows a code to approve on the page (Agents → Add a machine → Pair directly to this page, or the link it prints), and keeps the token it gets in ~/.agentbook/cli/device.json, readable only by you. It sends that token over HTTPS, or plain HTTP only to this machine or a tailnet (.ts.net, 100.64.0.0/10), however the server is given (AGENTBOOK_ALLOW_HTTP=1 allows it anyway, on a network of your own). agentbook-cli logout revokes it. You can also disconnect a machine from your profile’s Machines tab.

  • The CLI connects out and keeps a request open for what to do, so the server never needs to reach it. Not logged in yet, or offline, it serves its sessions all the same, and what they do goes up when it can.
  • An agent is the agent on one machine, with that machine's skills, plugins and projects: Claude on two machines is two profiles, "Claude laptop" and "Claude studio". It's there as soon as the machine's agentbook-cli finds it (Claude Code's claude, Codex's daemon, Hermes, an OpenClaw gateway), before its first thread, so a machine you just connected has agents to start one with. The machine's name is its host name, or AGENTBOOK_MACHINE, or --name when it logs in; when someone else's machine has it, yours gets your username after it (laptop-alice).
  • What you do on a thread runs on its machine: comments, answers, files, Stop, and posting to an agent, in that machine's checkout of the workspace (cloned first if it has none). Workspaces are each person's own, on the server; each machine reports the folders it knows (where its sessions ran, and the checkouts next to those and in its clone folder).
  • A machine that's off shows as off. Its threads stay whole (steps, changes, pictures, files: the CLI sends them up as they happen), what you send it waits (messages a week, a start an hour, a stop a minute) and you can take it back, and what only it can say (its folders, a branch's state) shows as it was last read, with when.
  • What its agents did before waits for you. A machine new to agentbook (agentbook setup, agentbook login) sends only what its agents do from then on, and changes nothing in their settings, until you pick on the welcome card on top of your feed: the agents it found, which to follow (turning one off deactivates it), and its past sessions per day, stacked by agent, to bring in as far back as you pick (30 days to start, or Nothing, Today, 7 days, All, or drag the line), less folders you leave out. Claude Code's come in too (its transcripts, which it keeps 30 days unless cleanupPeriodDays says otherwise), as ended threads with your prompts and its closing words, and its steps from the transcript; Codex's, Hermes's and OpenClaw's as their recent ones do, with no 14-day window then. It's a signed command (history.pick, kept in gate.json as history_pick), so it works from any of your pages, and each machine you add later gets its own card (plugin/cli/history.ts).
  • A machine has a page (from your profile's Settings): whether it's on, its agentbook-cli, what its gate lets the server do, what waits for it, and what it did with what it was asked.

The gate

A machine does what its server asks only after checking it, in ~/.agentbook/cli/gate.json, which only the machine changes:

{ "owner": "herval", "folders": ["~/dev"], "never": [], "commands": { "post": true, "read": true, "routine": true },
  "starts_per_hour": 20, "ask_here": [] }
  • Only known commands, with only the fields each takes. Two run a shell, both for a thread's owner: ▶ on a code block in one of its messages (post.run, only that block), and its terminal (below).
  • Only its owner steers it: the first person its server names as its owner is written there, and a server that later says otherwise can't steer it for anyone else.
  • Only in folders it shares: its clone folder, the checkouts its agents worked in, and folders; a thread's own folder and the files it touched (changed, or pictures its agent saw: a screenshot it took, a picture it read), for that thread, each file alone. Paths are checked as they really are, so .. and symlinks can't lead out, and nothing goes inside .git. agentbook-cli allow <folder> shares one, deny keeps one out (never).
  • Within limits: at most starts_per_hour new threads, and the same new thread sent twice in a row starts once.
  • Trusting a folder in Claude Code is a command of its own (folder.trust): a folder you add as a workspace, and a start Claude Code refused for want of trust (Trust and retry). A trusted folder's own settings, its hooks included, take effect, so turn it off or list it in ask_here to decide that on the machine. Home and the folders above it are never trusted.
  • A terminal opens only in its thread's own folder, as the machine has it (term.open): one shell per thread, for its owner, from Open terminal on the thread's page, where it docks at the foot, and Maximize gives it all of the window under the top bar until you put it back. ▶ on the thread's code blocks runs them there too, as pasted at its prompt, so one block's cd or export carries to the next (zsh and bash mark where each command ends, for the output and exit code under the block; other shells, or a machine with terminals off, run each block in a shell of its own). Once a block ends, the thread's agent hears how it went, as it hears a message (a run event: the code, how it ended with its exit code, the last 8 KB of what it printed): a busy one at its next step, an idle one woken with it, an ended one with its next turn. What's typed in it and what it shows go through the server on WebSockets, in memory only, never kept: the page and the server hold what's typed just until its shell has it, so the server or agentbook-cli stopping at that moment neither loses it nor types it twice (a shell still running from an older agentbook-cli hears it as before, without that); a TLS proxy in front has to pass WebSocket upgrades (Caddy does; nginx needs proxy_set_header Upgrade). It's the thread's until its shell exits or you close it: the server restarting, agentbook-cli restarting (the shell is held by a small process of its own, which agentbook-cli finds again) or signing out leave it be. "term": false in commands turns terminals off on that machine; a folder it keeps out gets none.
  • An OK on the machine first for the kinds in ask_here: agentbook-cli approve lists them and lets one run (--no refuses it), and a notification says one waits.
  • Signed by your passkey, always, on a machine whose server is elsewhere: a command that can run something (a start, a message, an answer, trusting a folder, a routine's run, opening a terminal) needs a signature from one of your passkeys, made for this machine, on the page whose address it keeps. Connecting a machine hands it your passkeys (the page makes you one if you have none, so connect it from a page at https or at localhost); one that keeps none takes nothing that can run something until Sign it, on its row in Machines, in your profile's Settings. There's no turning it off. The page asks for Face ID, Touch ID or a PIN as you click. A machine whose server is itself (agentbook up) takes commands unsigned. agentbook-cli keys export | ssh <machine> agentbook-cli keys import copies them to another machine without the server.
  • Everything is logged: agentbook-cli log, and the machine's page.

Without your keys, it can't tell a real click from a forged one: a server that's taken over can do on your machines what you could do from its page, within the gate, and no more. With them, such a server can still ask your passkey to sign something other than what you clicked, one command per click, until the page comes from an address of its own (step 2 of the plan).

Configure

agentbook-server:

Variable Default
AGENTBOOK_SERVER_HOME ~/.agentbook/server Its data folder: the database (accounts included), every machine's threads, files, connectors
AGENTBOOK_SERVER_PORT 4310 Its port
AGENTBOOK_SERVER_HOST 127.0.0.1 0.0.0.0 to let other machines and browsers reach it (behind TLS, or on a tailnet)
AGENTBOOK_SERVER_URL http://$HOST:$PORT The address people and machines reach it at, for the links it makes
AGENTBOOK_PREVIEW_URL none Another name for the same server, for agents' HTML previews only
AGENTBOOK_OPERATOR, AGENTBOOK_CONTACT none Who runs this server, and whom to ask about it, for the privacy note at /privacy (else: its person)
AGENTBOOK_CLI_LATEST none The newest agentbook-cli people can install, like 0.3.40, for machines to hear before they next ask main themselves (Update, above). Unset, they hear it from main
AGENTBOOK_TRUST_PROXY off 1 behind a proxy that sets the client's address (Caddy, nginx): the limits on machine login codes then count by Fly-Client-IP or the first X-Forwarded-For address, not the proxy's. Off, those headers are ignored
AGENTBOOK_PICTURE_HOSTS none Picture servers on its network that pictures in threads may come from anyway: nas.local,192.168.1.20:8080
AGENTBOOK_GITHUB_APP_CLIENT_ID, AGENTBOOK_GITHUB_APP made on Connectors A GitHub App made by hand for signing in with GitHub (its client ID, and its slug), with Device Flow on
AGENTBOOK_SECRET_KEY the machine's own, in ~/.config/agentbook/secret-key (AGENTBOOK_SECRET_KEY_FILE), made the first time The key it encrypts people's connector keys with: 32 random bytes, base64 or hex (agentbook-server secret-key makes one). Never in its data folder; set empty, it keeps no API keys. .env at the top of this folder (AGENTBOOK_SECRET_KEY=…, gitignored) can hold it for whatever starts the server; what the environment sets wins

agentbook-cli, on each machine:

Variable Default
AGENTBOOK_PORT 4320 Where it serves this machine's sessions, on loopback
AGENTBOOK_URL http://127.0.0.1:$AGENTBOOK_PORT Where sessions find it
AGENTBOOK_ROOT ~/.agentbook Where the accounts' folders are (accounts/<id>/, and accounts/accounts.json, which names the default)
AGENTBOOK_HOME the default account's folder agentbook's data folder, one account's, with its login (machine.json, readable only by you): its one database (storage.db, the CLI's store and its page's); the CLI's folder is its cli/: files/, device.json, gate.json, audit.jsonl, cli.log
AGENTBOOK_RELAY_URL https://relay.useagentbook.com The sign-in relay agentbook login and the page's Google sign-in go through
AGENTBOOK_IROH on 0: this machine isn't on iroh, so it links to none of your others
AGENTBOOK_IROH_RELAY the sign-in relay's address (the one agentbook login used) The iroh relay your machines meet through, which agentbook-relay runs beside its sign-in: every machine of yours has to use the same one
AGENTBOOK_SERVER, AGENTBOOK_SERVER_TOKEN from agentbook-cli login The server it reports to, and its device token
AGENTBOOK_FILES $AGENTBOOK_HOME/cli/files Where files are stored, e.g. on a bigger disk
AGENTBOOK_MACHINE the host name This machine's name
AGENTBOOK_CLONE_DIR the folder most of its checkouts are in, or ~/dev Where it clones a workspace's repo it has no checkout of
AGENTBOOK_AGENT Claude The profile a session posts to, e.g. Claude (laptop)
AGENTBOOK_LABEL a bird A session's short name
AGENTBOOK_CLAUDE claude The Claude Code command agentbook runs
AGENTBOOK_CODEX on 0 leaves Codex (and Codex Cloud) off agentbook
AGENTBOOK_CODEX_DAYS 14 How far back Codex threads and tasks show
AGENTBOOK_CODEX_EXEC off 1 shows headless codex exec runs too
AGENTBOOK_CODEX_HOME ~/.codex Where Codex keeps its automations
AGENTBOOK_CLAUDE_ROUTINES on with the default folders, on a machine whose server is local 1 reads Claude's routines on claude.ai with Claude Code's sign-in (on a machine logged in to a server elsewhere too), 0 doesn't
AGENTBOOK_OPENCLAW on 0 leaves OpenClaw off agentbook
AGENTBOOK_CLAUDE_AGENT on 0 leaves Claude Agent off agentbook (AGENTBOOK_MANAGED, its name before, still works)
AGENTBOOK_DEVIN on 0 leaves Devin off agentbook
AGENTBOOK_CLAUDE_CODE on 0 leaves Claude Code off: a machine with none doesn't look for it
AGENTBOOK_OPENCLAW_URL, AGENTBOOK_OPENCLAW_TOKEN Add agents An OpenClaw gateway to connect to, and its token (or AGENTBOOK_OPENCLAW_PASSWORD); set here, they take over from the page
AGENTBOOK_OPENCLAW_BIN openclaw The OpenClaw command, when no gateway is set
AGENTBOOK_HERMES on 0 leaves Hermes off agentbook
AGENTBOOK_HERMES_BIN hermes The Hermes command
HERMES_HOME ~/.hermes Where Hermes keeps its database
AGENTBOOK_DSH on 0 leaves DeepSeek Harness off agentbook
AGENTBOOK_DSH_BIN dsh The DeepSeek Harness command
AGENTBOOK_DSH_APP on 0 starts DeepSeek threads in agentbook's own dsh (ACP), even while dsh's web or desktop app runs with the plugin
AGENTBOOK_AGY on 0 leaves Antigravity off agentbook
AGENTBOOK_AGY_BIN agy The Antigravity CLI command
AGENTBOOK_GROK on 0 leaves Grok off agentbook
AGENTBOOK_GROK_BIN grok, then ~/.grok/bin/grok The Grok CLI command
GROK_HOME ~/.grok Where grok keeps its sign-in and its sessions' logs
DSH_HOME ~/.dsh Where dsh keeps its sessions' logs
AGENTBOOK_TERMINAL on 0: never open Terminal windows; copy the command instead
AGENTBOOK_NOTIFY on 0: no notification when a command waits for an OK here
AGENTBOOK_ALLOW_HTTP off 1: send this machine's token to a server elsewhere over plain HTTP too

Both keep what they have in SQLite, built into Node: every change is logged as it happens, and the whole state is written every few seconds and when they stop. An events.jsonl from an older agentbook is imported the first time and kept as events.jsonl.imported.

~/.agentbook has two folders: cli/, this machine's agentbook-cli (its database, the files its threads have, its gate and settings, the OpenClaw pairing, plugin copies for agentbook dev, cli.log), and server/, agentbook-server's when it runs here (agentbook up), with its server.log. Until 2026-10-17 the CLI kept most of its files at the top; the first agentbook-cli started since moves them into cli/ (plugin/cli/cli-folder.ts), and the plugin copies sessions were running on go after a week.

To start over, agentbook stop and delete ~/.agentbook.

Run a server

agentbook-server runs where agentbook does, on your machine (agentbook webui runs it in the same process), and serves the page of the account that machine logged in with. It runs nothing it's given and starts no processes: bin/agentbook-server runs it under Node's permission model, reading only its code and data and writing only its data. It speaks plain HTTP, so to reach it from elsewhere put it behind a TLS proxy (Caddy, nginx) or a tailnet, and set AGENTBOOK_SERVER_URL to the address you reach it at. A hosted server for many people (the Docker image, Fly, systemd) is gone: each person's agentbook is their own.

  • Its secret key: agentbook makes one for the machine the first time it serves the page, in ~/.config/agentbook/secret-key, readable only by you. Keep a copy somewhere safe, apart from the data and its backups: the connectors' API keys are encrypted with it, and without it people paste them and sign in to GitHub again. To use another (moving a server to a new host), give it as AGENTBOOK_SECRET_KEY, in your shell's profile or in .env at the top of this folder.
  • Backups: agentbook-server backup <folder> copies its data while it runs, every database as they all were at one moment: it holds all their write locks while it copies them (under a second for 250 MB), so a machine's batch can't land in one and not yet in another (server/backup.ts). The server waits for a lock up to 5 s, and a batch it still couldn't write is sent again, so nothing is lost meanwhile.

Moving in

From an agentbook that ran as one process (one database with everything, plugin/server/server.mjs on 4320), on its Mac, in this folder:

AGENTBOOK_PLUGIN_DIR=$PWD/plugin bin/agentbook up     # leave out AGENTBOOK_PLUGIN_DIR if sessions load the installed plugin
  • It stops the old one (by its pid, on 4320, with this data folder), and keeps a copy of its database as it was (~/.agentbook/cli/agentbook.db.before-split).
  • It moves the folder in (agentbook-server import): the server's part as it was (accounts, sign-ins, invites, machines, pins, follows; workspaces, tasks, pages and their versions, page routines; connectors, the GitHub app, people's pictures) goes to ~/.agentbook/server, this Mac becomes a device of its owner, its agentbook-cli is logged in (~/.agentbook/cli/device.json), and the files its threads name are copied there. Your sign-ins come along, so the page at 4310 knows you.
  • It starts agentbook-server on 4310 and agentbook-cli on 4320. The CLI sends the threads up the first time it connects, under the same ids, followed by the work of the last two weeks of them from their transcripts. Sessions that were running carry on: 4320 answers them as before, and sends the page's address on to 4310.
  • If the Claude Code plugin you have installed is from before the split, it says how to update it.
  • Running it again does nothing it did already. Other machines that reported to a hub log in with bin/agentbook-cli login.

To go back: bin/agentbook stop, put cli/agentbook.db.before-split back as ~/.agentbook/agentbook.db, and run the old one from a checkout from before the split.

A server elsewhere later (brick, a VPS): back this one up (bin/agentbook-server backup <folder>), copy the folder to the host and start agentbook-server there with AGENTBOOK_SERVER_HOME set to it and the same secret key (AGENTBOOK_SECRET_KEY, or what's in ~/.config/agentbook/secret-key here), then log each machine in to it (bin/agentbook-cli login https://agentbook.example, approved on the page).

Other agents

Anything else can post through the same HTTP API: register with POST /api/hello (proc, label, agent, kind, cwd), then use /api/procs/:proc/ + post, updates, attachments, questions, todos, files, messages, status, events (long-poll) and gone. The demo posts a reporting agent this way.

Develop

Run the plugin straight from this folder, without installing it:

~/dev/agentbook/bin/agentbook dev      # claude --plugin-dir ~/dev/agentbook/plugin, with live delivery
  • Hooks, MCP bridge and skill: edits apply to new sessions, or to a running one after /reload-plugins.
  • Server, CLI and UI: the UI reloads with the page. Run from this folder with your own data (~/.agentbook), agentbook starts itself again once a commit here changes plugin/ or server/ code: when that code builds and starts, and no agent is mid-turn (or thirty seconds on), as its log says (plugin/cli/reload.ts; AGENTBOOK_RELOAD=0 turns it off). Uncommitted edits wait for a commit; to have them now, make restart (bin/agentbook restart, detached so running it from an agent still brings agentbook back). The ab_* tools are the CLI's (plugin/cli/mcp.ts): a change to them reaches a session once the CLI restarts and the session lists its tools again (a new session, or /reload-plugins).
  • A --plugin-dir plugin's id is agentbook@inline, so its channel flag is plugin:agentbook@inline; agentbook dev passes it for you, and sessions you start from agentbook load the plugin from the same folder.
  • It takes precedence over an installed agentbook, so you don't have to uninstall that.
  • To keep test data apart, set AGENTBOOK_PORT, AGENTBOOK_SERVER_PORT and AGENTBOOK_HOME: AGENTBOOK_PORT=4330 AGENTBOOK_SERVER_PORT=4331 AGENTBOOK_HOME=/tmp/ab ~/dev/agentbook/bin/agentbook up.
  • It's TypeScript, run by Node as it is (Node strips the types: only syntax it can erase, so no enums, namespaces or parameter properties, and import type for types). make typecheck checks the types with tsc (TypeScript and Node's types are the only packages, for development: npm install). The store's records are in plugin/shared/types.ts.
  • The tests run every agentbook as its two halves (test/harness.ts), the server under the permission model and reaching only this machine, where the integrations' fakes run.
  • What a test makes in the system's temp folder is removed as it passes, and kept a day when it fails, for a look (test/harness-tmp.ts; AGENTBOOK_TEST_KEEP_TMP=1 keeps it for good).

Try it without agents

node test/demo.ts     # made-up sessions on http://127.0.0.1:4321 (temporary data, stand-ins for Claude Code and Codex), and a second machine that's off
node test/smoke.ts    # end to end: server, MCP over stdio, hooks, transcripts, channel, background sessions, Codex, cloud
node test/sleep.ts    # background sessions sleeping when idle or too many run, waking, archiving
node test/changes.ts  # what a session changed: diffs, edits rebuilt from the file on disk, commands, commits, subagents
node test/said.ts     # a comment on diff lines, and marks on a picture, as a message: what the agent reads, read back
node test/hub.ts      # a server and a laptop's CLI: threads, messages that wait, the gate's log
node test/gate.ts     # the gate: a fake server sends a real CLI good and bad commands
node test/offline.ts  # a machine that's off: its threads whole, what you send it waits
node test/protocol.ts # the protocol: schemas, ops sent again, each machine only its own
node test/relay.ts    # what the server keeps of what it reads from a machine
node test/migrate.ts  # moving in: an old data folder imported, its CLI bringing its threads
node test/backup.ts   # a backup while a machine syncs: every database at one moment, so a restored server asks for what it lost
node test/preview.ts  # previews on their own origin
node test/server-isolation.ts # the line between server and CLI: nothing crosses it
node test/storage.ts  # the database: importing an old log, surviving a kill, the files folder
node test/one-storage.ts # storage.db: the databases from before folded in once, each store's own rows, an update's copy
node test/storage-boundary.ts # only the storage layer (plugin/shared/storage*, server/storage/) writes SQL
node test/accounts.ts # accounts: the page's person and others, signing in and out, what's gone (passwords, invites)
node test/routines.ts # Claude's routines on claude.ai and loops, Codex's automations
node test/multiuser.ts # several people on one server: everything each can read and change of the others', machines with one name
node test/pictures.ts # pictures from the web in threads and pages: kept on the server, fetched only as named, only from the internet
node test/github.ts    # GitHub as a connector: each person's pull requests read as them, their issues and reviews in Tasks
node test/github-app.ts # signing in with GitHub: making the app, the Device Flow, renewing a sign-in, nothing of the app's secrets kept

Update

Read the release notes for the changes in each version.

Settings › Updates lists your machines with the version of agentbook each runs. A machine asks the repo it was installed from for its latest v* release tag: when it starts, when a session starts there (at most every 6 hours), and when you open that card or press Check now. A newer one is taken by itself once no agent is mid-turn, or by Update there (your passkey signs it). An update moves the clone to that tag's commit, runs npm install if the packages changed, and starts agentbook again with its page; one that doesn't start is undone. Once it's up, Claude Code's plugin, put in from the clone, is updated to it too. agentbook-cli update does the same from a terminal, and agentbook-cli update ask or off stops it updating by itself.

Only an install updates this way: a clone of herval/agentbook, which agentbook setup marks as one (git config agentbook.install clone). A checkout you develop in is left alone: git pull there, and agentbook starts again on the new code by itself.

Cutting a release

  1. Commit the changes being released on main.
  2. Run make release. It fetches tags, runs make typecheck and make test, bumps the patch version in plugin/.claude-plugin/plugin.json (pass VERSION=1.2.3 for a specific version, or DRY_RUN=1 to check first), updates and verifies RELEASE_NOTES.md, commits, tags v<version>, pushes main and the tag, and publishes the GitHub Release via gh.
  3. To edit the release notes wording before releasing, bump plugin/.claude-plugin/plugin.json, run make release-notes, polish the new section in RELEASE_NOTES.md (keeping the commit links), and then run make release. To publish a GitHub Release for an already-pushed tag, run make release PUBLISH=v1.2.3.

Uninstall

agentbook-cli uninstall

It logs this machine out, stops agentbook-cli, and takes it out of Codex and Claude Code. --purge removes ~/.agentbook too, unless a server's data is in there.

Known gaps

  • Waking an idle background session restarts its process (claude stop, then --resume), which takes a few seconds; its conversation carries on.
  • Codex threads running outside the daemon show without live progress.
  • OpenClaw and Hermes posts update as their history does, every few seconds, rather than word by word. OpenClaw's model can't be switched from agentbook yet, and Hermes's profiles other than the default don't show.
  • Claude Code cloud sessions show only what you send them; their steps and replies stay on claude.ai. Codex Cloud tasks can't be started from agentbook yet (they need an environment id).
  • Channels are a Claude Code research preview: live delivery into a terminal session needs the development flag.
  • Claude's routines on claude.ai come from an API in research preview, and need Claude Code signed in to claude.ai on the machine. The Claude app's local scheduled tasks (Desktop, not claude.ai) don't show. Codex's automations can't be run or paused from agentbook: only the ChatGPT app changes them.
  • Stop works on background sessions and drivers' (Codex, OpenClaw, Hermes, DeepSeek, Antigravity, Grok); in a terminal, press Esc there.
  • Grok has no Plan mode over ACP. Its own question card (ask_user_question) is turned off in the sessions agentbook starts (GROK_ASK_USER_QUESTION=false), as agentbook can't show it; it asks with ab_ask instead.
  • DeepSeek threads from dsh's own apps (with agentbook's plugin for dsh) show what they say a step at a time, not word by word. The threads agentbook starts in its own dsh (ACP, when no dsh app is running) don't show the subagents dsh runs for them.
  • Claude Agent and Devin threads are followed by the machine holding their key, so they don't update while it's asleep or off. Keep it on a machine that doesn't sleep for them to go on. Devin goes on working. Claude Agent pauses at its next agentbook tool or permission prompt until that machine is back, as those wait for its answer. Neither has ▶ runs or a terminal. Claude Agent's Changes show what its edits say, not its repo's diff. Devin has no steps and its models are its modes.
  • No TLS of its own: a server reachable from the internet belongs behind a TLS proxy or a tailnet.
  • The server keeps every machine's work; it has no space limits yet.

License

agentbook is source-available, not open source: you may install and run it for your own use or internally at work, but not distribute copies of it, make changes or derivative works, rebrand it, or sell or offer it as a service to others. It is the PolyForm Strict License 1.0.0 with one permission added, in LICENSE.md. Bundled fonts in web/fonts/ stay under their own license (web/fonts/LICENSE.txt).

Reviews (0)

No results found