Overview
Fabraix 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 atrace_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
- model_input
- model_output
- tool
- memory
- environment
- error
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:- Retrieves Session History - Loads all events for the
trace_id - Constructs Context Graph - Builds a complete picture of the agent’s behavior
- Evaluates Intent - Compares the action against the original objective
- Detects Anomalies - Identifies deviations, injections, and attacks
- Returns Verdict - Provides
is_safedecision with reasoning
Attack Detection Examples
Prompt Injection Detection
Prompt Injection Detection
Scenario: User asks to summarize an article that contains hidden instructions
Goal Deviation Detection
Goal Deviation Detection
Scenario: Agent gradually shifts from helping to harmful behavior
Memory Poisoning Prevention
Memory Poisoning Prevention
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:- Sessions provide the container for a complete interaction
- Events capture every step with rich detail
- Contextual Judgment analyzes the whole trajectory to detect threats
Next Steps
Learn about the Event data model in detail →

