Skip to content

research(routing): Agent Stability Index for behavioral drift detection #1841

@bug-ops

Description

@bug-ops

Research Finding

Paper: Agent Drift — Behavioral Degradation Quantification and Drift-Aware Routing (arXiv:2601.04170, 2025)

Proposes "Agent Stability Index" (ASI) measuring behavioral consistency over extended interactions. Quantifies how multi-agent systems degrade in persona, task coherence, and output style over long sessions. Drift-aware routing uses ASI as a routing signal alongside latency/quality metrics.

Applicability to Zeph

Known blind spot: Zeph has no runtime behavioral consistency metric. The Thompson Sampling router uses latency EMA + success/failure counts but has no signal for response coherence drift.

Two concrete improvements:

1. ASI as routing signal

Add a coherence_score to ProviderStats in the Thompson Sampling router:

  • Measure response embedding similarity to recent N responses (sliding window)
  • High variance → low coherence → penalize in routing prior
  • Works with existing EmbeddingStore — embed each response, compare cosine to window mean

2. Episodic consolidation to prevent context drift

When ASI drops below threshold during a long session, trigger a lightweight episodic consolidation (summarize recent N turns into a stable anchor) before the next LLM call. Prevents the gradual persona/context drift observed in sessions with many compactions.

References

  • arXiv:2601.04170
  • Zeph crates: zeph-llm (router/thompson.rs, ema.rs), zeph-memory (semantic/)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4Long-term / exploratoryresearchResearch-driven improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions