2026-02-09 · Authensor

Output guardrails and action gating solve different problems. Output guardrails filter what an agent says; action gating controls what an agent does. SafeClaw by Authensor adds the action-gating layer that output guardrails cannot provide, enforcing deny-by-default permissions on every file write, shell command, network request, and API call your agent attempts. Install it with npx @authensor/safeclaw to complement your existing guardrails with execution-level safety.

Understanding the Difference

Output guardrails (like Guardrails AI or NeMo Guardrails) operate on the model's text output. They check whether the agent's response contains harmful content, hallucinations, off-topic statements, or policy violations. This is valuable for user-facing applications where the quality and safety of text output matters.

Action gating operates on the agent's execution requests. When an agent decides to run a shell command, write a file, or make a network request, action gating evaluates whether that specific action is permitted before it executes. This is essential for any agent that takes actions in the real world.

| Feature | Output Guardrails | SafeClaw Action Gating |
|---|---|---|
| What it controls | Text output | Action execution |
| When it acts | After generation, before display | After decision, before execution |
| What it prevents | Harmful text, hallucinations | Harmful actions, unauthorized access |
| Audit trail | Output logs | Hash-chained action logs |
| Permission model | Content filtering | Deny-by-default |

Why You Need Both

Consider an agent that is asked to refactor a codebase. Output guardrails ensure the agent's explanations are accurate and appropriate. But the agent also needs to:

Output guardrails have no visibility into these actions. They cannot prevent the agent from reading .env files, deleting source directories, or running npm install malicious-package. That is SafeClaw's job.

Step-by-Step Integration

Step 1: Keep Your Existing Guardrails

Do not remove your output guardrails. They continue to serve their purpose for output quality and content safety. SafeClaw adds a new layer without replacing the existing one.

Step 2: Install SafeClaw

npx @authensor/safeclaw

Step 3: Map the Execution Pipeline

Understand where each safety layer fits in your agent's pipeline:

[ User Input ]
      |
[ Model Processing ]
      |
[ Output Guardrails: Filter text output ]
      |
[ Agent Decision: What action to take ]
      |
[ SafeClaw: Gate action execution ]
      |
[ Action Execution ]

Output guardrails sit between the model and the user. SafeClaw sits between the agent's decision and the actual execution.

Step 4: Define Action Policies

Your output guardrails handle content. Now define what actions are permitted:

rules:
  - action: "file:read"
    path: "/project/**"
    effect: "allow"
  - action: "file:write"
    path: "/project/src/**"
    effect: "allow"
  - action: "shell:execute"
    command: "npm test"
    effect: "allow"
  - action: "shell:execute"
    command: "npm run build"
    effect: "allow"
  # Default deny blocks everything else

Step 5: Run Simulation Mode

Observe how SafeClaw's action gating interacts with your existing guardrails:

safeclaw.init({
  mode: 'simulation',
  policy: './safeclaw-policy.yaml',
  audit: true
});

The simulation log shows which actions would be blocked. Adjust your policy to ensure legitimate actions are allowed while dangerous ones remain denied.

Step 6: Enable Enforcement

Switch to enforcement mode. Your agent now has two complementary safety layers: output guardrails for content quality and SafeClaw for action control.

The Coverage Gap

Many teams assume their output guardrails provide complete safety. This creates a dangerous blind spot. Output guardrails:

These are not failures of output guardrails; they are simply outside their scope. SafeClaw fills this gap with a purpose-built action-gating engine backed by 446 tests and hash-chained audit trails.

Performance Impact

Running both output guardrails and SafeClaw adds minimal overhead. Output guardrails operate on text. SafeClaw operates on action requests. They run at different points in the pipeline and do not compete for the same resources. SafeClaw's zero-dependency, in-process evaluation adds negligible latency.


Related reading:

Try SafeClaw

Action-level gating for AI agents. Set it up in your browser in 60 seconds.

$ npx @authensor/safeclaw