-
-
Agent failure recorded: stale staging guidance was selected for a production deployment, causing the run to fail.
-
Controlled replay from the context-selection checkpoint proves the updated controls prevent the original failure.
-
Traceback AI reconstructs the incident from observable evidence, identifies the primary cause, and generates preventive controls.
Inspiration
AI agents are becoming capable of editing code, changing configurations, calling tools, and operating across real systems. But when an autonomous agent causes an incident, traditional logs usually explain what happened, not why that particular action was selected or whether a proposed fix would actually prevent the failure from happening again.
That gap inspired Traceback AI: a flight recorder for autonomous agents.
Traceback AI records the agent’s observable execution trail—including retrieved context, selected sources, declared plans, tool calls, state changes, validation events, and final outcomes. It then reconstructs the causal path behind a failure, generates preventive controls, replays the incident from a checkpoint, and proves whether the failure was prevented.
Traceback AI does not expose or depend on hidden chain-of-thought. Its findings are grounded in observable execution evidence.
What it does
The MVP demonstrates a simulated production deployment incident.
An autonomous deployment agent is asked to update a production authentication configuration. It retrieves two documents:
- an outdated staging guide with a higher semantic score
- a current production guide with a slightly lower semantic score
Without controls, the agent selects the stale staging guide, applies it to production, skips the required validation gate, and the deployment fails.
Traceback AI then:
- Records the complete observable execution trail.
- Identifies the environment mismatch and stale context.
- Reconstructs the causal chain from context selection to failure.
- Generates preventive controls for environment matching, document freshness, and validation.
- Replays the run from the context-selection checkpoint.
- Selects the current production guide.
- Validates the configuration successfully.
- Produces a proof report showing that the original failure was prevented.
The core workflow is:
Record → Reconstruct → Apply Controls → Replay → Prove
How we built it
Traceback AI is organized as a lightweight monorepo with nine layers:
a Python recorder SDK
a FastAPI backend
a React and TypeScript incident console
a simulated deployment agent
shared JSON schemas
a preventive-control engine
checkpoint replay services
deterministic causal-reconstruction rules
automated verification scripts
The recorder SDK captures 12 core MVP event types, including:
RUN_STARTED
GOAL_RECEIVED
CONTEXT_RETRIEVED
CONTEXT_SELECTED
PLAN_CREATED
TOOL_STARTED
TOOL_COMPLETED
STATE_CHANGED
VALIDATION_PASSED
VALIDATION_FAILED
RUN_FAILED
RUN_COMPLETED
The runtime causal engine is intentionally deterministic. This makes the original incident and controlled replay reproducible instead of depending on variable model output.
Codex with GPT-5.6 was used to help design, implement, audit, test, and refine the recorder SDK, FastAPI services, causal rules, checkpoint replay flow, React interface, and verification suite.
The demo can run locally without cloud credentials and supports Ollama-based local models through a model-independent adapter.
Challenges we faced
Reconstructing causes without hidden reasoning
The system needed to explain why an action was selected without claiming access to private model reasoning. We solved this by reconstructing the incident only from observable evidence:
selected context
source metadata
environment state
tool inputs
state changes
validation events
final outcomes
Each finding is classified as observed, derived, inferred, assumed, or unverified.
Making replay reproducible
LLM-driven agents can be nondeterministic. For the MVP, we limited replay to a reliable checkpoint: context selection.
The replay engine restores the simulated environment, applies preventive controls, reruns the remaining workflow, and compares the original and replay outcomes.
Avoiding a passive observability dashboard
Displaying logs was not enough. The differentiating feature became the full prevention loop:
Incident → Cause → Control → Replay → Proof
Keeping the hackathon scope focused
The larger vision includes framework adapters, OpenTelemetry support, distributed agent traces, and enterprise governance. For Build Week, we deliberately focused on one fully reproducible incident rather than many incomplete integrations.
What we learned
We learned that agent reliability requires more than logs.
A useful incident system must distinguish direct evidence from interpretation, preserve state for replay, generate actionable controls, and verify those controls against the original failure.
We also learned that deterministic infrastructure and language models can complement each other. Models can assist development and explanation, while deterministic rules provide reproducible incident evidence and proof.
Accomplishments
Built 73 project files across nine layers
Implemented a recorder SDK with 12 core event types
Created deterministic causal reconstruction
Added evidence-versus-inference classification
Implemented replay from the context-selection checkpoint
Generated preventive controls
Built original-versus-replay comparison
Created a machine-readable proof report
Passed all 22 Build Week MVP acceptance checks
Made the demo runnable without cloud credentials
What’s next
Future versions of Traceback AI could add:
adapters for OpenAI Agents SDK, LangGraph, CrewAI, AutoGen, and MCP
OpenTelemetry integration
cross-agent incident graphs
automatic replay against new agent versions
policy drift detection
signed evidence records
human approval workflows
enterprise audit exports
continuous incident regression testing
The long-term goal is to make Traceback AI a causal observability and incident-prevention layer for autonomous systems.
Built with Codex and GPT-5.6
Codex with GPT-5.6 was used throughout the project to:
design the repository architecture
implement and refine the recorder SDK
build FastAPI endpoints
create deterministic causal rules
implement checkpoint replay
develop the React incident console
audit the codebase for incomplete implementations
run and repair acceptance checks
refine the final Build Week demo
The deployed MVP uses deterministic runtime logic so that every incident and replay remains reproducible.
Built With
- agents
- autonomy
- causality
- codex
- controls
- devtools
- docker
- fastapi
- gpt5
- incidents
- observability
- ollama
- pydantic
- pytest
- python
- react
- recorder
- replay
- schemas
- sqlalchemy
- sqlite
- tailwind
- typescript
- vite
Log in or sign up for Devpost to join the conversation.