Back to docs
Part IV · AlgoLens Whitepaper

Universal Trace Engine

The execution record at the heart of AlgoLens.

The core of AlgoLens is not the interface, API, or CLI. It is the trace engine. Everything else is a way to look at that truth.
Single-section article

From execution to reusable truth

A Universal Trace is a chronological sequence of events and snapshots. Unlike a video, it is interactive: users can pause, scrub, filter, search, annotate, compare, export, and explain it. Unlike a log, it is structured data intended for humans, APIs, renderers, IDEs, analytics systems, and AI models.

The engine captures control-flow events, variable changes, data-structure updates, semantic algorithm operations, system warnings, timeouts, memory limits, and errors. Each step may include the active line, variables, structures, call stack, semantic operation, renderer state, complexity counters, and explanation anchors. Full snapshots make arbitrary navigation fast, while compression strategies reduce duplication.

The trace engine runs around an event bus. The runtime emits events, the trace builder assembles them, semantic analyzers enrich them, renderers consume the relevant subset, exporters transform them, and AI reads the final truth. This event-driven design makes plugins, analytics, export pipelines, and future SDKs possible without changing the core.

Source Code
  ↓
Instrumentation Engine
  ↓
Runtime Execution
  ↓
Event Capture Pipeline
  ↓
Universal Trace Engine
  ├─ Web
  ├─ API
  ├─ CLI
  ├─ Exporters
  └─ AI Explanation Layer
A trace is not a video because it remains interactive and queryable.
A trace is not a log because it is structured, typed, and renderer-friendly.
Snapshots favor instant navigation; compression mitigates data size.
Determinism allows identical input, code, and engine versions to produce identical trace signatures.