Pipelock, AgentGuard, Agent Guardrails, or Invariant: Choosing an Agent Safety Gate
In Short
Choose an agent safety gate by the boundary it can actually enforce. Start with Pipelock for mediated network egress, AgentGuard for runtime action policy and skill scanning, Agent Guardrails for destructive shell-command patterns, or Invariant for rules over agent traces and tool flows. These are starting points for evaluation, not interchangeable guarantees. Secret handling may also need a credential broker such as OneCLI.
The practical question is: where can an unsafe action still escape? Draw the route from agent to tool to destination, then place policy checks where they can stop execution. A warning after a write has completed is useful evidence, but it cannot undo that write.
Who this is for
This guide is for platform engineers and operators connecting agents to repositories, external APIs, or sensitive systems. It helps you pick the first control to test before granting broader access. It does not rank detection quality: the comparison below follows documented enforcement models, without a shared benchmark or hands-on deployment test.
Use a disposable workspace, synthetic secrets, and nonproduction identities for the trial. Write down the allowed task first, such as reading a repository and drafting a change. Keep publishing, deletion, and credential administration outside that initial permission set.
Decision path
| Boundary to protect | Starting candidate | Proof to request |
|---|---|---|
| Outbound network traffic | Pipelock | Request blocked on the enforced route |
| Runtime tool actions | AgentGuard | Installed hook denies a proposed action |
| Destructive shell commands | Agent Guardrails | Guard rejects the command before execution |
| Sequences of tool calls | Invariant | Rule catches the prohibited information flow |
- Start with egress when the risk is data leaving the environment. The Pipelock documentation describes inspection of mediated network and MCP traffic. Coverage depends on routing and configuration; plain CONNECT tunnels have different visibility from intercepted TLS. In your trial, send a synthetic secret to a controlled endpoint through the expected route, then check whether an alternate route can bypass mediation.
- Start with runtime policy when tool permissions are the immediate problem. AgentGuard documents skill scanning, trust management, and action evaluation, including OpenClaw tool hooks. Verify your actual host integration. A completed source scan and an active execution hook are separate facts, so retain evidence of both.
- Start with command guards when destructive shell operations dominate. Agent Guardrails documents Claude Code deny rules and PreToolUse scripts for Terraform, databases, Kubernetes, cloud resources, and Git. Feed command text to the guard in an isolated harness; do not execute destructive examples against real resources. Include quoting and wrapper variations in the trial.
- Start with trace rules when risk depends on earlier context. Invariant documents rules over messages, tool calls, and their relationships, with proxy integration and programmatic trace analysis. Evaluate a permitted sequence beside a prohibited one. Confirm that production evaluation happens before the relevant action executes, rather than only during later analysis.
For example, consider an agent that reads an internal ticket and then drafts an external response. A command block may never see either API call. An egress control can examine the mediated request, while a trace rule can express the relationship between reading sensitive information and sending a message. Map each requirement to observable inputs before selecting controls.
Recommended ASE skills
- Pipelock egress and MCP protection: use this entry to plan the network boundary and identify traffic that needs mediation.
- AgentGuard action checks and skill scanning: use it to separate admission review from runtime permission checks.
- Agent Guardrails destructive-command blocks: start here when a coding agent has shell access to operational tooling.
- Invariant trace and tool-flow rules: use it when an unsafe sequence cannot be described by a single command string.
- OneCLI credential brokering: consider it alongside the gate when agents need API access without raw provider keys. The current upstream documentation describes a team agent platform with sandboxing and gateway credential injection; recheck the deployment model before following older instructions.
What to watch
Keep a compact acceptance packet: pinned revision, host integration, policy file, permitted fixture, denied fixture, and observed outcome. Record which layer owns each denial. As an initial operator checklist, require one allowed case, one denied case, and one bypass attempt per boundary; these are proposed trial criteria, not vendor performance claims.
Check failure behavior by making the policy service unavailable in the test environment. Check whether a missing hook produces a visible error. Review logs for accidental secret retention, and verify whether optional cloud or semantic features change the data boundary. Give every exception an owner and an expiry date. Repeat the fixtures after changing the runtime, tool schema, or integration.
FAQ
Which gate should I install first?
Choose the one that covers the next sensitive action you intend to enable. If the agent is about to gain shell access, test command enforcement first. If it will send information externally, verify the outbound route and destination policy before enabling that capability.
Can I combine these controls?
Yes, when each covers a defined boundary. Keep policy ownership clear and test an allowed task through the full chain. Otherwise overlapping rules can create confusing denials and encourage broad exceptions that weaken the original control.
Does a clean scan mean the workflow is safe?
No. A scan supplies evidence about what it inspected. Runtime behavior, credential scope, routing, and policy integration still need validation. Begin with a bounded task, retain the acceptance packet, and expand access only after the relevant enforcement tests pass.
