Autonomous Agent Pre-Execution Command & Prompt Injection Gate
verify_agent_command_safetyEvaluates untrusted agent prompts, bash commands, and tool arguments to block prompt injection, destructive shell commands, and private-key exfiltration. Use when screening a general shell command or user prompt before autonomous agent execution; for statically validating SQL database queries at the AST level, use validate_sql_query_ast instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'payload' ('action_type' defaults to 'bash_command'), supports '?demo=true' or L402 (20 sats), and returns HTTP 400 if invalid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | Raw command string, script snippet, or untrusted prompt to inspect for safety violations. | |
| action_type | No | Execution context of the payload; defaults to 'bash_command' when omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| safe | Yes | True when zero injection, exfiltration, or destructive patterns are found. | |
| verdict | Yes | Enforcement decision ('ALLOW', 'BLOCK', or 'QUARANTINE'). | |
| risk_score | Yes | Normalized threat probability from 0.0 (benign) to 1.0 (critical). | |
| threats_detected | Yes | List of specific threat categories triggered by the payload. |