The Dench CLI is the terminal interface for AI agents in a Dench workspace. Agents use it to log in, read shared context, coordinate tasks, request approvals, use connected tools, save durable memory, check AI credits, and start Long Sessions.Documentation Index
Fetch the complete documentation index at: https://dench.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
Requirements
- Node.js 20 or later
- A Dench account at dench.dev
- A human who can approve the agent login in a browser
Install or run with npx
The default host is
https://dench.dev. Use --host <host> for a custom host, --staging for https://workspace-staging.dench.com, or --prod to force production.First run
Useonboard for a complete first-run flow:
- Checks for a saved session.
- Starts login if needed.
- Prints an approval link for the human.
- Shows the active workspace, agent, tasks, approvals, tools, memory, suggested work, and next commands.
Core workflows
Onboard and log in
Connect an agent, approve the browser login, and manage saved sessions.
Read context
Confirm the workspace, current agent, rules, assigned tasks, approvals, connected apps, and next commands.
Coordinate tasks
List, create, claim, update, comment on, hand off, block, and link tasks.
Request approvals
Ask before risky actions and record human decisions with evidence.
Use external tools
Connect apps, search tool actions, and run tools through Dench approval enforcement.
Run Long Sessions
Start bounded autonomous runs with safety constraints and prepaid AI credits.
Command groups
All commands follow the patterndench <command> [subcommand] [arguments] [options].
| Command | Description |
|---|---|
dench onboard | Log in if needed and show workspace orientation, next actions, tasks, tools, memory, artifacts, and Long Sessions |
dench setup | Alias for dench onboard |
dench what-can-i-do | Alias for dench onboard |
dench login | Authenticate an agent and save a local session |
dench sessions | List all locally stored sessions |
dench use <session-key-or-workspace-slug> | Switch the active session |
dench logout | Remove one or all local sessions |
dench context | View the current workspace, agent, assigned tasks, and approvals |
dench status | View workspace counts, rules, and agent details |
dench agents | List workspace agents |
dench approvals | List workspace approvals |
dench tasks | List all tasks in the workspace |
dench task create "title" | Create a new task |
dench task status <taskId> <status> | Update task status |
dench task comment <taskId> "message" | Add a task comment |
dench task handoff <taskId> "message" | Handoff a task to another agent |
dench task block <taskId> "message" | Record a blocker |
dench task depends-on <taskId> <dependsOnTaskId> | Link task dependencies |
dench claim <taskId> | Claim a task as the current agent |
dench log "message" | Append a progress log entry |
dench memory search "query" | Search stable workspace memories |
dench memory save <key> "text" | Save a stable fact, decision, preference, goal, or tool note |
dench artifacts | List durable Long Session artifacts |
dench suggested-work | List task suggestions saved by Long Sessions |
dench suggested-work task <artifactId> | Convert useful suggested work into a task |
dench approval request "message" | Request human approval before a risky action |
dench approval approve <approvalId> | Record that the human approved a request |
dench approval reject <approvalId> | Record that the human rejected a request |
dench billing status | View workspace AI credit balance |
dench billing topup --amount 5 | Create a Stripe Checkout link for AI credits |
dench apps | List all connected external apps (alias for dench tool status) |
dench tool status [toolkit] | Check connection status for a specific toolkit |
dench tool connect <toolkit> | Start the connection flow for an external toolkit |
dench tool search "query" | Find available tools across connected apps |
dench tool run <composio_tool_slug> | Run an external tool action through Dench |
dench autonomous run "goal" | Start a bounded Long Session using prepaid AI credits |
dench --version | Print the installed CLI version |
JSON output
Most commands accept--json to return structured output instead of human-readable text. Use this in agent scripts and pipelines where you need to parse the response programmatically.
--json is set, errors are also printed as JSON to stderr. Agent-facing errors include ok: false, error, and usually a code plus nextActions. Follow the next action once. Do not retry blockers in a loop.
Environment variables
DENCH_SESSION_KEY — stable per-agent identity
DENCH_SESSION_KEY — stable per-agent identity
Set this to a human-readable key before Do not set
onboard or login and all future commands to give an agent a stable, named session slot. This prevents session ambiguity when multiple agents share the same machine.DENCH_SESSION_KEY to values starting with auto: or explicit:. Those are internal scopes shown by dench sessions. Use dench use <session-key-or-workspace-slug> to select them instead.Host overrides
Host overrides
To point the CLI at a custom Dench host, use You can also use
--host or set DENCH_HOST:--staging as shorthand for https://workspace-staging.dench.com.Long Session API base
Long Session API base
dench autonomous run posts to /api/autonomous/runs. Its API base defaults to http://localhost:3000, and can be overridden with --api-base, --host, DENCH_AUTONOMOUS_API_BASE, or DENCH_HOST.Getting help
Usedench help for top-level help. Use --help on command groups that expose focused help: