Skip to content
Tutorial

AI Agent Governance Platform Setup: Zero to Governed with CordClaw

Install, verify, and harden deterministic pre-dispatch governance for OpenClaw with real commands and real failure modes.

Tutorial11 min readApr 2026
TL;DR
  • -Most guardrail guides explain what to validate, but skip how to wire deterministic pre-dispatch enforcement into a real agent runtime.
  • -CordClaw gives a concrete plugin + daemon path: OpenClaw `before_tool_execution` -> localhost daemon -> Safety Kernel policy decision.
  • -You can test decisions immediately with `/simulate` and `openclaw cordclaw simulate` before letting the agent touch real systems.
  • -Profiles (`strict`, `moderate`, `permissive`) let you start tight and relax intentionally instead of discovering risky defaults in production.
AI agent governance platform setup flow for CordClaw and OpenClaw
Scope

This tutorial targets OpenClaw + CordClaw deployment and validation. It focuses on deterministic pre-dispatch checks, profile tuning, and outage behavior. It does not cover every pack authoring detail.

The production problem

Teams often attempt an AI agent governance platform setup by adding text filters near prompts and calling it done. Then an agent reaches a real tool call and there is no deterministic pre-dispatch gate, no approval boundary, and no fast audit answer for what just happened.

The issue is not missing ideas. The issue is missing wiring. If policy checks do not sit on the execution path, they are advisory text, not control.

What top articles cover vs miss

I reviewed the top ranking documentation pages for guardrails tutorials. They are useful. They still leave a deployment gap for OpenClaw operators.

SourceStrong coverageMissing piece
OpenAI Agents SDK GuardrailsInput, output, and tool guardrails, plus execution modes (parallel vs blocking).No OpenClaw plugin wiring, daemon health checks, or profile-based rollout with local simulation payloads.
LangChain GuardrailsMiddleware hooks, PII handling, and human-in-the-loop integration patterns.No deterministic sidecar control path with explicit fail modes and per-decision audit endpoint checks.
Amazon Bedrock GuardrailsPolicy filters (content, denied topics, PII, grounding checks) and guardrail testing workflow.No local OpenClaw runtime integration, plugin behavior under daemon outage, or command-level policy profile examples.

AI Agent Governance Platform Setup Prerequisites

From `docs/GETTING_STARTED.md`, the minimum local prerequisites are:

  • Docker + `docker compose`
  • `curl` and `openssl`
  • Node.js + npm
  • Optional but useful: OpenClaw CLI (`openclaw`)

Expected outcome after setup: daemon health on `127.0.0.1:19090`, successful simulation of a safe command, and deny behavior for a destructive command.

AI Agent Governance Platform Setup Steps (CordClaw + OpenClaw)

Step 1: Install CordClaw and select mode

Start from the repository root and run the installer. `CORDUM_UPGRADE` controls whether you also stand up the full local Cordum stack.

Install
bash
cd setup
OPENCLAW_SKIP=true ./install.sh

# Optional mode selection
CORDUM_UPGRADE=false OPENCLAW_SKIP=true ./install.sh
CORDUM_UPGRADE=true OPENCLAW_SKIP=true ./install.sh

# Optional baseline policy profile
CORDCLAW_PROFILE=moderate OPENCLAW_SKIP=true ./install.sh

Step 2: Verify first policy decisions

Run both an allow-path and deny-path simulation. You want proof before attaching governance to real write paths.

Verify Decisions
bash
curl -sS http://127.0.0.1:19090/health | jq .
openclaw cordclaw status

openclaw cordclaw simulate --tool exec --command "echo hello"
openclaw cordclaw simulate --tool exec --command "rm -rf /"

curl -sS "http://127.0.0.1:19090/audit?limit=20" | jq .

Step 3: Tune policy profile by risk appetite

Profiles are shipped in `~/.cordclaw/templates/` and copied to `~/.cordclaw/config/safety.yaml`.

