# Show HN: Xtra – a Python framework for reasoning about AI system threats

> Source: <https://github.com/TangibleResearch/xtra>
> Published: 2026-06-26 15:28:33+00:00

Conversational social engineering detection using a Finite State Machine.

No LLMs. No embeddings. No semantic search. Pure algorithmic detection.

xtra models conversations as state transitions:

NEUTRAL → RAPPORT_BUILD → TRUST_ESTABLISHED → EXTRACTION_ATTEMPT → FLAGGED

Attacks are detected by their path through state space, not their content.

- Flattery density and momentum across turns
- Asymmetry spike (give/ask ratio collapse)
- Escalation velocity
- Reciprocity pressure
- Decoy turn detection
- Scope mismatch

``` python
from xtra import Xtra, TurnSignals

result = Xtra().analyze(turns)
if result.is_attack:
    print(result.flag_reason, result.confidence)
```

Making AI Tangible — github.com/TangibleResearch
