OpenClaw Quickstart

Status: from compatibility matrix — OpenClaw free path AVAILABLE on npm; paid Passport PILOT. Not generally available production SLAs. Agent host can stay on Windows; paid runtime needs Linux Docker.

0) Prereq — install OpenClaw

Install the OpenClaw host app first (see openclaw.ai). Free adapter steps below assume the openclaw CLI is available.

1) Free policy self-check, then activate local enforcement

A) Optional one-line self-check (OpenClaw install optional). The command always runs a packaged representative-action policy self-check and also performs a best-effort inspection of local OpenClaw/plugin configuration and connectivity. It does not install or enable the plugin, and it does not prove that a real agent turn was intercepted:

npx --yes --package=@dexgate/openclaw-trusted-mode@1.0.18 dexgate-assess

Expect: JSON with overall status (PASS, FAIL, or PARTIAL), packageSelfCheck, environment fields (for example openclawDetected, pluginEnabled, localHardGateActive, governedRuntimeConfigured / governedRuntimeConnected), canned checks, and optional claim. governed may be true when governed path is configured or connected—it is not proof of a live middleware decision or Passport. Treat package self-check PASS as policy self-check passed, not “local hardening is active on a live agent turn.” When the claim service is reachable, the CLI uploads only the sanitized package self-check (not environment fields) and prints a claim URL.

B) Activate free local enforcement in real OpenClaw sessions (~10–15 min):

mkdir dexgate-openclaw-first-success
cd dexgate-openclaw-first-success
npm init -y
npm install @dexgate/openclaw-trusted-mode@1.0.18
openclaw plugins install ./node_modules/@dexgate/openclaw-trusted-mode
openclaw plugins info openclaw-trusted-mode

Confirm the plugin is enabled and toolPolicyMode defaults to ALLOWLIST_ONLY. High-consequence actions such as git push stay blocked when the free hard gate is active. Free mode does not mint a Passport and does not require a Dexgate account.

Equivalent bins for the self-check: npx openclaw-local-hardening-check or npx dexgate-assess (same entrypoint in @dexgate/openclaw-trusted-mode@1.0.18).

Turn on governed mode

Use this checklist when free allowlist mode is working and you want real policy decisions. Requires adapter 1.0.17+ (current pin 1.0.18). The supported paid path is toolPolicyMode: "MIDDLEWARE" through Decision Middleware (not direct plugin→PDP).

Three-step startup order

  1. Licensed Dexgate runtime healthy — GET /healthz → 200 on the runtime host.
  2. Decision Middleware running next to that runtime (same host or private-network sidecar) — GET /health on the decide port (default 8787). Put the runtime authorize bearer token only on this process.
  3. OpenClaw plugin — set toolPolicyMode: "MIDDLEWARE" and decisionMiddlewareUrl to the middleware decide URL. Do not put pdpAuthToken on the plugin for this path.

Exact plugin config (MIDDLEWARE)

{
  "toolPolicyMode": "MIDDLEWARE",
  "decisionMiddlewareUrl": "http://127.0.0.1:8787/v1/decide",
  "environment": "dev",
  "tenantId": "<your-tenant-id>",
  "gatewayId": "gw-dev",
  "failClosed": true,
  "enforcementPosture": "fail-closed"
}

environment canonical values: dev | staging | production (aliases such as prod → production, qa → staging are normalized by the Decision Middleware). gatewayId is a stable host label you choose (not a console-issued secret).

Expected logs

[Trusted Mode] middleware tool=read_file decision=allow trace_id=… reason=…
[Trusted Mode] middleware tool=shell decision=deny trace_id=… reason=…
# Decision Middleware stdout (one JSON line per tool decision):
{"type":"decision_summary","tool":"read_file","decision":"allow","deny_code":null,"latency_ms":42,"trace_id":"…","policy_variant":"…"}

Failure behavior

Full steps for purchase, middleware env, and legacy direct-PDP: continue in §1b below.

After free local enforcement is installed and working (toolPolicyMode: ALLOWLIST_ONLY by default), expand the same path with purchase and host wiring details here. A package self-check PASS alone is not enough—install and enable the plugin first (re-run assess to confirm free hard-gate signals when useful).

Governed path shape (supported)

OpenClaw (MIDDLEWARE)  @dexgate/openclaw-trusted-mode@1.0.18
  → Decision Middleware  @dexgate/decision-middleware@0.1.1   POST /v1/decide
    → Dexgate runtime                                            POST /v1/authorize
  1. Buy Production (pilot, $99/mo): Buy with Stripe · compare plans
  2. Download + run runtime: after purchase, open Console → Downloads. Install the runtime package on one Linux Docker host using the package instructions. Confirm runtime health: GET /healthz → 200.
  3. Tenant id: use your workspace/tenant id from the console org (shown on Downloads / config packages).
  4. gatewayId: choose a stable label for this agent host (for example gw-dev). You assign it; it is not a secret issued by the console. Use the same value in plugin config (and middleware defaults if you set them).

Step B — Decision Middleware (after runtime is healthy)

Run Decision Middleware next to the licensed Dexgate runtime (same host or private-network sidecar). It is a separate package; OpenClaw does not hard-depend on it.

Credential boundary: put the runtime authorize bearer token only on the Decision Middleware process (value from your console runtime-secrets package; env names are documented in the Decision Middleware README). Do not put pdpAuthToken in the OpenClaw plugin config when using MIDDLEWARE mode.

# On the licensed runtime host (or sidecar that can reach /v1/authorize):
npm install -g @dexgate/decision-middleware@0.1.1
export SDE_PDP_URL=http://127.0.0.1:8001/v1/authorize
# also set middleware auth + tenant + policy variant env from the console package
# (see Decision Middleware README — do not copy runtime secrets into the OpenClaw plugin)
export SDE_PDP_TENANT_ID="<your-tenant-id>"
export SDE_PDP_TIMEOUT_MS=8000
export PORT=8787
npx dexgate-decision-middleware

# Health checks
curl -s http://127.0.0.1:8787/health     # Decision Middleware
curl -s http://127.0.0.1:8001/healthz    # licensed Dexgate runtime

Simple local/dev alternative: npx @dexgate/decision-middleware with the same env vars. Keep the decide port private; no public internet without auth.

Step C — Configure OpenClaw (MIDDLEWARE)

After middleware is healthy, set the plugin config (merge into ~/.openclaw/openclaw.json under plugins.entries.openclaw-trusted-mode.config). Do not include pdpAuthToken:

{
  "toolPolicyMode": "MIDDLEWARE",
  "decisionMiddlewareUrl": "http://<decision-middleware-host>:8787/v1/decide",
  "environment": "dev",
  "tenantId": "<your-tenant-id>",
  "gatewayId": "gw-dev",
  "failClosed": true,
  "enforcementPosture": "fail-closed"
}

Env shortcuts: DEXGATE_TOOL_POLICY_MODE=MIDDLEWARE, DEXGATE_DECISION_MIDDLEWARE_URL=http://127.0.0.1:8787/v1/decide.

tenantId / gatewayId on the plugin are forwarded on each decide request so middleware and runtime see per-request routing (not only process-level defaults). gatewayId is a host label you choose (example gw-dev).

Expect in logs: decision=allow|deny and trace_id=…. Free allowlist mode never requires middleware or the licensed runtime.

Action Passports: Decision Middleware /v1/decide returns passport: null. Entitled protected-executor workflows on the licensed Dexgate runtime issue, verify, and revoke Action Passports separately.

Legacy / advanced — direct PDP on the plugin

Only if you intentionally skip Decision Middleware. The shipped configure CLI still writes toolPolicyMode=PDP:

npx openclaw-trusted-mode-configure \
  --tenantId <your-tenant-id> \
  --gatewayId <your-chosen-gateway-id> \
  --environment <your-environment> \
  --pdpUrl http://<dexgate-host>:8001/v1/authorize \
  --pdpAuthToken <token from runtime-secrets package> \
  --enforcementPosture fail-closed

npx openclaw-trusted-mode-check --json
# env-driven legacy check; not required for the MIDDLEWARE path

Full minimum-setup steps: Minimum Production setup. Paid runtime is early access pilot (not a general production SLA).

2) Paid path — minimum pilot deployment

Section 1b is the step-by-step paid path after free success. Summary for Production ($99): one Linux Docker host for the licensed runtime + your OpenClaw host (same machine is fine for a pilot deployment).

  1. Buy Production with Stripe (or start from Pricing), then open customer console Downloads.
  2. Download the runtime package from the console; install on Linux Docker; confirm health via console-documented procedure.
  3. Run the configure + check commands in §1b step 3.

3) Day-2 verify loop

  1. Runtime health check (console-documented procedure) → healthy
  2. npx openclaw-trusted-mode-check --json → governed path on licensed runtime
  3. Console → Deployments healthy
  4. Console → Decision/passport history after one gated action

4) Sample paid shape

Download sample passport record (illustrative — free mode never issues this).

Prefer to walk setup with your own agent? Use the copy-ready prompts: Setup prompts for your agent.

Get started chooser Start paid pilot ($99) See pricing Minimum Production setup Setup prompts for your agent OpenClaw overview