agent-action-guard
Local, auditable action-safety guard that screens AI agent tool calls and returns structured allow/block/warn verdicts with a reason and confidence score before auto-execution.
agent-action-guard
Local, auditable action-safety guard that screens AI agent tool calls and returns structured allow / block / warn verdicts with a reason and confidence score before auto-execution.
The Problem
AI coding agents increasingly run with auto-execution enabled: shell commands, file writes, network calls, git operations, and MCP tools can fire without a human in the loop. A mistaken or adversarial prompt can trigger credential exfiltration, destructive filesystem operations, or force-pushed git history in seconds.
agent-action-guard sits in the path between “agent decided to act” and “action executes.” It inspects a proposed action, applies 19 deterministic rules plus an offline heuristic classifier, and returns a verdict with a reason and confidence score. The design mirrors the trust layer behind Anthropic’s Claude Code auto-mode classifier.
Quickstart
pip install -e ".[dev]"
agent-action-guard version
# 0.1.0
agent-action-guard check --action '{"type":"shell","command":"echo hi"}'
# verdict: allow · reason: no rules matched · confidence: 0.95
agent-action-guard check --action '{"type":"shell","command":"rm -rf /tmp/build"}'
# verdict: block · rule: shell-rm-rf · confidence: 0.95