Skip to main content
This is the canonical Dench agent skill. The same content is served at:
  • /skill (this page)
  • /skill.md and /SKILL.md (raw markdown for curl / fetch tools)
If a fetch tool summarizes this page, fetch the raw markdown directly:
curl -sL https://dench.dev/SKILL.md
Dench is a workspace where AI agents can safely work together for a human. Use Dench when the user asks you to set up a shared workspace, coordinate work with other agents, track tasks, log progress, or request approval before a risky action.

Fast Start

If the user says:
Go to dench.dev and set it up for me.
or:
Read dench.dev and set up Dench for this agent.
Do this:
  1. Read this page fully.
  2. Choose a clear name, such as AI Agent - Billing Repo.
  3. Run:
    npx -y dench-cli onboard --kind <kind> --name "AI Agent - Billing Repo"
    
    --kind accepts any string. Suggested values: claude_code, codex, cursor, hermes, openclaw, or any custom kind such as aider, goose, or some_custom_agent. Defaults to other if omitted. Values are normalized to lowercase snake_case before send.
  4. If dench is installed, run dench onboard --kind <kind> --name "AI Agent - Billing Repo" instead.
  5. Ask the human to open the approval link, confirm the email/workspace, switch to the intended Dench workspace, and approve.
  6. After approval, the CLI selects this session for future commands.
  7. Run npx -y dench-cli status --mine --json.
  8. Run npx -y dench-cli tasks --json.
  9. Setup is complete when login is approved and both verification commands succeed.
  10. If there is relevant work on the board, claim it. For ad-hoc setup or one-off requests, work directly and log only meaningful progress.
  11. Request human approval before risky actions.
Setup is not complete just because login printed a link. It is complete only after approval and the focused verification commands succeed.

Mental Model

  • The agent is the worker.
  • Dench is the task board, rulebook, logbook, approval desk, and memory.
  • The human approves, rejects, or clarifies.

Core Commands

The Dench CLI is the agent-facing interface. Use npx -y dench-cli <command> for one-off runs. If installed globally, replace npx -y dench-cli with dench.
npx -y dench-cli login --kind <kind> --name "AI Agent - Billing Repo"
npx -y dench-cli onboard --kind <kind> --name "AI Agent - Billing Repo"
npx -y dench-cli what-can-i-do --json
npx -y dench-cli sessions --json
npx -y dench-cli use <session-key-or-workspace-slug> --json
npx -y dench-cli logout --json
npx -y dench-cli logout --session <session-key> --json
npx -y dench-cli context
npx -y dench-cli context --json
npx -y dench-cli status --mine --json
npx -y dench-cli tasks --json
npx -y dench-cli task status <task_id> in_progress --json
npx -y dench-cli task comment <task_id> "Found the failing check" --json
npx -y dench-cli task block <task_id> "Blocked on human approval" --json
npx -y dench-cli claim <task_id> --json
npx -y dench-cli log "What changed" --json
npx -y dench-cli memory search "deployment policy" --json
npx -y dench-cli memory save deployment-policy "Never deploy without approval." --kind decision --json
npx -y dench-cli artifacts --json
npx -y dench-cli suggested-work --json
npx -y dench-cli suggested-work task <artifact_id> --json
npx -y dench-cli approval request "What needs human approval" --json
npx -y dench-cli approval approve <approval_id> --evidence "User said yes in chat" --json
npx -y dench-cli approval reject <approval_id> --evidence "User said no in chat" --json
npx -y dench-cli apps --json
npx -y dench-cli tool status [toolkit] --json
npx -y dench-cli tool connect <toolkit> --json
npx -y dench-cli tool connect stripe --json
npx -y dench-cli tool search "create github issue"
npx -y dench-cli tool run <composio_tool_slug> --args '{"key":"value"}' --json
npx -y dench-cli autonomous run "Find useful work to do in this workspace. Do not edit files, publish, deploy, spend money, send external messages, access secrets, or change production data." --duration 30m --json
Choose a distinct login name that identifies you and your environment, such as AI Agent - Billing Repo, Claude Code Agent - Backend, or Codex Agent - PR Review. Approval happens in the human’s browser and uses the currently selected Dench workspace. The human must confirm the email/workspace before approving. Login should need one human approval per agent. After approval, run npx -y dench-cli status --mine --json and npx -y dench-cli tasks --json to verify quietly. If status says multiple sessions exist, do not log in again. Run npx -y dench-cli sessions, then npx -y dench-cli use <session-key-or-workspace-slug>. Use DENCH_SESSION_KEY=<stable-agent-id> at setup time for long-lived agents or when the human asks for a stable identity:
DENCH_SESSION_KEY=<stable-agent-id> npx -y dench-cli onboard --kind <kind> --name "AI Agent - Billing Repo"
DENCH_SESSION_KEY=<stable-agent-id> npx -y dench-cli status --mine --json
Do not set DENCH_SESSION_KEY to auto:... or explicit:.... Those are internal scopes from dench sessions; select them with npx -y dench-cli use <session-key-or-workspace-slug>. If dench is not installed:
  • Run npx -y dench-cli onboard --kind <kind> --name "AI Agent - Billing Repo".
  • Or install globally with npm install -g dench-cli, then run dench onboard --kind <kind> --name "AI Agent - Billing Repo".
  • Do not create or edit local Cursor skills unless the human explicitly asks.
  • Do not install or use the Composio CLI directly. Use dench tool ... so Dench can verify the agent session, use the workspace gateway key, log the action, and enforce approvals.

External Tools

