DashClaw is a policy firewall for AI agents. This guide will get you from zero to your first governed agent action in under 8 minutes.
The absolute fastest way to see DashClaw in action with zero configuration:
npx dashclaw-demoWhat happens?
- A local DashClaw demo runtime starts automatically.
- An example agent attempts a high-risk deployment action.
- DashClaw intercepts and blocks it.
- Your browser will open directly to the Decision Replay.
- Clone the repo:
git clone https://github.com/ucsandman/DashClaw.git cd DashClaw - Run the setup:
npm install npm run setup
npm run setupis interactive. It provisions a local DB if you don't already have one, generatesNEXTAUTH_SECRETandENCRYPTION_KEY, mints a workspace API key into.env.local, and applies migrations. - Start the server:
npm run dev
-
Fork this repository, or use the one-click deploy button in
README.md. -
Connect a Neon Postgres database when Vercel prompts for the integration.
-
Set the required env vars in the Vercel dashboard. See
.env.examplefor the full annotated list. The required set is:DATABASE_URL(auto-populated when you add Neon)DASHCLAW_API_KEY(anyoc_live_...string you generate; will be wired toorg_default)ENCRYPTION_KEY(32 random chars:openssl rand -hex 16)NEXTAUTH_SECRET(32 random chars:openssl rand -base64 32)NEXTAUTH_URL(your deployed URL, e.g.https://my-dashclaw.vercel.app)CRON_SECRET(any 64 random hex chars:openssl rand -hex 32)DASHCLAW_LOCAL_ADMIN_PASSWORD(so you can sign in without configuring OAuth first)
The schema migration runs as part of the build (
scripts/auto-migrate.mjs), so there is no manual migration step.
Open http://localhost:3000/setup. This page verifies your database connection and environment variables. Once you see all green checks, you are ready to govern agents.
Run the canonical starter to record a real governed action.
- Enter the example directory:
cd examples/openai-governed-agent - Install and configure:
Edit
npm install cp .env.example .env
.envand setDASHCLAW_API_KEYto the key from your instance (found in.env.localafternpm run setup, or generate a new one at/api-keys).OPENAI_API_KEYis optional; the agent falls back to a simulated deployment response when it is unset. - Run it:
node index.js
Result: The agent runs the full 4-step governance loop (guard → createAction → recordAssumption → updateOutcome). Open Mission Control and watch the Operations Feed light up with the new action, then click through to the Decision Replay to inspect the recorded evidence.
See the approval gate fire: A fresh instance has no policies, so
guardreturnsallowby default. To see DashClaw pause a risky action for human review, runnode scripts/seed-demo-capabilities.mjsfrom the repo root first. The seededrequire_approvalpolicy will hold the agent at the deploy step until you approve it at/approvals.
Open http://localhost:3000/connect. This page provides the Golden Path for connecting any real agent (OpenAI, LangChain, CrewAI) using the v2 SDK.
- Guard →
claw.guard()checks intent against policy. Abort onblock. - Record →
claw.createAction()logs the start of the action. The server may gate it here withaction.status === 'pending_approval'. - Wait (optional) → If the action is
pending_approval, callclaw.waitForApproval(action_id)using theaction_idfrom step 2, not the one from step 1. This is where the mobile PWA queue, the CLI approval channel, and the dashboard approvals feed unblock your agent. - Verify →
claw.recordAssumption()tracks reasoning basis. - Outcome →
claw.updateOutcome()records the final evidence.
Full canonical HITL flow (including the action_id pitfall to avoid) is
documented in sdk/README.md → Human-in-the-Loop (HITL) Approval Flow.
Retry-safe outcomes (v2.13.3+): For long-running or retried actions, prefer
claw.reportActionOutcome(action_id, { status: 'completed', summary })overclaw.updateOutcome(). The new/api/actions/:id/outcomeendpoint is one-shot (409 on double-terminate), recordspending/completed/partial/failed/lost_confirmation, and is the surface to poll withgetActionOutcome()before a retry to avoid double-execution. Full spec:docs/architecture/durable-execution-finality.md.
- Node SDK Reference:
sdk/README.md - Python SDK Reference:
sdk-python/README.md - Minimal Runtime API:
docs/architecture/runtime-api.md - API Inventory:
docs/api-inventory.md - Durable Execution Finality:
docs/architecture/durable-execution-finality.md
DashClaw is infrastructure, not a platform. To prevent "platform creep," we enforce a strict Governance Boundary in CI. All new API routes must live in app/api/_archive/ unless they are core governance primitives.