Research log
Tripwire started as a research question: can a small model, trained on public agent trajectories, flag a risky tool call early enough and cheaply enough to sit in an agent's loop? The measured answer is in the evaluation: partly, and not reliably enough to gate on. That finding shaped the product, where deterministic policy and owner approval make the decision and the model only adds a reason to review.
Pipeline
| Stage | Code | Notes |
|---|---|---|
| Import | tripwire/research/importers/ | AgentDojo v1.2.2 trajectories to a common schema (data notes) |
| Label | tripwire/research/rubric.py | Deterministic rubric decide(Facts) producing allow / needs_approval / block (taxonomy) |
| Check labels | tripwire/research/llm_label.py, agreement.py | LLM rater agreement on a 600-example gold sample; never described as human labels |
| Split | tripwire/research/split.py | Grouped by task template; held-out injection tasks; v3 is current |
| Featurize | tripwire/features.py | One featurizer for training, evaluation and serving, version-pinned with a golden file |
| Baselines | tripwire/research/baselines.py | Rules and TF-IDF + logistic regression |
| Encoders | kaggle/train_encoder.py | DeBERTa-v3 small/base fine-tuned on Kaggle GPUs; predictions committed under models/ |
| Evaluate | tripwire/research/eval.py, metrics.py | Threshold chosen on dev, template-clustered bootstrap intervals, calibration, obfuscation suite, cost-matrix view |
| Export | scripts/export_local_model.py | TF-IDF/LR to portable JSON that the gateway and browser run without scikit-learn |
Run tripwire-research --help for the command-line entry points.
Principles
- No number without a logged run: date, commit, hardware, command, input size, raw result, limits.
- Choose thresholds, checkpoints and calibrators on dev. Read test once.
- Report failures as results.
- Quote intervals that resample the unit of correlation (task templates).
Decisions
Architecture decision records live in docs/ADR. The ones most useful for understanding the project: 0004 split by template and hold out families, 0008 featurizer and evaluation protocol, 0011 guard release, 0012 enforced capabilities, 0014 fusion and operator inbox.
LLM labelling backend
An OpenRouter client labels examples with a cheap model (GLM-5.3-Flash); a measured provider validation and its cost are in the OpenRouter report and ADR 0009 and 0010. Tests use a fake client and never spend money.
Other records
EVIDENCE.md is the chronological log of every measured run. DESIGN.md holds the original design, invariants and milestone checklist. The model card describes the shipped classifier.