ProfileBehaviorBest fit
strictRequires approval for all `exec` and file writes. Blocks autonomous scheduling by default.Regulated or high-risk environments where friction is acceptable.
moderateDenies destructive/cloud/remote-access commands. Requires approval for package installs and deploy-like actions.Most teams starting production governance without stopping daily work.
permissiveAllows most actions but still denies destructive and secrets-tagged operations.Low-risk internal automation where speed is the top priority.
Switch Profile
bash
cp ~/.cordclaw/templates/policy-strict.yaml ~/.cordclaw/config/safety.yaml
cd ~/.cordclaw
docker compose --env-file .env restart safety-kernel

openclaw cordclaw simulate --tool exec --command "echo check profile"
openclaw cordclaw simulate --tool exec --command "rm -rf /"

Step 4: Configure plugin behavior explicitly

Installer defaults plugin timeout to `500ms` and plugin fail mode to `deny` if daemon is unreachable. Keep that explicit in your OpenClaw config.

OpenClaw Plugin Config
yaml
plugins:
  entries:
    cordclaw:
      enabled: true
      config:
        daemonUrl: "http://127.0.0.1:19090"
        timeoutMs: 500
        failMode: "deny"
        logDecisions: true

Step 5: Connect to existing Cordum Safety Kernel (optional)

If you skip local stack startup, set remote env values and start the daemon against your existing environment.

Remote Safety Kernel
bash
set -a
source examples/env/cordclaw-remote.env
set +a

cordclaw-daemon
curl -sS http://127.0.0.1:19090/status | jq .

Limitations and tradeoffs

Read this before rollout
  • `docs/POLICY_GUIDE.md`, `docs/THREAT_MODEL.md`, and `docs/TROUBLESHOOTING.md` are placeholders in the current CordClaw repo snapshot, so rely on code-level behavior for critical assumptions.
  • Daemon audit entries are in-memory (`auditSize=1000` in `server.go`), so this is operational telemetry, not durable evidence storage by itself.
  • Standalone install can skip daemon startup unless `CORDCLAW_KERNEL_ADDR` and `CORDCLAW_API_KEY` are set.
  • Plugin fallback and daemon fallback are separate controls: plugin `failMode` handles daemon outage, daemon `CORDCLAW_FAIL_MODE` handles Safety Kernel outage.

Dry but useful rule: if your threat-model document says “placeholder”, do not claim a finished threat model in a review deck.

Production hardening checklist

Hardening Checklist
bash
# 1) Enforce explicit daemon behavior
# Plugin fallback when daemon is unreachable:
# - failMode: deny | allow
#
# Daemon fallback when Safety Kernel is unreachable:
# - CORDCLAW_FAIL_MODE=graduated|closed|open

# 2) Pin environment defaults
export CORDCLAW_CACHE_TTL=5m
export CORDCLAW_CACHE_MAX_SIZE=10000
export CORDCLAW_LISTEN_ADDR=127.0.0.1:19090

# 3) Test policy snapshot refresh
# daemon clears local cache when snapshot changes

# 4) Add recurring simulation checks in CI
curl -sS -X POST http://127.0.0.1:19090/simulate   -H "Content-Type: application/json"   -d @examples/simulate/deny-destructive-exec.json | jq .

# 5) Monitor degraded/offline governance states

Add this checklist to your deployment runbook and verify it in staging before broad agent permissions are enabled.

FAQ

Frequently Asked Questions

What is the fastest AI agent governance platform setup path with CordClaw?
Run `OPENCLAW_SKIP=true ./install.sh`, then verify with `/health`, `openclaw cordclaw status`, and one allow plus one deny simulation command.
Do I need the full Cordum stack for CordClaw?
No. You can run standalone mode, but the daemon startup is skipped unless `CORDCLAW_KERNEL_ADDR` and `CORDCLAW_API_KEY` are configured for an existing Safety Kernel.
How can I test policy changes before real execution?
Use `openclaw cordclaw simulate` or POST to `/simulate` with payloads from `examples/simulate/` and compare decisions across profiles.
Where do I see governance decisions?
Use `openclaw cordclaw audit --limit 20` or `GET /audit?limit=20`; each entry includes decision, reason, timestamp, and cache signal.

Next step

Run one real workflow in `moderate` profile, collect the audit output, then decide if your production baseline should stay in `moderate` or move to `strict`.

Related posts

Checklist complete for this tutorial

Includes top-3 source gap analysis, concrete commands, profile comparison table, code-backed tradeoffs, FAQ schema, and a direct rollout next step.