Command line
Every assent command, option, setting and exit code, for agents and shell scripts that talk to Assent.
The assent command is how agents and scripts talk to Assent from a shell: ask and wait for the answer, record runs, write notes and to-dos, take shared locks, check standing rules and hand work to other agents. It needs Node.js 20 or later.
On its way to npm
Configure
Create an agent in Assent and copy its agent key (see Connect an agent). Then either set it in the environment:
export ASSENT_AGENT_KEY=oak_...or write it to ~/.assent/config.json, readable only by you:
{ "agentKey": "oak_..." }Requests go to the hosted Assent service unless you set ASSENT_API_URL.
| Setting | What it does |
|---|---|
ASSENT_AGENT_KEY | The agent key. Wins over agentKey in the config file. |
ASSENT_API_URL | Optional. Set it only to point at another Assent server. Wins over apiUrl in the config file. |
ASSENT_CONFIG | Path of the config file to read instead of ~/.assent/config.json, for example one file per agent. |
ASSENT_TIMEOUT_MS | Request timeout in milliseconds. Default 10000. |
ASSENT_RUN_UUID | The run that ask, task add, note and handoff link their new item to when --run is not given. |
ASSENT_HOOK_TIMEOUT_MS | Timeout for assent hook pre-tool-use. Default 3000. |
Output
Every command prints one line of JSON. --get <field> prints just that field, which suits shell scripts:
RUN=$(assent run start --summary "job scan" --get uuid)assent help prints every command and option, and assent --version prints the version.
Dates and times
--due, --remind and --retry-at take a date and time:
2026-10-15T17:00or2026-10-15 17:00, in this computer's time zone.2026-10-15T17:00:00+01:00, with an offset.2026-10-15, a bare date, which means 09:00 that day in your Assent time zone and prints a warning on stderr.
Commands
Who am I
assent whoamiShows the agent this key belongs to.
Runs
assent run start [--summary s] [--max-minutes n]
assent run progress <run-uuid> --done n --total m [--label l]
assent run finish <run-uuid> (--exit-code n | --status ok|fail|deferred) [--summary s] [--log-file path] [--log-tail-bytes n]
[--task task-uuid] [--result-json path|-] [--done n] [--skipped n] [--needs-you n] [--failed n]
[--retry-at when]
[--issue-reason needs_action|recovery_exhausted|deadline_at_risk --impact text --action-needed text]
assent run defer <run-uuid> --retry-at whenrun progressshows progress on the phone as a Live Activity.run finishrecords how the run ended. With--task, the counts come from that task's item results.--retry-atis only allowed with--status deferred.--issue-reason,--impactand--action-neededgo together and raise an action for you. They are not allowed withok, and each text is at most 500 characters.run defershows the run as deferred until that time, for example after a usage limit.
Asks
assent ask --title t [--kind approve|todo|pay|login|code|reply] [--detail d] [--url u] [--draft text | --draft-file path|-]
[--action id:label[:primary|secondary|danger]]... [--item id:title[:unselected]]...
[--item-json path|-] [--recommend item-id]... [--reason item-id:text]... [--badge item-id:label[:tone]]...
[--link item-id:label:url]... [--why text] [--field key:label[:type]:value]...
[--attach item-id:path]...
[--group key:title] [--conflict-on field-key]... [--total-of field-key] [--decline-action action-id]
[--rule-action name] [--target t]
[--due when] [--remind when] [--dedupe key] [--wait [--timeout seconds] [--interval seconds] [--no-pickup]]
[--question text] [--answer-type yes_no|choice|text|number|done] [--effort minutes] [--series key]
[--idempotency-key uuid] [--allow-duplicate]
assent attach <path> [--name n]
assent answers
assent picked-up <task-uuid>askasks you. The kind defaults toapprove. Asks covers every kind and option.attachuploads a file (pdf, png, jpeg, gif, webp, txt or md, at most 10 MB) and prints its uuid, once you turn attachments on for this agent.answerslists your answered asks that are not picked up yet.picked-upmarks an answer as acted on, so it is never delivered again.
To-dos
assent task add --title t --why text [--detail d] [--url u] [--due when] [--remind when] [--dedupe key]
[--project project-uuid [--track name]] [--effort minutes] [--series key] [--idempotency-key uuid] [--allow-duplicate]
assent task resolve <task-uuid> [--withdraw] [--note text]
assent task update <task-uuid> [--due when|none] [--remind when|none]
assent task get <task-uuid>
assent task item-result <task-uuid> <item-id> done|skipped|needs_you|failed [--reason r] [--url u]
assent task item-status <task-uuid> <item-id>task addadds a to-do for you.task resolvecloses your own ask once the work is done, or withdraws it with--withdraw. Its reminders stop.task updatechanges the due or reminder time of a task this agent created.noneclears it.task item-resultreports each item as it finishes. The--urlmust start withhttp://orhttps://.task item-statusprintsgo,held,withdrawn,not_selectedor the recorded outcome for an item.
Notes, links and memory
assent note --title t (--content text | --content-file path | --content-file -) [--tag t]... [--run run-uuid]
assent note update <note-uuid> [--title t] [--content text | --content-file path | --content-file -] [--tag t]...
assent link --from type:uuid --to type:uuid [--relation produced|about|blocks|related]
assent memory getnotewrites a note you see under the agent's name.--content-file -reads stdin.linklinks two items. The types arenote,task,runandagent, and the relation defaults torelated.memory getreads the pinned memory notes you shared with this agent.
Locks
assent lock acquire <resource> [--ttl minutes] [--wait seconds] [--interval seconds]
assent lock release <resource> [--token t]A shared lock, for example deploy:web, keeps two agents off the same resource. The lock lasts --ttl minutes (default 30). --wait keeps trying for that many seconds, every --interval seconds (default 15). If the lock is still held, the command exits with 3. lock release uses the token saved when the lock was taken, or --token.
assent lock acquire deploy:web --ttl 45 --wait 90 && deploy; assent lock release deploy:webHand-offs
assent handoff (--to <agent name> | --to-uuid <agent uuid>) --title t [--detail d] [--run run-uuid]
assent handoffs
assent handoffs done <task-uuid>Hand work to another of your agents, list the open hand-offs other agents gave this one, and mark one as done.
Projects and plans
assent project get <project-uuid>
assent project overview <project-uuid>
assent plan create --file path|- [--idempotency-key uuid]
assent plan get <plan-uuid>
assent plan sessions <plan-uuid> --file path|-project getandproject overviewread a project you linked this agent to: progress, tracks, milestones, this week and overdue.plan createtakes JSON{ title, summary?, tracks: [{key,title}], sessions: [{key,trackKey,title,dueAt,detail?,sessionMinutes?,habitKey?,url?}] }, with at most 1000 sessions.plan sessionstakes JSON{ sessions: [{key, dueAt?, title?, detail?, status?: open|done|cancelled}] }, with at most 500 sessions.
Rules and the Claude Code hook
assent rules check --action name [--target t] [--summary s]
assent rules list
assent rules add --deny --action pattern [--target pattern] [--reason r] [--expires 1d|7d|30d|none]
assent rules remove <rule-uuid>
assent hook pre-tool-userules check exits 0 for allow, 10 for deny and 11 for ask. Agents can only add deny rules for themselves. Rules explains how rules match and how to set up the hook.
Exit codes
| Code | Meaning |
|---|---|
| 0 | OK |
| 1 | Error |
| 2 | Usage error |
| 3 | Conflict: lock held, already answered or expired |
| 4 | Not found |
| 5 | Not configured or unauthorised |
| 6 | --wait timed out |
| 10 | rules check found a deny rule |
| 11 | rules check found no rule: ask the person |
| 69 | Assent unreachable: network failure, timeout, rate limit or a 5xx |
Scripts should treat any exit code other than 0, 3 for locks, and 10 or 11 from rules check as "Assent unavailable, carry on as before".
Privacy
run finish redacts emails, tokens, keys, phone numbers and home paths from the summary and log tail before sending. note and note update redact the title and content the same way, and ask and task add redact the title and detail. A --url link and a reply draft are sent as given. Never pass passwords, card or bank details to any command: pay and login asks carry only a link.