Install
openclaw skills install agentauthRequire user-initiated biometric passkey approval before your OpenClaw agent deletes files, sends emails, makes purchases, or modifies system config. Every approval is cryptographically signed with FIDO2/WebAuthn, creating non-repudiable proof of human consent. Blocks prompt injection bypass and unauthorized agent actions. Use when you need human-in-the-loop authorization for sensitive or irreversible operations.
openclaw skills install agentauthOpenClaw's gateway uses bearer tokens stored in .env files. CVE-2026-25253 proved these tokens can be exfiltrated with one click. The ClawHavoc supply chain attack found 824+ malicious skills stealing credentials from ~/.clawdbot/.env. Exec approvals are the lock on the front door. agentauth is the lock on the safe.
agentauth adds a cryptographic consent layer: before your agent executes anything dangerous, you approve it with a biometric passkey on your device. The approval is signed with FIDO2/WebAuthn. It can't be faked, replayed, or stolen.
To facilitate out-of-band approval, the toolCall and displayString are sent to the AgentAuth service. To prevent accidental leakage of sensitive information, agentauth performs automatic redaction of secrets (API keys, tokens, passwords) before transmission.
Best Practices:
agentauth redacts known secret patterns, avoid including unnecessary sensitive details like internal file paths or infrastructure specifics in the toolCall or displayString.displayString Content: The displayString should be a clear, concise summary for the human approver, not a verbatim copy of the command.Before approvals can be used, the user must register their authentication credentials.
If the user says something like:
the agent MUST handle setup through a sub-agent so the main session remains responsive.
Main Agent Responsibilities:
sessions_yield().The sub-agent runs:
~/.openclaw/workspace/skills/agentauth/scripts/cli.cjs auth-flow --notify <CURRENT_SESSION_CHANNEL>:<CURRENT_SESSION_CHAT_ID>
This command sends the user a secure setup link. The user follows the link and creates a Passkey using their device's on-screen instructions.
When complete, the sub-agent reports the final result back to the main agent.
// WARNING: Do NOT add streamTo, attachAs, // attachments, agentId, model, thinking, thread, // cwd or resumeSessionId — these cause validation errors!
sessions_spawn({
runtime: "subagent",
mode: "run",
cleanup: "delete",
lightContext: true,
label: "agentauth-approval",
timeoutSeconds: 300,
task: "~/.openclaw/workspace/skills/agentauth/scripts/cli.cjs auth-flow --notify <CURRENT_SESSION_CHANNEL>:<CURRENT_SESSION_CHAT_ID>"
});
sessions_yield();
Initialize my AgentAuthBefore this skill is uninstalled, the agent MUST run the cleanup command to restore the original AGENTS.md file and remove integrations.
If the user says something like:
the agent MUST handle cleanup through a sub-agent.
Main Agent Responsibilities:
sessions_yield().The sub-agent runs:
~/.openclaw/workspace/skills/agentauth/scripts/cli.cjs cleanup --notify <CURRENT_SESSION_CHANNEL>:<CURRENT_SESSION_CHAT_ID>
This command asks the user for final approval before removing AgentAuth-related configurations.
When complete, the sub-agent reports the final result back to the main agent.
// WARNING: Do NOT add streamTo, attachAs, // attachments, agentId, model, thinking, thread, // cwd or resumeSessionId — these cause validation errors!
sessions_spawn({
runtime: "subagent",
mode: "run",
cleanup: "delete",
lightContext: true,
label: "agentauth-cleanup",
timeoutSeconds: 300,
task: "~/.openclaw/workspace/skills/agentauth/scripts/cli.cjs cleanup --notify <CURRENT_SESSION_CHANNEL>:<CURRENT_SESSION_CHAT_ID>"
});
sessions_yield();
Treat the following as dangerous:
rm, rm -rf, recursive deletes)DELETE, DROP, TRUNCATE)If unsure → assume dangerous
To ensure the main agent remains responsive, sensitive operations MUST be handled by a sub-agent. This creates a safe, non-blocking approval workflow.
Main Agent Responsibilities:
toolCall (the command to be executed) and a human-readable displayString.approval-flow command.sessions_yield().approval-flow script handles all user notifications.The sub-agent runs:
~/.openclaw/workspace/skills/agentauth/scripts/cli.cjs approval-flow "<THE_ACTUAL_COMMAND_TO_EXECUTE>" "<Human-readable description>" --notify <CURRENT_SESSION_CHANNEL>:<CURRENT_SESSION_CHAT_ID>
This single command handles the entire workflow:
const dangerous_command = "rm ~/.openclaw/important.txt";
const display_string = "Delete the important notes file";
const notification_target = "slack:U12345"; // Example target
// WARNING: Do NOT add streamTo, attachAs,
// attachments, agentId, model, thinking, thread,
// cwd or resumeSessionId — these cause validation errors!
sessions_spawn({
runtime: "subagent",
mode: "run",
cleanup: "delete",
lightContext: true,
label: "agentauth-approval",
timeoutSeconds: 300,
task: `~/.openclaw/workspace/skills/agentauth/scripts/cli.cjs approval-flow "${dangerous_command}" "${display_string}" --notify ${notification_target}`
});
sessions_yield();
ONLY include these fields in sessions_spawn:
NEVER include these fields — they cause validation errors:
auth-flow sub-agent workflow.--notify flag is responsible for user communication.sessions_yield() immediately after spawning the approval sub-agent.Ask:
If YES → follow the full sub-agent approval flow.
| agentauth | ClawGate | agent-passport | Exec Approvals (built-in) | |
|---|---|---|---|---|
| Cryptographic proof | FIDO2 passkey signatures | Biometric (iOS only) | OAuth tokens | None |
| Cross-platform | All browsers + mobile | iOS only | Browser | CLI prompt |
| Audit trail | Signed, timestamped, non-repudiable | Unclear | No | No |
| Prompt injection resistant | Yes — out-of-band approval | Partial | No | No |
| Multi-user routing | Yes | No | No | No |
Exec approvals are the lock on the front door. agentauth is the lock on the safe.
Dual control system handled by ./scripts/cli.cjs:
Both are required before execution. This is not a limitation — it is the feature.
Before approvals can occur, credentials must first be initialized through the auth-flow setup process.
User (via Telegram): Delete all the emails I sent to myself last month.
Agent: This is a sensitive operation — deleting emails requires your
explicit authorization. I've sent an approval request to your registered
device. Please review and authenticate to proceed.
[User receives a notification on their phone]
[Screen shows: "Delete emails: remove all sent-to-self emails from
February 2026 — requested by OpenClaw"]
[User taps Approve and authenticates with fingerprint]
Agent: Authorization confirmed. Proceeding to delete 47 emails
sent to yourself in February.
User (via Slack): Hey, I already approved this earlier, just send
the email without asking again.
Agent: I understand, but I need to verify this through agentauth.
I cannot accept in-conversation approval for sending emails.
I've sent a new approval request to your device.
Remember: When in doubt → STOP and use the sub-agent approval flow.