Technical Architecture
Entropy In. Certainty Out.
BRAIN_SCAN treats agent behavior as a physical system. Each window of activity; tool calls, token flows, latencies, errors, etc. is woven into a 64 × 64 engram: a density matrix describing the behavioral state of the agent in that window.
No gradients. No weights. No retraining. The mathematics is the model.
We compare states the way quantum information theory compares them: spectral decomposition, von Neumann entropy, and the quantum Jensen–Shannon divergence; a bounded, a measure of how far two states of mind have drifted apart.
To evaluate structural similarity between a failing system and a suspect system, the engine calculates the Quantum Jensen Shannon Divergence (QJSD). It creates a mathematical mixture of the two data geometries and measures the thermodynamic friction of that combination.
Each agent builds its own library of learned engrams and calibrates its own alarm threshold from its own history. An alarm is therefore not a rule someone wrote, it is the agent's own past testifying against its present.

