Back to KB
Difficulty
Intermediate
Read Time
6 min

AGEF explained: a portable evidence format for AI agent sessions

By Codcompass Team··6 min read

Current Situation Analysis

In regulated codebases where AI-assisted code is shipped, auditors and compliance teams frequently ask: "show me what the agent did." Teams typically have about a week before that question escalates into a formal finding. The raw data exists somewhere in logs, databases, or ephemeral memory, but it fails three critical governance requirements:

  • Fragmented Shape: Evidence is scattered across proprietary session recordings, unstructured JSON/CSV logs, and model provider APIs. There is no unified schema.
  • Poor Portability: Traditional session dumps are tightly coupled to specific vendor toolchains, making cross-tool verification or archival impossible.
  • Lack of Tamper Evidence: Standard logging lacks cryptographic linkage. Events can be dropped, reordered, or modified without detection, rendering them useless for compliance audits or incident forensics.

Traditional methods fail because they prioritize developer convenience over cryptographic integrity. They lack content-addressing, deterministic ordering, and standardized verification procedures, leaving organizations vulnerable to audit failures and unverified AI-generated changes.

WOW Moment: Key Findings

Benchmarks comparing traditional logging, proprietary session dumps, and AGEF v0.1 bundles demonstrate significant improvements in verification speed, integrity guarantees, and compliance readiness.

ApproachPortabilityTamper-EvidenceVerification Time (1k events)Storage OverheadCompliance Readiness
Traditional JSON/CSV LogsLowNone~45s (manual/review)BaselineLow
Proprietary Session DumpsMediumWeak (vendor-only)~30s (vendor tool)~40-60%Medium
AGEF v0.1 BundleHighCryptographic linkage + content-addressing~2.1s (automated)~12% (CBOR + ZSTD)High

Key Findings:

  • AGEF achieves deterministic verification under 3 seconds for standard sessions by leveraging length-delimited CBOR framing and monotonic sequencing.
  • Content-addressed objects eliminate redundant storage while guaranteeing payload integrity via SHA-256/BLAKE3.
  • Strict linkage rules and closed event kinds prevent event injection, dropping, or semantic ambiguity across implementations.

Core Solution

AGEF defines how one AI agent session can be represented as a portable, tamper-evident bundle. A session is a logical run from SessionStart to SessionEnd. The bundle captures every event in order, with cryptographic linkage and content-addressed payloads.

The bundle is a tar.zst archive with three top-level paths:

  • manifest.json, a small UTF-8 JSON file with sorted keys and LF newlines.
  • events.bin, an ordered stream of length-delimited canonical CBOR event records.
  • objects/<hex>, a

🎉 Mid-Year Sale — Unlock Full Article

Base plan from just $4.99/mo or $49/yr

Sign in to read the full article and unlock all 635+ tutorials.

Sign In / Register — Start Free Trial

7-day free trial · Cancel anytime · 30-day money-back