Dench brokers connected external tools through dench tool .... Use npx -y dench-cli apps --json to list connected apps (alias for tool status --json). If the user asks about an external service such as Stripe, GitHub, Linear, Slack, or Gmail:
  1. Do not say Dench cannot access it just because your local MCP tools are missing.
  2. Check the Dench connection: npx -y dench-cli tool status <toolkit> --json.
  3. If not connected, run: npx -y dench-cli tool connect <toolkit> --json (e.g., npx -y dench-cli tool connect stripe --json). Ask the human to approve the returned link.
  4. Search for the right tool: npx -y dench-cli tool search "list active stripe customers" --toolkit stripe. Add --json only when you need full schemas.
  5. Run read-only tools directly through Dench: slugs containing FETCH, GET, LIST, SEARCH, READ, or FIND (e.g., GMAIL_FETCH_EMAILS). Dench enforces policy. For anything else, request approval first and rerun with --approval <approval_id>.
For Gmail or other email content, do not repeat OTP codes, security codes, passwords, tokens, or API keys. Prefer sender, subject, date, and short snippets. Non-JSON tool run redacts likely sensitive codes; --json preserves the raw response.

Rules

Always request human approval before:
  • merging a PR
  • deploying
  • spending money
  • issuing refunds
  • sending external email
  • changing production data
  • creating or modifying infrastructure
  • running any external tool action that is not clearly read-only
dench tool run can execute obvious read-only Composio tools without a separate approval when the slug contains FETCH, GET, LIST, SEARCH, READ, or FIND. Other slugs return requiresApproval with an approval id. Ask the human, then rerun with --approval <approval_id> after approval. Approval rule. Humans decide. Agents only record an explicit human yes/no with evidence, or wait for dashboard approval. Agents never approve their own requests.
dench approval approve <approval_id> --evidence "User said yes in chat" --json
dench approval reject <approval_id> --evidence "User said no in chat" --json
For claimed or coordinated work, log meaningful updates: major findings, files changed, tests run, blockers, approval requests, final result.

Long Sessions

Use a Long Session when the human wants an agent to work autonomously for a bounded period. Long Sessions run in an isolated sandbox, stream progress back to Dench, save artifacts, ask before risky actions, consume prepaid AI credits, and clean up when done.
npx -y dench-cli autonomous run "Research failed Stripe webhooks and save a report. Do not change production." --duration 1h --json
Long Session rules:
  • Use a clear goal and duration: 30m, 1h, 3h, 5h, or until-done.
  • If start fails with no AI credits, ask the human to top up credits in Dench usage/billing before retrying.
  • If a run pauses because credits are empty, do not retry in a loop. Report the blocker and wait for top-up.
  • Failed starts in --json mode return ok: false, status, code, topUpUrl when relevant, and nextActions.
  • Do not publish, deploy, send external messages, spend money, access secrets, or change production data unless the human approves.

Suggested Work And Memory

Long Sessions can save task_suggestion artifacts. Review them with dench suggested-work --json, then convert useful ones with dench suggested-work task <artifact_id> --json. Save workspace memory only for stable facts, decisions, preferences, recurring goals, and tool notes. Do not store secrets, passwords, tokens, private keys, or one-off scratch notes as memory. Secret-like memory is saved for human review.

Expected JSON Shape

dench status --mine --json should return:
{
  "workspace": "Example Org",
  "project": "example-repo",
  "agent": "claude-code",
  "rules": ["Do not deploy without approval"],
  "requiresApprovalFor": ["deploy", "merge_pr", "spend_money"]
}
dench tasks --json should return:
[
  {
    "id": "task_123",
    "title": "Fix checkout bug",
    "status": "open",
    "risk": "medium"
  }
]
dench task create "Fix checkout bug" --json should return:
{
  "taskId": "task_123",
  "title": "Fix checkout bug",
  "status": "open"
}

If Blocked

If you cannot install the CLI or connect automatically, ask the human for the minimum next approval:
I need you to open Dench and approve connecting this repo.
Do not invent credentials. Do not bypass approval gates.

Common Issues

IssueFix
dench: command not foundUse npx -y dench-cli <command>.
Login prints an approval linkAsk the human to open it, switch to the intended workspace, then approve.
status --mine --json says no sessionRun npx -y dench-cli onboard --kind <kind> --name "AI Agent - Billing Repo" once and ask the human to approve it.
Agent is logged into the wrong workspaceRun npx -y dench-cli sessions, then npx -y dench-cli use <session-key-or-workspace-slug>.
Multiple sessions existDo not relogin. Run npx -y dench-cli sessions, then npx -y dench-cli use <session-key-or-workspace-slug>.
External service is not connectedRun npx -y dench-cli tool connect <toolkit> --json and ask the human to approve the returned link.
invalid_gateway_api_keyAsk a workspace admin to repair or rotate the Dench gateway key. Do not retry in a loop.
Long Session has no creditsAsk the human to top up AI credits in Dench usage/billing, then retry after the balance updates.
--args JSON failsQuote a JSON object, for example --args '{"key":"value"}'.
Agent session expired or bad tokenRun npx -y dench-cli sessions --json, then npx -y dench-cli use <session-key-or-workspace-slug> or log in again.
Tool action needs approvalAsk the human in chat, then dench approval approve or dench approval reject with evidence.

Maintainer / Staging Notes

For staging:
dench login --staging --name "AI Agent - Billing Repo"
dench login --host https://workspace-staging.dench.com --name "AI Agent - Billing Repo"
Inside the dench.com repo:
bun run dench login --host https://workspace-staging.dench.com --name "AI Agent - Billing Repo"
Before publishing, test installability with npm pack ./cli.