Back Home

AI 代理/可靠性

AgentTrajectorySentinel Uses Microsecond-Level Temporal Monitoring to Stop Agents From Going Off the Rails, Raising Task Success Rate From 52% to 73% in Tests

A new study replaces step-by-step review by a second LLM with trajectory-drift detection based on telemetry such as tool actions, latency, outputs, and token probabilities. The system costs about 200 microseconds per step, but each deployment must recalibrate it using its own normal trajectories.

Adrian Pingstone (Arpingstone) · Public domain · Image source
zh-Hant

LLM agents performing multi-step tasks may repeatedly call tools, continue acting on incorrect results, or drift away from their objective before completion. Having another large model evaluate every step adds latency and cost comparable to rerunning the agent, while the judge itself may make mistakes. AgentTrajectorySentinel, released on August 3, instead uses a lightweight temporal model to monitor observable signals during execution and connects alerts to rollback-and-retry workflows.

The monitor represents each step using semantic embeddings, token log-probability statistics, and metadata such as action type, latency, output length, and error flags. At its core is an echo-state network trained only on normal trajectories, paired with a CUSUM cumulative-shift detector. Each signal channel is scored independently, and an alert is triggered when any channel crosses its threshold. For tasks that can be verified precisely, the system also adds deterministic checks—for example, recalculating totals from the tool results actually received by the agent and confirming that all required calls were executed—to avoid relying entirely on statistical anomalies.

The author collected 2,823 trajectories across three agent frameworks, three local models, and Gemini 2.5 Flash. With a 5% false-alarm budget, the primary monitor detected 71% of failures and achieved an AUROC of 0.872. In rollback-and-rerun experiments involving a booking agent, it repaired 45% of failures, compared with 16% for a random-resampling control, raising the overall success rate from 52% to 73%. Median processing time was about 200 microseconds per step, and the model state occupied approximately 4 MB.

The limitations are equally important. Although the monitor retains ranking ability across datasets, its alert thresholds cannot be transferred directly; without recalibration, AUROC fell to just 0.527. Short trajectories may also end before anomalies form a recognizable pattern, and errors in textual content are generally harder to detect than behavioral failures. Engineering teams should therefore treat the system as a low-cost first-line gate, combined with business invariants, permission restrictions, and a small number of higher-cost judges—not as complete proof of agent correctness. The code, pinned dependencies, data card, and reproduction commands have been released, but the findings currently come from a single-author preprint and still await independent replication.

Sources

  1. Real-Time Detection and Repair of LLM Agent Failures
  2. AgentTrajectorySentinel repository