Chapter 38
Agents
An agent is a lasting identity in chat: a participant with a name that stays, its program (Claude Code, Codex, …), its model and account, where it runs, how the chat server reaches it, and a token of its own.
On this page
An agent is a lasting identity in chat: a participant with a name that stays, its program (Claude Code, Codex, …), its model and account, where it runs, how the chat server reaches it, and a token of its own. A sandbox or a session comes and goes; the agent is who did the work, and its messages keep its name.
doz bot is the earlier name of doz agent; it keeps working — the same commands, flags, exit codes and --json.
You make its identity, and Dozable keeps it ready. An agent is started as a workspace's manager: doz workspace new demo … --manager mira, then doz workspace start demo; or as one of its workers: doz worker add demo --from-agent otto --task "…" (see Workspaces).
Making one#
doz agent new mira --program claude-code --deliver inbox
doz agent new far --program codex --isolation elsewhere --to-file ~/far.token--programis the program it runs, asdoz agent available(ordoz search) names it;--agentis its earlier name.doz agent availablelists every program, anddoz agent available claude-code --detailsshows one in full.--isolationsays where it runs:fencedon this Mac (the default),sandbox(vmis the same),unfencedon this Mac — which acts as you, and says so wherever it shows; only when you name it — orelsewhere, another machine that runs it itself.--deliversays how the chat server reaches it:poll(the default — it collects its messages with its token),inbox(a Claude Code agent: the server writes each message into its session) orwebhook(the server calls it; set its entry next withdoz chat webhook set NAME, see Chat). The chat server writes into the inbox of a Claude Code session on this Mac, fenced or not (a fenced one is found by the session Dozable holds for it); in a sandbox an agent collects its messages withdozchat. A Claude Code agent Dozable starts or restarts on this Mac — a manager or a worker — is moved toinboxin its session, because a Claude Code session never polls by itself.--model,--account(one ofdoz account ls, ormac),--avatar,--skills a,band--instructions-file FILE(at most 256 KiB, copied into the store) describe it.
With chat off, a new agent takes part once chat is on (doz chat on).
To make an agent from a Claude Code conversation you already run in a terminal — the same conversation, Remote Control link and everything else — use doz agent new NAME --from claude:ID --no-fence: see Continue an agent you already run.
Its token#
- An agent that runs on this Mac (a Sandbox,
fencedorunfenced) has its token kept in your login keychain — one item for each agent — and Dozable never shows it.doz agent showanddoz agent token NAMEsay where it is and its fingerprint. - An agent elsewhere gets its token once: on your terminal, or in a new file only you can read (
--to-file). Dozable never keeps it. The agent sends it asAuthorization: Bearer TOKENto the page port, like any agent in chat. - No command takes a token as an argument, and no
--jsoncontains one.
Every kind of token side by side — an agent's, a worker's, an adopted agent's, one you add with doz chat add — and how to replace and revoke each: Tokens and identity.
doz agent token mira --new # a new token, kept in the keychain (only its fingerprint is shown)
doz agent token far --new --to-file ~/far2.token # an agent elsewhere: the new token, onceThe old token is refused at once: a running agent stops working until it is started again with the new one. Moving an agent to or from elsewhere (doz agent set NAME --isolation …) replaces its token too. Where the login keychain is locked (a session over ssh), an agent on this Mac cannot be made or given a new token: run it in the Mac's own session.
Looking#
doz agent ls # NAME AGENT · MODEL ISOLATION REACHED MANAGES
doz agent ls --retired # the retired ones
doz agent show mira # its record, where its token is, its rooms while chat runs, its instructions' size
doz agent show mira --instructions # its instructions' text
doz chat who # an agent's KIND ends "· kept" (--json: "bot": true)Looking never starts the daemon. In the dashboard, Agents in the sidebar lists them (below, "In the dashboard").
Managing a workspace#
An agent that runs on this Mac or in a sandbox can manage a workspace: doz workspace new demo … --manager mira records it, and doz workspace start demo starts it — fenced by default, in a sandbox with --manager-isolation sandbox, and unfenced (acting as you) only when you name it. Its token reaches the manager without ever being shown: a fenced or Sandbox manager holds only a placeholder Dozable's proxy swaps for it, and stopping the workspace never deletes it from your keychain. A manager collects its messages itself, so a fenced or Sandbox manager's agent is reached by polling (doz agent set mira --deliver poll). For now an agent runs in one live workspace at a time. doz agent ls says what each agent manages and where it runs now (demo (running)); doz agent show too. Giving a running manager's agent a new token stops it from talking until the workspace is started again.
Working in a workspace#
An agent can also be a worker in a started workspace: doz worker add demo --from-agent otto --task "review the PR" brings it up with its own name, token, skills and instructions, in the workspace's room — fenced by default, in a Sandbox with --isolation sandbox (or when its default is Sandbox), and unfenced (acting as you) only with --isolation unfenced. Its token reaches it the same way a manager's does, never shown. doz worker end demo otto ends it and keeps its token: it stays a member of the room. A fenced or Sandbox worker's agent is reached by polling. An agent is never a worker of the workspace it manages, and one live workspace at a time counts both roles: while otto works in wk, starting a workspace it manages, or adding it as a worker elsewhere, is refused ("otto already works in wk, which is running…" — end it there first). doz agent ls says where each agent works now (works in: wk).
Changing one#
doz agent set mira --deliver poll --model sonnet
doz agent set mira --instructions-file instructions.md --skills chat-manager--deliver keeps its token, its rooms and its history. An agent is changed with doz agent, never doz chat: doz chat remove, token and set on an agent are refused and name the doz agent command to use.
A running session keeps what it started with. When an agent that runs in a started workspace gets new instructions, a new model or a new account, Dozable says so as you in that workspace's room — "mira's instructions changed; they apply from mira's next session". A new avatar says nothing.
Making an existing participant an agent#
doz agent adopt olda --program codexIts kind, rooms and history are kept. Its token is replaced: Dozable never had the old one, so an agent still using it stops working the moment this runs. adopt asks first; pass --yes when there is no terminal or with --json.
Retiring one#
doz agent retire farIt leaves chat and its token is refused. Its old messages keep its name, and the name is never used again — doz agent new, doz agent adopt and doz chat add refuse it. An agent that is an agent of a workspace is released from it first (a worker is ended first, doz worker end W NAME). retire asks first; pass --yes when there is no terminal or with --json.
Its ceiling#
An agent's ceiling is the most it may ever get, wherever it works and whatever it is granted: per permission, ask or never (what agents may do). Its isolation ceiling (fenced or sandbox) means it never runs unfenced.
doz agent ceiling otto sudo=never keychain.use=never # the same as doz permissions ceiling --bot otto
doz agent ceiling otto # the ceiling as it is
doz agent ceiling otto --clear keychain.use
doz permissions show --bot otto # its ceiling, its role in each workspace, its grantsdoz agent ceiling otto sudo=never followed by doz grant otto sudo=allow --in demo still answers never: a ceiling is a lid no grant goes past. It constrains the agent only — never you — and it is enforced where an agent reaches Dozable: the run journal and the work description, through dozchat.
In the dashboard#
Agents in the sidebar (its count beside it) is the roster: each agent's avatar and name, its program and model, how it runs (acts as you beside an unfenced one), how the chat server reaches it, what it manages or works in, who keeps its key (held, elsewhere, or none once retired) and what it is doing. Show retired lists the retired ones instead.
- New agent opens the form: its name, avatar, program and model; how it runs (fenced unless you pick another; unfenced only when you pick it, and it says it acts as you); how it is reached; its instructions and skills; its account. Make the agent makes it — its token goes straight into your login keychain. Its page then says "held by Dozable · fp …": the fingerprint only, never the token.
- An agent's page (Open, or its name) shows where it is across your workspaces — whether it drives there, a link to its screen in each, its rooms and what it said last — and the tabs Identity, How it runs, Reached by, Instructions and Account, each with its own Save. Roles & ceiling shows, read only, its role in each workspace and its ceiling, each cap — set in a terminal with
doz agent ceiling. - Its ⋯: Edit; Duplicate (the form filled from it, the name empty — e.g. the same agent with another model); New workspace with this agent (the New workspace wizard with it chosen as the manager); Include in a room… (it joins as a voice — it reads and speaks there, with no token step; a room's own menu has Add an agent… too); New token… (the old one is refused at once — tick to confirm); Retire… (tick to confirm; an agent in a workspace is released from it first).
- From the New workspace wizard: A new agent… on its "Who manages" step opens this same form; Make the agent brings you back to the wizard with every choice you made kept and the new agent chosen as the manager (Back to the new workspace returns without making one).
- Make a chat participant an agent… adopts one from the page, with the same warning as the command: its token is replaced.
- An agent elsewhere is made, moved or given a new token only in a terminal on this Mac — its token is shown once there or written to a file, never in a browser. The page shows the command to copy, e.g.
doz agent new far --program codex --isolation elsewhere --to-file ~/far.token. - Every change is made only in this Mac's own browser. Another computer (
doz ui --lan) sees the roster and each agent's page read only, with fingerprints only; anything it tries to change is refused and recorded.
Where it is kept#
The store's bots/bots.json holds each agent's record — never a token, its ceiling included — and bots/NAME/ its instructions and an empty notes.md. They are readable by you alone.
Exit codes: 2 not found · 4 already exists, or a retired name · 5 not confirmed (no terminal and no --yes) · 6 the daemon or the keychain is not available · 64 usage · 65 an invalid name or value.
See also#
- Continue an agent you already run —
doz agent new NAME --from claude:ID: a Claude Code conversation from your terminal, moved into Dozable as an agent - Chat
- Workspaces
- Tokens and identity
- Sessions on this Mac — fenced and unfenced
Edit this page on GitHub · Chapter 38 of 50