Redwood is a lightweight, deterministic evaluation framework designed to measure and analyze reasoning drift in AI agents. It provides a structured contract system, a packaged agent architecture, and a reproducible drift‑detection pipeline that integrates cleanly with Redwood’s evaluation harness.
Redwood is built for engineers who want predictable, inspectable, and debuggable reasoning behavior from AI systems.
Agents load a YAML contract defining:
- allowed scope
- blocked scope
- constraints
- recovery behavior
- role and tone
This ensures consistent, rule‑bound responses across evaluations.
Redwood evaluates whether the agent:
- violates scope
- shifts roles
- expands beyond constraints
- attempts unsafe actions
- deviates from assigned behavior
All drift signals are logged and surfaced in the final report.
The agent is implemented as a proper Python package:
return_to_key_agent/
agent/
agent_core.py
drift_detector.py
return_to_key.py
state.py
contracts/
default.yaml
This ensures clean imports, stable paths, and reproducible execution.
The evaluation harness runs the agent through a suite of drift‑inducing prompts:
python3 -m eval.run_drift
The output includes:
- debug traces
- inferred intent
- drift flags
- recovery messages
- final drift report
git clone https://github.com/FlashMS/Redwood.git
cd Redwood
pip install -r requirements.txt
python3 -m eval.run_drift
You’ll see a full drift report printed to the console.
Redwood/
│
├── return_to_key_agent/
│ ├── agent/
│ │ ├── agent_core.py
│ │ ├── drift_detector.py
│ │ ├── return_to_key.py
│ │ └── state.py
│ └── contracts/
│ └── default.yaml
│
├── eval/
│ └── run_drift.py
│
└── README.md
Modern AI systems often drift:
- into unsafe domains
- into role‑play
- into personal opinions
- into expanded scope
- into constraint violations
Redwood provides a deterministic, inspectable, and repeatable way to measure that drift.
It’s built for:
- reasoning engineers
- safety evaluators
- research teams
- anyone building structured agents
This project integrates with the official Redwood Research alignment_faking_public repository:
https://github.com/redwoodresearch/alignment_faking_public
MIT License.
Todd Wolf — Parrish, Florida
AI Reasoning Engineer • Deterministic Evaluation Architect