RFTSystems commited on
Commit
99c13a6
·
verified ·
1 Parent(s): 57bc670

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +105 -0
README.md CHANGED
@@ -10,5 +10,110 @@ pinned: false
10
  license: other
11
  short_description: Tamper-evident, hash-chained event logging for AI/agent runs
12
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
10
  license: other
11
  short_description: Tamper-evident, hash-chained event logging for AI/agent runs
12
  ---
13
+ # RFT Agent Flight Recorder — Black Box Behaviour Trace
14
+
15
+ A proof-first flight recorder for AI/agent runs. This Space writes an **append-only, hash-chained event log** so you can verify **what happened, when it happened, and what triggered it**—without taking anyone’s word for it.
16
+
17
+ It’s built to be boringly audit-friendly: deterministic hashing, optional Ed25519 signatures, session verification, and exportable proof bundles that third parties can check.
18
+
19
+ ---
20
+
21
+ ## What this Space does
22
+
23
+ ### ✅ Records a tamper-evident timeline
24
+ Each action becomes an **event** (JSON) written to `flightlog.jsonl`:
25
+
26
+ - `prompt`
27
+ - `output`
28
+ - `tool_call` / `tool_result`
29
+ - `memory_read` / `memory_write`
30
+ - `retrieval`
31
+ - `policy_block`
32
+ - `error`
33
+ - `note`
34
+
35
+ Every event includes:
36
+
37
+ - `seq` (monotonic step number)
38
+ - `ts_utc` (timestamp)
39
+ - `prev_event_hash_sha256` (links to previous event)
40
+ - `event_hash_sha256` (hash of this event)
41
+ - optional `signature_ed25519` (Ed25519 signature)
42
+
43
+ If any event is edited, removed, or reordered, verification fails.
44
+
45
+ ### ✅ Verifies sessions end-to-end
46
+ The verifier recomputes hashes and confirms the chain is intact. Optionally, it can require a valid signature on every event.
47
+
48
+ ### ✅ Exports proof bundles
49
+ Exports `rft_flight_bundle_<session_id>.zip` containing:
50
+
51
+ - `<session_id>_events.jsonl` (the session timeline)
52
+ - `<session_id>_verify_report.txt` (verification report)
53
+
54
+ ### ✅ Imports and verifies third-party bundles
55
+ Upload a bundle and verify it locally. Optionally store PASSed events into your local `flightlog.jsonl`.
56
+
57
+ ---
58
+
59
+ ## How to use
60
+
61
+ ### 1) Generate keys (optional)
62
+ Go to **Keys** → **Generate Keypair**.
63
+
64
+ - **Private key** signs events (keep it private).
65
+ - **Public key** verifies signatures (safe to share).
66
+
67
+ > demo note: don’t paste production private keys here.
68
+
69
+ ### 2) Start a session
70
+ Go to **Start Session** → **Start New Session**.
71
+ Copy the `session_id`.
72
+
73
+ ### 3) Record events
74
+ Go to **Record Event** and append events as they occur.
75
+
76
+ Payload accepts:
77
+ - JSON (recommended)
78
+ - plain text (stored under `_text`)
79
+
80
+ If `parent_event_hash_sha256` is left empty, it defaults to the previous event hash (simple linear causality).
81
+
82
+ ### 4) View timeline
83
+ Go to **Timeline** → **Load timeline**.
84
+
85
+ ### 5) Verify
86
+ Go to **Verify Session** → **Verify**.
87
+
88
+ Enable “Require signatures” only if you signed every event.
89
+
90
+ ### 6) Finalise + Export
91
+ Go to **Finalise + Export**:
92
+ - **Finalise session** creates a session anchor.
93
+ - **Export session bundle** produces the ZIP proof bundle.
94
+
95
+ ### 7) Import bundle (third-party verification)
96
+ Go to **Import Bundle**, upload `rft_flight_bundle_*.zip`, and verify.
97
+ If you want to retain verified sessions, tick **Store imported events**.
98
+
99
+ ---
100
+
101
+ ## Data format (high-level)
102
+
103
+ ### Event (simplified)
104
+ ```json
105
+ {
106
+ "spec": "rft-flight-event-v0",
107
+ "ts_utc": "2026-01-08T12:34:56.789+00:00",
108
+ "session_id": "…",
109
+ "seq": 3,
110
+ "event_type": "tool_call",
111
+ "parent_event_hash_sha256": "…",
112
+ "prev_event_hash_sha256": "…",
113
+ "payload": { "tool": "search", "input": { "q": "…" } },
114
+ "meta": { "model_id": "audit-demo", "run_mode": "deterministic" },
115
+ "event_hash_sha256": "…",
116
+ "signature_ed25519": "…" // optional
117
+ }
118
 
119
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference