What is DefenseClaw?

A 60-second pitch — DefenseClaw adds policy, audit, and connector-specific human-in-the-loop controls to supported AI coding agents.

DefenseClaw sits between your coding agent and what it can do. It answers three questions: what is the agent allowed to install, what is it doing right now, and what did it do. Skills, MCP servers and plugins are scanned before they run. Prompts and tool calls are checked as they happen, for the events each connector sends; coverage differs by agent (see the capability matrix). Every decision goes to a local audit database and to the destinations you configure.

Three modes, one command

  • Observe records policy findings without enforcing them. Hook fail mode and proxy availability still apply. Start here.
  • Action blocks findings at or above the block level. The shipped default blocks CRITICAL and alerts on HIGH and MEDIUM. Change it with defenseclaw guardrail block-at.
  • Action with human approval (HITL) pauses a risky call and asks you, on agents with a native approval prompt. Other agents take the connector's fallback right away.

Where DefenseClaw sits

DefenseClaw has three parts:

  • The CLI (defenseclaw) sets everything up and shows you what happened. It also has a terminal UI (defenseclaw tui).
  • The gateway (defenseclaw-gateway) is a background process that decides and records. It listens on loopback, port 18970 by default.
  • A connector per agent: the hooks or plugin that send the agent's prompts and tool calls to the gateway. Some connectors send model traffic through a guardrail proxy instead.

Every decision you make lives in one file, ~/.defenseclaw/config.yaml. The running gateway applies policy changes without a restart. A few startup settings, such as listener and storage, wait for a restart (which ones).

runs
prompts, tool calls
configures, starts
asks: allow or block?
exports
records
You
Your AI agentsuch as Claude Code
defenseclaw CLI + TUIsets up and reviews
Connectorhooks, plugin or proxy
defenseclaw-gatewaydecides and records
Your telemetryOTLP, Splunk, webhooks
Audit loglocal SQLite database

List view for small screens. Use the expand button to open the drawing.

  1. Your AI agentsuch as Claude Code
    • prompts, tool callsConnector
  2. You
    • runsdefenseclaw CLI + TUI
  3. Connectorhooks, plugin or proxy
    • asks: allow or block?defenseclaw-gateway
  4. defenseclaw CLI + TUIsets up and reviews
    • configures, startsdefenseclaw-gateway
  5. defenseclaw-gatewaydecides and records
    • exportsYour telemetry
    • recordsAudit log
  6. Audit loglocal SQLite database
  7. Your telemetryOTLP, Splunk, webhooks
You run the CLI, which writes config.yaml and starts the gateway. The agent reaches the gateway through its connector. The gateway answers allow or block, writes the audit log and exports to your destinations.

What DefenseClaw is not

DefenseClaw does not prove an agent is safe, and it does not isolate the agent on its own. For isolation, run the agent in an OpenShell sandbox with defenseclaw sandbox run. Pair DefenseClaw with least-privilege credentials, human review and CI gates.

Features

Each feature page says what the feature does, when to use it and where the step-by-step guides and reference live.

Next