Field Recorder — Setup Guide

The Field Recorder is a black box for your deployed AI. It wraps your model's inference calls and produces a tamper-evident, cryptographically signed log of every decision your model makes in the field — which model, on which device, given what input (as a privacy-safe digest), produced what output.

When a customer, an auditor, or a regulator asks "prove what your AI actually did on that device," the Field Recorder is your answer. It's built to satisfy EU AI Act Article 12 (automatic record-keeping for high-risk AI systems).

Why it's trustworthy

Every recorded event is hash-chained to the one before it (like a blockchain) and signed with an Ed25519 key. If anyone alters or deletes a single event after the fact, the chain breaks and verification fails. That's what makes it evidence, not just a log file.

Setup — 3 steps

1. Install the SDK on the device running your model

pip install edgegate-runner

2. Wrap your inference call

from edgegate.bg.recorder import EdgeGateRecorder

recorder = EdgeGateRecorder(
    workspace_id="<your-workspace-id>",   # from your dashboard URL
    model_path="/path/to/your/model.onnx",
    device_id="my-device-01",             # any stable name for this device
    silicon_id="jetson-orin-nano",        # optional: the chip
    quantization="int8",                  # optional: helps forensics
)

Then record — three styles, pick whichever fits your code:

# A) Context manager (most explicit)
with recorder.record(input_data) as ctx:
    output = my_model.predict(input_data)
    ctx.set_output(output, confidence=0.95)

# B) Decorator (wrap an existing function)
@recorder.wrap
def predict(input_data):
    return my_model(input_data)

# C) Manual (one line after your prediction)
output = my_model.predict(x)
recorder.log(input=x, output=output, confidence=0.95)

When your process shuts down, flush and push to the cloud:

recorder.close()
recorder.sync(api_key="egk_...")   # from Settings -> API Keys

Recording vs syncing (and where the API key comes in)

  • Recording is local, offline, and needs no API key — events are signed and buffered on the device, so it works air-gapped and never blocks your inference.
  • Syncing (recorder.sync(api_key=...)) uploads those buffered events to your EdgeGate dashboard. This is the only step that needs an API key (Settings → API Keys, available on paid plans). Call it periodically or on shutdown — already-synced events are skipped. On its first call, sync also registers this device's signing key with EdgeGate so the cloud can verify every event's signature — no separate provisioning step.

So you can record for free and offline; the dashboard timeline, replay-divergence, and Article-12 export are what the API key unlocks.

3. Watch decisions arrive on the dashboard

Open Field Recorder in your workspace. Recorded events sync to the timeline — each one signed and chain-verified. From there you can:

  • Export an Article-12 report — a signed bundle for your compliance team.
  • Replay a flagged decision against the certified model to see whether the on-device model diverged.

What leaves the device (privacy)

  • Never leaves: your raw inputs and raw model outputs. The recorder stores only digests (one-way hashes) of them.
  • Leaves: the signed event metadata — model hash, device id, silicon, confidence, latency, timestamp, and the chain signature.

So you get a verifiable audit trail without shipping sensitive data off the device.

Troubleshooting

SymptomFix
No events on the dashboardConfirm the process actually called a wrapped inference; check the device can reach edgegateapi.frozo.ai.
Chain verification failedThe event buffer was edited or partially copied — start a fresh buffer directory; never hand-edit recorded events.
model_path errorPoint it at the real model file the device loads, not a directory.

What it is NOT

The Field Recorder is tamper-evident, not tamper-proof — it makes alteration detectable, which is exactly what an audit needs. And it produces evidence; whether that evidence satisfies a specific regulation is a call for your compliance team and the auditor, not something any tool can guarantee.

Questions? See the Integration guide or reach out from your dashboard.