Integration Guide
Muse
Connect Muse to DashClaw and get your first governed action into /decisions in under 20 minutes.
Instance URL detected: https://your-dashclaw-instance.example.com
Deploy DashClaw
Get a running instance. Click the Vercel deploy button or run locally.
Already have an instance? Skip to Step 2.
Connect through the Muse connector: no key handling
Muse builds custom integrations from an MCP URL. Give it your instance’s hosted MCP endpoint and pick OAuth: Muse opens the DashClaw consent screen, you log in and authorize, and every decision lands in the ledger under agent id muse. An API key in Muse’s Secure Credentials Store works too. Done this way, skip Step 3.
Say to Muse
Build a custom integration to DashClaw. Its MCP server URL is https://your-dashclaw-instance.example.com/api/mcp Use OAuth.
The hosted instance (hosted.dashclaw.io) is submitted to the Muse connector directory; once listed it is one tap in Muse, no URL to paste.
Store the credential where the agent can reach it — securely
The agent needs your instance URL, an API key, and an agent id (e.g. muse-main). The key belongs in the agent runtime’s secure credential store or an env file the agent reads — never in chat, never in a file it might quote back.
Terminal
# One-time setup: hand the agent these three values through your # runtime's secure channel (not chat). DASHCLAW_BASE_URL=https://your-dashclaw-instance.example.com DASHCLAW_API_KEY=oc_live_... DASHCLAW_AGENT_ID=muse-main
If the key is ever rejected, check that the request actually carried the credential before assuming the key is wrong.
Install the muse-governance skill
The skill teaches the agent the protocol: session init, the guard/record/wait/act/outcome loop, how to read allow/warn/block/require_approval, plan-first execution, and honest risk and confidence reporting.
Terminal
git clone https://github.com/ucsandman/DashClaw.git # Give your Muse agent this directory as a skill: # DashClaw/plugins/dashclaw/skills/muse-governance/
The skill also ships as muse-governance in the dashclaw-skills repo for npx skills add.
Run the governance loop: guard, record, wait, act, outcome
Every risky act goes through the loop. Guard first ("may I?"), record ("I am doing this"), wait only when the verdict is require_approval, act with your own tools, then record the outcome. A block is absolute — never route around it.
governed-deploy.ts
import { DashClaw } from 'dashclaw';
const claw = new DashClaw({
baseUrl: process.env.DASHCLAW_BASE_URL,
apiKey: process.env.DASHCLAW_API_KEY,
agentId: 'muse-main',
});
// 1. Guard — "may I?"
const decision = await claw.guard({
action_type: 'deploy',
declared_goal: 'Deploy v2.3.1 to staging after all tests passed',
systems_touched: ['staging'],
reversible: false,
confidence: 80, // your honest pre-act odds of completing without human help
});
if (decision.decision === 'block') throw new Error('blocked: ' + decision.reason);
if (decision.decision === 'require_approval') {
// 2-3. Record, then wait for the human in /approvals
const action = await claw.recordAction({
action_type: 'deploy',
declared_goal: 'Deploy v2.3.1 to staging after all tests passed',
});
await claw.waitForApproval(action.action_id); // resolves on approve, throws on deny/expiry
}
// 4. Act — run the real effect with your own tools.
await deployToStaging('v2.3.1');
// 5. Outcome — completed, partial, or failed. One-shot: the first call wins.
await claw.recordOutcome(action.action_id, { status: 'completed' });Confidence is scored against the real outcome on /decisions, so overconfidence shows up as a number. Never lowball risk to dodge a guard.
Use plan-first execution for long runs
Per-action approvals do not scale to unattended runs. Submit the whole task list as a plan; the operator reviews one card, and each approved step becomes a single-use, act-bound grant. Attest at every run start and every resume — authority is re-verified, never cached.
Terminal
# One approval for a whole run, instead of one per action.
curl -s -X POST "https://your-dashclaw-instance.example.com/api/plans" \
-H "Authorization: Bearer $DASHCLAW_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"declared_goal": "Nightly deploy run for the API service",
"ttl_minutes": 180,
"steps": [
{"action_type": "shell", "step_goal": "Run the test suite on build 402"},
{"action_type": "deploy", "step_goal": "Deploy build 402 to staging",
"act": {"target": "staging", "build": "402"}}
]
}'
# The operator approves ONE card in /approvals. Then, at run start:
curl -s -X POST "https://your-dashclaw-instance.example.com/api/plans/<plan_id>/attest" \
-H "Authorization: Bearer $DASHCLAW_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"plan_hash": "<plan_hash from the submit response>"}'
# Any refusal (not_approved, expired, revoked, hash_mismatch) means STOP.A step that departs from the plan is recorded as a plan deviation. Declare deviation_note honestly instead of stretching a step to cover new work.
See the result in DashClaw
Open your DashClaw dashboard to confirm the action was recorded.
Go to /decisions: you should see your action in the ledger with your agent id, action type, and status 'completed'. Held work appears in /approvals for one-click review.
Know the enforcement boundary
The Muse runtime has no pre-tool-call hook yet, so this integration is cooperative: the agent consults the guard and honors the verdict. It stops the accident class and makes bypass visible in the ledger; it is not a lock against a determined process at the same privilege. Adherence probing — synthetic held actions the agent must leave pending — is how an operator verifies cooperation.
A durable fix is a runtime hook modeled on the existing hook contract. Until it exists, this cooperative loop plus probing is the supported path.
What success looks like
Go to /decisions: you should see your guard check in the ledger with your agent id and decision 'allow'. Held work appears in /approvals.
Navigate to /decisions in your DashClaw instance. Your action should appear in the ledger within seconds of the agent run.
Governance as Code
guardrails.yml is a policy-as-code template. Import it into your instance — POST the YAML to /api/policies/import or call the Python SDK's import_policies — and DashClaw evaluates these rules at the guard step before any action executes.
guardrails.yml
version: 1
project: my-muse-agent
description: >
Governance policy for a Muse agent with shell and browser access.
Production writes need approval. Destructive shell is blocked.
policies:
- id: block_destructive_shell
description: Block rm -rf and database drops
applies_to:
tools:
- Bash
- shell
rule:
block: true
when:
command_contains:
- "rm -rf"
- "drop table"
- id: approve_production_writes
description: Production changes require human approval
applies_to:
action_types:
- deploy
- external_api_write
rule:
require: approval
when:
systems_touched:
- production