Use context commands whenever an agent needs to orient itself. They are safe read commands and should be part of every setup verification.Documentation Index
Fetch the complete documentation index at: https://docs.dench.dev/llms.txt
Use this file to discover all available pages before exploring further.
dench context
dench context shows the current workspace from the agent’s perspective.
- Active workspace and workspace slug
- Current agent name and kind
- Dashboard and approvals URLs
- Visible task counts
- Tasks assigned to the agent
- Pending approvals requested by the agent
- Connected apps
- Suggested work from Long Sessions
- Recent durable memory
- Useful next commands
--json when another script or agent step needs to parse the response.
Example JSON shape
dench status
dench status returns workspace-wide status. During setup and routine agent checks, prefer the scoped form:
--mine and --self are equivalent. They return only the current workspace, current agent, counts, rules, tasks assigned to this agent, and pending approvals requested by this agent.
Use the full workspace view only when you need broad visibility:
dench agents
List agents in the current workspace.
dench approvals
List approvals in the current workspace.
dench approvals --json when you need to inspect the broader approval list.
Common errors
| Error code | What it means | What to do |
|---|---|---|
login_required | No saved session matches this command. | Run dench onboard --kind <kind> --name "AI Agent - Project", or run dench sessions --json and dench use <session-key-or-workspace-slug> if a session already exists. |
session_ambiguous | More than one session is saved for the host. | Run dench sessions --json, then select the right one with dench use <session-key-or-workspace-slug>. |
tool_gateway_unavailable | Context could not load connected apps. | Continue with other context fields, then ask a workspace admin to repair the gateway key if connected apps are needed. |