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
Must be set to
"action_check" for this endpoint.Example: "action_check"The session identifier from
/register-agent-run. Used to retrieve session context for analysis.Example: "f4f4f4f4-f4f4-f4f4-f4f4-f4f4f4f4f4f4"Unix timestamp (seconds since epoch) when the check is being performed.Example:
1678886415.123The 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\"}"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
Whether the action is safe to execute.
true- Action is approvedfalse- Action is blocked
Human-readable explanation of the decision. Particularly important when
is_safe is false.Example: "Action deviates from original user request for weather information"Unique identifier for this security check.Example:
"c1c1c1c1-c1c1-c1c1-c1c1-c1c1c1c1c1c1"Server timestamp when the check was performed.Example:
1678886415.789Critical 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
Define Clear Action Boundaries
Define Clear Action Boundaries
Establish what actions require checking:
Handle Blocks Gracefully
Handle Blocks Gracefully
Provide good user experience when actions are blocked:
Include Rich Context in Schemas
Include Rich Context in Schemas
Provide detailed schemas to improve analysis accuracy:
Implement Retry Logic
Implement Retry Logic
Handle transient failures appropriately:
Monitor Block Patterns
Monitor Block Patterns
Track and analyze blocked actions:
Performance Optimization
Parallel Checking
Check multiple independent actions in parallel:Related Endpoints
- POST /register-agent-run - Register session to get trace_id
- POST /event - Log events that provide context for checks
FAQ
How fast are security checks?
How fast are security checks?
Typical response time is 0.5-1s. Critical actions should always be checked despite the small latency cost which we are continuously improving.
What happens if I don't check actions?
What happens if I don't check actions?
Unchecked actions bypass Fabraix’s security layer, leaving your agent vulnerable to prompt injections, goal deviations, and other attacks.
Can I override a block decision?
Can I override a block decision?
Blocks should be treated as final for security. If you need to override, log the override as an event and implement additional safeguards.
How does context analysis work?
How does context analysis work?
Fabraix analyzes the entire session history (all logged events) to understand the agent’s trajectory and detect deviations or anomalies.
Should I check read-only operations?
Should I check read-only operations?
Generally, read-only operations don’t require checking unless they involve sensitive data or could be part of a reconnaissance attack.

