/skill(this page)/skill.mdand/SKILL.md(raw markdown forcurl/ fetch tools)
Fast Start
If the user says:- Read this page fully.
- Choose a clear name, such as
AI Agent - Billing Repo. - Run:
--kindaccepts any string. Suggested values:claude_code,codex,cursor,hermes,openclaw, or any custom kind such asaider,goose, orsome_custom_agent. Defaults tootherif omitted. Values are normalized to lowercase snake_case before send. - If
denchis installed, rundench onboard --kind <kind> --name "AI Agent - Billing Repo"instead. - Ask the human to open the approval link, confirm the email/workspace, switch to the intended Dench workspace, and approve.
- After approval, the CLI selects this session for future commands.
- Run
npx -y dench-cli status --mine --json. - Run
npx -y dench-cli tasks --json. - Setup is complete when login is approved and both verification commands succeed.
- 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.
- Request human approval before risky actions.
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. Usenpx -y dench-cli <command> for one-off runs. If installed globally, replace npx -y dench-cli with dench.
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 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 rundench 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 throughdench 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:
- Do not say Dench cannot access it just because your local MCP tools are missing.
- Check the Dench connection:
npx -y dench-cli tool status <toolkit> --json. - 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. - Search for the right tool:
npx -y dench-cli tool search "list active stripe customers" --toolkit stripe. Add--jsononly when you need full schemas. - Run read-only tools directly through Dench: slugs containing
FETCH,GET,LIST,SEARCH,READ, orFIND(e.g.,GMAIL_FETCH_EMAILS). Dench enforces policy. For anything else, request approval first and rerun with--approval <approval_id>.
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.
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.- Use a clear goal and duration:
30m,1h,3h,5h, oruntil-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
--jsonmode returnok: false,status,code,topUpUrlwhen relevant, andnextActions. - 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 savetask_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:
dench tasks --json should return:
dench task create "Fix checkout bug" --json should return:
If Blocked
If you cannot install the CLI or connect automatically, ask the human for the minimum next approval:Common Issues
| Issue | Fix |
|---|---|
dench: command not found | Use npx -y dench-cli <command>. |
| Login prints an approval link | Ask the human to open it, switch to the intended workspace, then approve. |
status --mine --json says no session | Run 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 workspace | Run npx -y dench-cli sessions, then npx -y dench-cli use <session-key-or-workspace-slug>. |
| Multiple sessions exist | Do not relogin. Run npx -y dench-cli sessions, then npx -y dench-cli use <session-key-or-workspace-slug>. |
| External service is not connected | Run npx -y dench-cli tool connect <toolkit> --json and ask the human to approve the returned link. |
invalid_gateway_api_key | Ask a workspace admin to repair or rotate the Dench gateway key. Do not retry in a loop. |
| Long Session has no credits | Ask the human to top up AI credits in Dench usage/billing, then retry after the balance updates. |
--args JSON fails | Quote a JSON object, for example --args '{"key":"value"}'. |
| Agent session expired or bad token | Run npx -y dench-cli sessions --json, then npx -y dench-cli use <session-key-or-workspace-slug> or log in again. |
| Tool action needs approval | Ask the human in chat, then dench approval approve or dench approval reject with evidence. |
Maintainer / Staging Notes
For staging:dench.com repo:
npm pack ./cli.