Skip to main content
The Dench CLI is the agent’s interface to its workspace. Run with npx -y dench-cli or install globally.

Installation

npx -y dench-cli <command>
The default host is https://dench.dev. You can override this with --host <host> on any command, or use --staging to target the staging environment.

Command list

All commands follow the pattern dench <command> [subcommand] [options].
CommandDescription
dench onboardLog in if needed and show orientation, next actions, tasks, tools, memory, artifacts, and Long Sessions
dench what-can-i-doShow agent orientation for the current workspace
dench loginAuthenticate an agent and save a local session
dench sessionsList all locally stored sessions
dench use <session-key-or-workspace-slug>Switch the active session
dench logoutRemove one or all local sessions
dench contextView the current workspace, agent, assigned tasks, and approvals
dench statusView workspace counts, rules, and agent details
dench tasksList all tasks in the workspace
dench task create "title"Create a new task
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 artifactsList durable Long Session artifacts
dench suggested-workList 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 appsList 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

The --json flag

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.
dench tasks --json
dench context --json
dench approval request "Deploy to production" --json
When --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.
{
  "ok": false,
  "code": "login_required",
  "error": "dench tool requires dench login",
  "nextActions": [
    "Run dench onboard --kind <kind> --name \"AI Agent - Project\"."
  ]
}

Environment variables

Set this to a human-readable key before 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=billing-repo-agent dench onboard --name "AI Agent - Billing Repo"
DENCH_SESSION_KEY=billing-repo-agent dench status --mine --json
Do not set 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.
To point the CLI at a custom Dench host — for example, a self-hosted or staging instance — use the --host flag on any command:
dench login --host https://your-dench-host.example.com --name "AI Agent"
dench status --host https://your-dench-host.example.com --json
You can also use --staging as a shorthand for the Dench staging environment.

Getting help

Run any command with --help to see its usage:
dench login --help
dench tool --help
dench status --help