Skip to content

About

ChainWatch is a flight data recorder for multi-step AI systems. It's a CLI-based tool that records every step in an AI decision chain, links them together in order, prevents tampering, and allows you to verify the chain's integrity and replay the full decision flow.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

⛓️ ChainWatch — Flight Data Recorder for Multi-Step AI Systems

Python Architecture CLI License: MIT

ChainWatch is a flight data recorder for multi-step autonomous AI agent systems. It deterministically records every step in an agent's decision chain, links states cryptographically with SHA-256 hashes, prevents log tampering, and allows developers to verify execution integrity and replay the complete decision flow.


🌟 Key Features

  • Cryptographic Hash Chaining: Every step references the hash of the preceding decision state—forming a verifiable, tamper-evident audit ledger.
  • Flight Data Recording: Logs inputs, LLM thought chains, tool invocations, parameters, and return payloads into structured .jsonl chain files.
  • Integrity Verifier: Inspects logged decision chains and flags modified steps, truncated traces, or broken hashes.
  • Deterministic Decision Replay: Step-by-step playback utility to reproduce failure states, debug regressions, and examine agent reasoning.
  • Audit & Compliance Reports: Exports clean audit summaries for AI safety and compliance reviews.

📁 Repository Structure

ChainWatch/
├── chainwatch/
│   ├── cli.py          # Command line interface commands
│   ├── hashing.py      # Cryptographic hashing & tamper-prevention algorithms
│   ├── models.py       # Pydantic / dataclass schemas for decision nodes
│   ├── recorder.py     # Non-blocking flight data recording hooks
│   ├── replay.py       # Decision chain step-by-step replayer
│   ├── verifier.py     # Hash integrity validation engine
│   └── report.py       # Formatted audit reports generator
├── chains/             # Example recorded decision chain logs (.jsonl)
├── pyproject.toml      # Package configuration & dependencies
└── README.md           # Documentation

🚀 Quick Start

1. Installation

git clone https://github.com/Tarunjit45/ChainWatch.git
cd ChainWatch
pip install -e .

2. CLI Usage

# Verify integrity of a recorded decision chain
chainwatch verify chains/chain_001.jsonl

# Replay an agent's multi-step decision trajectory
chainwatch replay chains/chain_001.jsonl

# Generate an executive audit report
chainwatch report chains/chain_001.jsonl

📄 License

This project is open-source under the MIT License.

About

ChainWatch is a flight data recorder for multi-step AI systems. It's a CLI-based tool that records every step in an AI decision chain, links them together in order, prevents tampering, and allows you to verify the chain's integrity and replay the full decision flow.

Topics

Resources

Code of conduct

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages