Methods by role

Every method a program's token can call, grouped by the smallest role that allows it, with its params and an example.

Every method a token can call, from workspace API version 0.30. A role allows its own methods and those of every role above it on this page.

Paste this into your coding agent to turn the methods on this page into a script that tells you when an agent waits on you.

Show the prompt
Using the methods on this page, write a script that watches my Hivemind workspace and tells me when an agent waits on me.

1. Ask me which workspace folder to watch. The script needs only the `view` role. Check Hivemind runs with the folder open: `hive ctl agents` must not exit 3.
2. Make a token: `hive grant create waiting-watcher -w <folder> --role view --expires 30d --json`. Keep the token out of this chat and out of git: put `HIVE_DRIVE_TOKEN`, `HIVE_DRIVE_SOCK` (the `socket` field) and `HIVE_WORKSPACE` in a git-ignored `.env`.
3. Connect and say hello as the Protocol page shows. Call `agent.list` with `["<folder>"]` and print each agent with its state and what it waits on.
4. Listen for `agent.event` events. When one has kind `waiting`, call `agent.output` with `["<tile>", 20]` and print those lines.
5. Use only methods this page lists under view; any other is refused with `FORBIDDEN`.
6. Run it, start an agent in the app that asks a question, and show me the script's output.

At the end, tell me how to stop the script and how to revoke the token: `hive grant revoke <id>`, the id from `hive grant list`.

REFERENCE https://hivemind.griiken.com/guide/api-methods.md

repo is the workspace's folder. tile is a tile's id from agent.list or agent.start. Each call is sent as {"id": 1, "method": "…", "params": [...]} (Protocol). The example column shows params.

view

Agents

MethodParamsReturnsExample params
agent.listrepo{seq, agents}: every agent now, its state and what it waits on["/home/you/work/api"]
agent.sincerepo, seqthe changes and events after seq, or null: list again["/home/you/work/api", 41]
agent.readtile, timeoutMs?its reply when it finishes: {text, finalStatus, truncated}["t-3f2a", 600000]
agent.outputtile, lines?the last lines it printed (40 by default), as plain text["t-3f2a", 20]
agent.difftile{files, patch, truncated}: what it changed since its last commit["t-3f2a"]
agent.sessionsplace, program, limit?past sessions of that agent in a folder, to resume["/home/you/work/api", "claude", 10]
agent.startablerepothe agents that can start, their models and modes, and the frames["/home/you/work/api"]
agent.conversationtile, cursor?what the agent and you said, from its session file["t-3f2a"]
agent.tooltile, useone tool use from that conversation, in full["t-3f2a", "toolu_01"]
status.allevery agent's status[]
link.listwhich agent pipes into which, and which started which[]

Files, git and issues

MethodParamsReturnsExample params
git.statusrepobranch, ahead and behind, changed files["/home/you/work/api"]
git.diffrepo, scope, file?{patch}["/home/you/work/api", {"kind": "working"}]
git.listFilesrepotracked and untracked files["/home/you/work/api"]
git.listBranchesrepo{current, local, remote}["/home/you/work/api"]
git.fileContentsrepo, file, reva file at HEAD, INDEX or WORKING["/home/you/work/api", "README.md", "HEAD"]
worktree.listrepothe repository's worktrees["/home/you/work/api"]
file.readrepo, filea file's text, inside the workspace["/home/you/work/api", "package.json"]
issue.listrootissues; root is the workspace's .hivemind folder["/home/you/work/api/.hivemind"]
issue.readroot, idone issue, with its sections["/home/you/work/api/.hivemind", "API-4"]
review.listrepocomments left on diffs["/home/you/work/api"]

Canvas, widgets, terminals and views

