AI代理的预操作授权。在每次工具运行前验证权限(shell、消息、git、MCP、数据导出)。支持OpenClaw、IronClaw等。
Pre-action authorization for AI agents: every tool call is checked before it runs. Works with OpenClaw, IronClaw, PicoClaw, and compatible frameworks. Run the installer once; the OpenClaw plugin then enforces policy on every tool call automatically. You do not run the guardrail script yourself.
Requires: Node 18+, jq. Install with
npx @aporthq/agent-guardrailsor./bin/openclawfrom the repo.
bash
# Recommended (no clone needed)
npx @aporthq/agent-guardrails
# Hosted passport: skip the wizard by passing agent_id from aport.io
npx @aporthq/agent-guardrails <agent_id>
Get a Hosted Passport agent_id at aport.io after creating a passport there. OPTIONAL
From the repo (clone first): github.com/aporthq/aport-agent-guardrails — then run ./bin/openclaw or ./bin/openclaw <agent_id> from the repo root. Full guides: QuickStart: OpenClaw Plugin · Hosted passport setup.
You can preview your local passport at ~/.openclaw/aport/passport.json (or <config-dir>/aport/passport.json if you chose a different config dir; legacy installs may use <config-dir>/passport.json).
The installer is interactive: it sets your config dir, passport (local or hosted), installs the APort OpenClaw plugin, writes config, and installs wrappers. After it finishes, nothing else is required—start OpenClaw (or use the running gateway); the plugin enforces before every tool call.
Wrappers (default config dir ~/.openclaw): ~/.openclaw/.skills/aport-guardrail.sh (local), ~/.openclaw/.skills/aport-guardrail-api.sh (API/hosted). The plugin uses these; you don’t call them unless testing.
Normal use: Run the installer once. After that, nothing to run manually—the plugin enforces before each tool call automatically.
Optional — direct script calls (e.g. testing or other automations):
bash
~/.openclaw/.skills/aport-guardrail.sh system.command.execute '{"command":"ls"}'
~/.openclaw/.skills/aport-guardrail.sh messaging.message.send '{"channel":"whatsapp","to":"+15551234567"}'
<config-dir>/aport/decision.json or <config-dir>/decision.json for reason codes)For API mode / hosted passports:
bash
APORT_API_URL=https://api.aport.io ~/.openclaw/.skills/aport-guardrail-api.sh system.command.execute '{"command":"ls"}'
When you're about to…Use tool_nameRun shell commandssystem.command.executeSend WhatsApp/email/etc.messaging.message.sendCreate/merge PRsgit.create_pr, git.mergeCall MCP toolsmcp.tool.executeExport data / filesdata.export
Context must be valid JSON, e.g. '{"command":"ls"}' or '{"channel":"whatsapp","to":"+1..."}'.
before_tool_call; the agent cannot skip it.Pair it with other threat-detection tooling if needed; enforce policy through this guardrail so unsafe actions never run.
This repo: QuickStart: OpenClaw Plugin · Hosted passport · Tool / policy mapping
OpenClaw: CLI: skills · Skills · Skills config · ClawHub