OPEN SOURCE · COMPTEX LABS

Autonomous AI has
no kill switch.
We built one.

Your AI agents spend money 24/7 with nobody watching. TrustLog Dynamics applies quantitative finance risk frameworks — convexity detection, variance analysis — to terminate rogue processes before they drain your budget.

LIVE SIMULATION — CONVEXITY BREACH DETECTION
COST ($)
TIME →
KILL — d²C/dt² > 0
01 — Thesis
Unchecked automation is a
solved problem — in finance
In financial markets

When a trading algorithm spirals on the London Stock Exchange, circuit breakers halt it within milliseconds. When a portfolio's Value-at-Risk breaches its limit, systems liquidate positions automatically. When a flash crash threatens market stability, the entire exchange pauses. These mechanisms have protected trillions in capital for decades.

In autonomous AI

A context window that compounds exponentially costs hundreds of pounds in minutes. An agent trapped in a retry loop burns tokens indefinitely. A recursive chain with no exit condition drains an entire monthly budget overnight. The failure modes are identical — exponential acceleration, mechanical repetition, unchecked feedback loops — yet none of the safeguards exist.

$7.3B
spent on autonomous AI agents in 2025 — with no financial governance layer between the model and the billing API. OpenClaw alone has 180,000+ users deploying agents around the clock.

TrustLog Dynamics exists because this gap shouldn't. The maths isn't new. The application is.