MethodReturns or doesExample params
store.open, store.core, store.view, store.objects, store.objectsWithIdsthe canvas layout and objects["/home/you/work/api"]
widget.all, widget.packages, widget.assetwhat widgets draw, which are installed, their images["/home/you/work/api"]
terminal.open with attachOnlywatch a running terminal; output comes as terminal.data[{"tileId": "t-3f2a", "attachOnly": true, "cols": 120, "rows": 40}]
terminal.show, terminal.history, terminal.flow, terminal.ack, terminal.detach, terminal.watchActivityfollow terminals; these get no answer["t-3f2a", true]
tile.watchLinesthe last line each named terminal shows, such as 214 tests passed, or for an agent that keeps a conversation what it last said (from 0.35); it replaces the terminals you watched, [] stops, and changes come as tile.lines. From 0.34[["t-3f2a", "t-9b1c"]]
tile.readLinesthe same lines once, without watching. From 0.35[["t-3f2a"]]
terminal.savedwhat a sleeping agent last showed["t-3f2a"]
presence.setwhere your pointer is, for others in the workspace["/home/you/work/api", null]
appearance.getthe app's theme; a colour of the person's own for the accent comes as accentCustom ({ brand, accent, working? }, from 0.35), which wins over accent while set[]
view.list, view.file, view.open, view.post, view.screen, view.closeopen an installed view that is ready for phones[]

edit

MethodParamsDoesExample params
widget.pressrepo, id, {action} or {click: true}press a widget's button or card["/home/you/work/api", "w-1", {"click": true}]
tool.openrepo, {tool, frame?, url?}place a tool's tile; returns {tile}["/home/you/work/api", {"tool": "@dip497/worktrees"}]
git.handOffrepo, branch, bundlehand over a branch of your own; it lands as handoff/<name>/<branch>["/home/you/work/api", "fix", "<base64 bundle>"]

terminals

MethodParamsDoesExample params
terminal.writetile, datatype into a terminal, while you hold its keyboard["t-3f2a", "ls\r"]
terminal.resize, terminal.fittile, cols, rowssize it["t-3f2a", 120, 40]
terminal.keyboard.ask, terminal.keyboard.givetile, …ask for its keyboard, or hand it on["t-3f2a"]

agents

MethodParamsDoesExample params
agent.startrepo, {program, frame?, prompt?, model?, mode?, name?, resume?, supervise?, report?}start an agent; returns {tile}. With supervise, its permission questions come to you.["/home/you/work/api", {"program": "claude", "prompt": "Run the tests"}]
agent.sendtile, texta message, typed in as its next prompt["t-3f2a", "Now fix the failing test"]
agent.answertile, since, {text}, {decision, feedback?, always?} or {answers}answer what it waits on: a question, a permission, a plan. since is the waiting.since that agent.list shows; decision is allow or deny.["t-3f2a", 1760000000000, {"decision": "allow"}]
agent.interrupttilestop its current reply["t-3f2a"]
agent.keystile, keystype keys: Enter, Escape, Up, C-c, …["t-3f2a", ["Down", "Enter"]]
agent.renametile, namerename it; empty goes back to its own name["t-3f2a", "tests"]
agent.sleep, agent.wakerepo, target?, force?put to sleep or wake a tile, a frame, or every agent["/home/you/work/api", "t-3f2a"]
agent.closetileend it and take its tile off the canvas["t-3f2a"]
agent.places, agent.foldersrepo, folder?where in the workspace an agent may start["/home/you/work/api"]
frame.openrepo, {path} or {worktree: {branch, base?}}a frame on a folder, or on a new worktree["/home/you/work/api", {"worktree": {"branch": "fix-login"}}]
frame.closerepo, frame, {closeTiles?, removeWorktree?, force?}?close a frame["/home/you/work/api", "f-2", {"closeTiles": true}]
terminal.open, terminal.closestart or end a terminal
link.connect, link.disconnectsrc, dst?pipe one agent's replies into another as prompts["t-3f2a", "t-9c1b"]

No role

No token can call the methods that commit, push, pull, stage or discard; write files; create or change issues and review comments; create or remove worktrees; let people in or change their roles; or make or revoke tokens.

That does not keep a program away from your files. With terminals it types into a shell, and with agents it starts agents. Either can run any command there.

Full parameters and results are in spec/workspace-api.md.

Last validated for Hivemind 2026.10.3.

Edit on GitHub

On this page