Skip to main content

Overview

These concepts power Arx, Fabraix’s run-time defence layer. They’re informed by what our offensive agent Nyx finds against real systems: defences only hold if they understand the full trajectory of an attack, not just the final action. Arx is built on three fundamental concepts that work together to provide comprehensive reliability and observability for AI agents:

Agent Sessions

Complete traces of agent runs from start to finish

Event Logging

Detailed recording of every step in the reasoning loop

Contextual Judgment

Intelligent analysis of actions within their full context

Agent Session (Trace)

An agent’s entire run, from the initial prompt to its final output, is encapsulated in a Session. Each session is uniquely identified by a trace_id.

What is a Trace?

A trace represents:
  • A complete conversation or task execution
  • All events and actions within that context
  • The agent’s state throughout the interaction

Creating a Session

Every agent interaction begins by registering a new session:

Why Sessions Matter

Sessions enable:
  • Complete Audit Trails: Every action is linked to its originating session
  • Contextual Analysis: Actions are evaluated based on the entire graph trajectory of events that led to the specific action
  • Attack Detection: Identify goal deviation and prompt injection by analyzing the full context
The trace_id is your primary key for linking all events and security checks. Store it throughout your agent’s lifecycle.

Agent-Centric Events

Events are the fundamental building blocks of agent observability. Each event represents a distinct step in the agent’s reasoning process.

Event Types

Fabraix recognizes seven core event types:
User Events - Input from human users

Event Flow

Here’s how events flow through a typical agent interaction:

Contextual Judgment

The most powerful aspect of Fabraix is its ability to evaluate actions within their full context, not in isolation.

How It Works

When checking an action, Fabraix:
  1. Retrieves Session History - Loads all events for the trace_id
  2. Constructs Context Graph - Builds a complete picture of the agent’s behavior
  3. Evaluates Intent - Compares the action against the original objective
  4. Detects Anomalies - Identifies deviations, injections, and attacks
  5. Returns Verdict - Provides is_safe decision with reasoning

Attack Detection Examples

Scenario: User asks to summarize an article that contains hidden instructions
Scenario: Agent gradually shifts from helping to harmful behavior
Scenario: Attempt to modify agent’s memory with malicious data

Context Window

Fabraix maintains a comprehensive view of the agent session:
  • Temporal Context: Order and timing of events
  • Causal Relationships: Which events triggered others
  • Semantic Analysis: Understanding of content and intent
  • Pattern Recognition: Detection of unusual sequences

Best Practices

Below are some guidelines to follow in instrumenting your agent with Fabraix to ensure you get the most out of it.

1. Log Comprehensively

Log all significant events in your agent’s reasoning loop:

2. Use Detailed Schemas

Provide rich schemas that fully describe your data:

3. Check Before Critical Actions

Always validate actions that could have real-world consequences:

Summary

The three core concepts work together to provide defense in depth:
  1. Sessions provide the container for a complete interaction
  2. Events capture every step with rich detail
  3. Contextual Judgment analyzes the whole trajectory to detect threats
This comprehensive approach enables Fabraix to detect goal deviation and sophisticated attacks that would bypass traditional security measures.

Next Steps

Learn about the Event data model in detail →