"2026 will see the wide-scale enterprise adoption of a new non-negotiable category of AI governance tools. This essential circuit-breaker layer will provide continuous discovery and posture management for all AI assets."
Harvard Business Review · December 2025
Detection Framework
Fixed-income risk management
d²C/dt² > 0
→ KILL
Convexity detection. When C (cumulative cost) accelerates over t (time), the agent is snowballing. Terminate at the inflection point.
Statistical process control
σ² < ε
→ KILL
Zero-variance detection. When σ² (rolling cost variance) drops below ε (threshold), the agent is stuck in a loop. Sever the connection.
02 — Empirical Evidence
Two providers. Two failures.
Both caught on camera.
We tested TrustLog Dynamics against real LLM agents in live-fire conditions. No simulations. No mock data. Real agents, real costs, real intercepts.
CLAUDE 4.6 SONNET Snowball intercept
The agent experienced a context-window explosion triggered by a terminal traceback error. Each cycle compounded the previous, causing exponential API cost acceleration. TrustLog's convexity detector identified the positive second derivative and executed a system-level kill at the inflection point — before the cost curve went vertical.
✓ Terminated — cost curve arrested at inflection point
GEMINI 3.1 PRO Machine gun intercept
The agent became trapped in a mechanical retry loop after hitting a Cloudflare 403 block, burning £0.0051 per call indefinitely with no exit condition. TrustLog's zero-variance detector identified the near-zero σ² across consecutive calls and severed the connection immediately.
✓ Terminated — loop broken at zero variance
Model-agnostic by design. We govern the cost layer, not the compute layer. It doesn't matter which model your agent runs — your spend is protected.
03 — Where This Is Going
We're not building a tool.
We're defining a field.
Circuit breakers didn't exist until after the 1987 crash. Risk limits didn't exist until after Long-Term Capital Management collapsed. Financial governance has always been built in response to disaster. We're not waiting for the AI equivalent.
I
Every AI agent will carry a cost-at-risk score — we're writing the framework
Value-at-Risk gave every bank a single number to quantify exposure. There is no equivalent for AI operations. We're building it. Cost-at-Risk (CoaR) — a probabilistic measure of maximum expected AI spend over a given period, Derived from token velocity, context-window trajectory, model-switching patterns and historical cost distributions. Convexity and variance detection are the first two inputs. The full model is in development. When it's published, it becomes the industry benchmark — because nobody else is working on this.
II
Regulators are coming. We'll already be there.
Singapore published the first state-backed AI agent governance framework in January 2026. The EU AI Act is classifying autonomous systems by risk tier. The UK FCA has signalled interest in AI operational resilience. Every one of these frameworks will eventually require what TrustLog already does — kill switches, audit trails, cost limits, anomaly detection. The question isn't whether autonomous AI will be regulated like financial instruments. It's when. We're building the compliance infrastructure now so that when the mandate arrives, we don't have to scramble. We're already compliant.
III
AI FinOps will be a $10B discipline. We intend to own the foundation layer.
Cloud computing created FinOps — a practice that didn't exist before 2015 and now underpins every enterprise cloud deployment. It created Datadog ($35B), CloudWatch, New Relic and an entire ecosystem. Autonomous AI agents will create AI FinOps — the discipline of monitoring, governing and optimising AI spend at scale. The market has $7.3B in agent spend today with zero governance infrastructure. We're not competing for a slice of an existing market. We're building the infrastructure layer for a market that's about to exist. First-mover advantage doesn't expire.
04 — Questions We Get Asked
Sharp questions deserve honest answers
Why financial maths instead of standard anomaly detection? +
Because the problem isn't anomaly detection — it's risk governance. Standard anomaly detection tells you something unusual happened. Financial risk frameworks tell you whether the unusual thing is going to cost you money and how fast. A z-score anomaly detector would flag both a legitimate cost spike during a heavy research task and a rogue retry loop. Convexity detection doesn't — it specifically identifies accelerating spend, which is the signature of an out-of-control process, not a busy one. We chose frameworks with decades of empirical validation in high-stakes capital environments because AI cost governance is a high-stakes capital problem.
What about false positives? Legitimate workloads can be expensive. +
This is the right question. A legitimate deep research task might cost £5 in a single session — that's not a rogue agent, that's a productive one. TrustLog's convexity trigger doesn't fire on high cost. It fires on accelerating cost — the second derivative, not the first. A steady £5 spend over 30 minutes has zero convexity. A £0.50 spend that doubles every 60 seconds has extreme convexity. The zero-variance trigger has the inverse property — it only fires when cost per call is mechanically identical, which never happens in legitimate work because real tasks produce variable token counts. Both thresholds are user-configurable to match specific workload profiles.
Two threshold checks — isn't that trivially simple? +
Yes. Deliberately. The most effective circuit breakers in finance are simple. The NYSE's Rule 80B halts trading when the S&P drops 7% — that's one threshold check, and it's protected the world's largest stock market since 1988. Complexity in safety systems is a liability, not a feature. Every additional parameter is a point of failure, a tuning problem and a latency cost. TrustLog's detection engine is two checks that run in under a second with zero dependencies. Simplicity is the design choice, not the limitation. The sophistication is in knowing which two checks to run — and that comes from understanding both the financial mathematics and the AI failure modes.
How is this different from just setting a hard spending cap? +
A hard cap is a blunt instrument. Set it at £10 and your agent dies in the middle of a legitimate £12 task. Set it at £50 and a rogue agent burns £49.99 before anyone notices. Hard caps don't distinguish between productive spend and wasteful spend — they only know when a number has been reached. TrustLog detects the pattern of spend, not the amount. It kills an agent burning £0.50 in a retry loop just as effectively as one burning £50 in a context explosion — because the mathematical signature of a rogue process is the same regardless of the absolute cost. A hard cap is a wall. TrustLog is a circuit breaker. One stops everything. The other stops only what's broken.
Is this relevant for locally-hosted models or only API-based agents? +
Both. The current implementation monitors API call logs — cost per call, token counts, timestamps — which applies directly to any cloud-based LLM provider. For locally-hosted models through Ollama or similar, the cost isn't in API fees but in GPU compute time, electricity and opportunity cost of the hardware being occupied by a stuck process. The detection mathematics is identical — a local model stuck in a loop still produces zero-variance resource consumption. The monitoring input changes from API billing data to system resource metrics, but the convexity and variance frameworks apply universally. Expanding to local model monitoring is on our development path.
05 — Install
Three commands. Nothing else.
Clone, install, run. TrustLog Dynamics runs as a systemd daemon in the background. Once it's up, it's watching.
# Clone git clone https://github.com/AnouarTrust/Trustlog-dynamics.git cd Trustlog-dynamics # Install chmod +x install_trustlog.sh ./install_trustlog.sh # Run python3 trustlog_governor.py
Open source under MIT licence. Full documentation on GitHub.
06 — Built by Doing
We ship first. Then we refine.
Research through deployment.
TrustLog Dynamics isn't a theoretical framework waiting for validation. It's deployed, it's running and the intercepts on this page are from live agents on real infrastructure. We believe the best way to develop AI governance is to govern actual AI. Not to model hypothetical failures in a lab. Every deployment teaches us something a whiteboard never will.
We don't have all the answers yet.
Convexity and zero-variance detection are the first two triggers. They catch the most obvious failure modes, the ones that cost people money overnight. But autonomous AI will find new ways to fail that we haven't seen yet and the framework needs to grow with it. That's why we're building in public, publishing our methods and sharing our data. The problem is too important to solve behind closed doors.
Measure what actually matters.
The metric that matters isn't how many anomalies we detect. It's how much money we save people who are building with AI. If TrustLog kills a rogue process and the user didn't even notice, that's a success. If it kills a process and the user loses their work, that's a failure we need to learn from. We optimise for the outcome, not the activity.
07 — Contribute
This problem belongs to everyone.
TrustLog Dynamics is open source because no single team can solve AI cost governance alone.
If you're a researcher working on AI safety, operational risk or financial governance, we'd welcome a conversation about where this framework could go next. If you're an engineer running autonomous agents and want to help stress-test the detection engine, the repo is open and waiting. If you're a professor or institution interested in the intersection of quantitative finance and AI governance, we are actively looking for academic collaborators to formalise and extend this work.
This isn't a finished product asking for applause. It's an open framework looking for the right minds to make it better.
Follow @Anouarbf2 on X
Contribute on GitHub
anouarvis1@gmail.com
Your AI agents work while you sleep.
TrustLog Dynamics makes sure they don't rob you while you dream.