Skip to main content
POST
Check Action

Overview

This endpoint validates actions that an agent is about to execute, analyzing them in the context of the entire session history. It provides real-time security checks to prevent prompt injections, goal deviations, and other malicious behaviors.
Always check critical actions (financial transactions, data modifications, external communications) before execution. This is your primary defense against compromised agents.

Request

string
required
Must be set to "action_check" for this endpoint.Example: "action_check"
string
required
The session identifier from /register-agent-run. Used to retrieve session context for analysis.Example: "f4f4f4f4-f4f4-f4f4-f4f4-f4f4f4f4f4f4"
float
required
Unix timestamp (seconds since epoch) when the check is being performed.Example: 1678886415.123
string
required
The action data as a stringified JSON object. This represents the specific parameters of the action to be executed.Example: "{\"amount\":500,\"recipient\":\"user@example.com\"}"
string
required
A stringified JSON Schema defining the action’s structure. Should include the function name, description, and parameter definitions.Example: "{\"type\":\"function\",\"name\":\"transfer_funds\",\"parameters\":{...}}"

Response

boolean
required
Whether the action is safe to execute.
  • true - Action is approved
  • false - Action is blocked
string
required
Human-readable explanation of the decision. Particularly important when is_safe is false.Example: "Action deviates from original user request for weather information"
string
required
Unique identifier for this security check.Example: "c1c1c1c1-c1c1-c1c1-c1c1-c1c1c1c1c1c1"
float
required
Server timestamp when the check was performed.Example: 1678886415.789

Critical Actions to Check

Always validate these action types before execution:

Financial Operations

  • Money transfers
  • Payment processing
  • Refunds
  • Account modifications

Data Operations

  • Database updates
  • File deletions
  • Backup operations
  • Schema changes

Communications

  • Sending emails
  • SMS messages
  • API calls to external services
  • Webhooks

System Operations

  • Code execution
  • Configuration changes
  • Permission modifications
  • Service restarts

Attack Detection Examples

Prompt Injection Detection

Goal Deviation Detection

Complete Implementation Example

Response Examples

Approved Action

Blocked Actions

Best Practices

Establish what actions require checking:
Provide good user experience when actions are blocked:
Provide detailed schemas to improve analysis accuracy:
Handle transient failures appropriately:
Track and analyze blocked actions:

Performance Optimization

Parallel Checking

Check multiple independent actions in parallel:

FAQ

Typical response time is 0.5-1s. Critical actions should always be checked despite the small latency cost which we are continuously improving.
Unchecked actions bypass Fabraix’s security layer, leaving your agent vulnerable to prompt injections, goal deviations, and other attacks.
Blocks should be treated as final for security. If you need to override, log the override as an event and implement additional safeguards.
Fabraix analyzes the entire session history (all logged events) to understand the agent’s trajectory and detect deviations or anomalies.
Generally, read-only operations don’t require checking unless they involve sensitive data or could be part of a reconnaissance attack.