Skip to content

RFC: AEP <-> AgentHook v0.2 Field Alignment and in-toto Attestation Wrapping

  • Status: Draft
  • Authors: WasmAgent Core Team
  • Created: 2026-07-16
  • Related issues: #41

Motivation

As agent-based systems mature, multiple evidence and observability standards are emerging in parallel. The Agent Evidence Protocol (AEP) used by WasmAgent provides deep capability-decision and budget-tracking evidence, while the AgentHook v0.2 draft proposes a lighter-weight event model for agent runtime evidence.

Alignment between these two schemas matters for three reasons:

  1. Downstream compliance tooling -- Organizations adopting EU AI Act Article 12 logging requirements need a single evidence pipeline that can ingest records from different agent frameworks. A clear mapping enables bridge adapters without data loss.

  2. Interoperability -- Multi-agent systems increasingly combine heterogeneous runtimes (e.g., a WasmAgent orchestrator delegating to an AgentHook-instrumented sub-agent). A field alignment table lets integrators translate records at pipeline boundaries.

  3. Supply-chain attestation -- Both schemas can benefit from wrapping evidence inside in-toto/DSSE envelopes. Understanding the structural overlap is a prerequisite for designing a shared predicateType that maximizes reuse across ecosystems.


Field-by-field Comparison Table

Top-level Record Fields

AEP FieldAgentHook v0.2 EquivalentNotes
schema_version(implicit in event_type versioning)AEP uses an explicit literal enum; AgentHook relies on event_type strings carrying version semantics.
run_idsession_idBoth identify a logical execution scope. AEP's run_id is per-invocation; AgentHook's session_id may span multiple events.
user_id(no direct equivalent)AEP tracks the human principal; AgentHook does not model user identity at the event level.
subject_idagent_idBoth identify the acting agent entity.
trace_idevent_idAEP's trace_id is OpenTelemetry-compatible and spans the full run; AgentHook's event_id is per-event. The correlation model differs.
parent_trace_idparent_event_idBoth establish causal/hierarchical links. AEP links runs; AgentHook links events within a session.
repo_commit(no equivalent)AEP captures code provenance; AgentHook does not model source versioning.
runtime_version(no equivalent)AEP records the agent framework version.
model_providermodel_call.providerDirect mapping.
model_idmodel_call.modelDirect mapping.
policy_bundle_digest(no equivalent)AEP-only: ties the run to a specific policy configuration.
tool_manifest_digest(no equivalent)AEP-only: integrity anchor for the set of available tools.
mcp_server_card_digest(no equivalent)AEP-only: MCP server identity digest.
input_refs(no direct equivalent; closest: model_call.messages)AEP uses content-addressed digests; AgentHook stores raw message payloads.
output_refs(no direct equivalent; closest: model_call.completion)Same distinction as input_refs.
capability_decisionsdecision (per-event)AEP stores an array of structured decisions per run; AgentHook models decisions as individual events with type/reasoning/confidence.
actionsaction (per-event)AEP bundles all actions in a single record; AgentHook emits one event per action.
verifier_results(no equivalent)AEP-only: post-run verification verdicts.
budget_ledger(no equivalent)AEP-only: resource consumption accounting.
created_at_mstimestampDirect mapping (AEP uses epoch ms; AgentHook uses ISO 8601 or epoch).
run_contextPartial: agent_id, session_idAEP's run_context includes delegation_chain, environment_digest, dependency_lock_digest, session_id, turn_index -- richer than AgentHook's flat fields.
run_side_effect_class_max(no equivalent)AEP v0.3 run-level side-effect ceiling.
signatureattestationAEP uses Ed25519 over canonical record bytes; AgentHook's attestation supports multiple methods (method, signer, timestamp_proof).
prev_record_hash(no equivalent)AEP chain-linking for tamper-evidence (introduced in A1).

Action-level Fields

AEP ActionEvidence FieldAgentHook v0.2 EquivalentNotes
action_id(implicit in event_id)AgentHook's event_id serves as the action identifier.
tool_nametool_name / action.typeDirect mapping.
state_changing(no equivalent)AEP explicitly flags mutation; AgentHook does not classify actions by side-effect.
precondition_digest(no equivalent)AEP captures pre-state for reproducibility.
result_digest(no equivalent; tool_output carries raw value)AEP digests results; AgentHook stores them in full.
evidence_refs(no equivalent)AEP links to external evidence artifacts.
capability_decisiondecisionPartial overlap; AgentHook lacks AEP's structured allow/deny/ask_user/dry_run enum and approval_mode.
timestamp_mstimestampDirect mapping.
parent_action_idparent_event_idCausal chain link.
side_effect_class(no equivalent)AEP v0.3 classification (read/mutate-local/mutate-external/network-egress/unknown).
permission_gate(no equivalent)AEP signals that platform-level authorization was exercised.
argument_drift(no equivalent)AEP v0.3 drift detection between approved and observed arguments.
recording_mode(no equivalent)AEP v0.3 controls evidence capture depth.
input_taint_labels / output_taint_labels(no equivalent)AEP taint propagation tracking.

AEP-only Fields (No AgentHook Equivalent)

These fields represent capabilities unique to AEP's evidence model:

FieldPurpose
policy_bundle_digestBinds the run to a specific, content-addressed policy configuration.
tool_manifest_digestIntegrity hash of the tool set available during the run.
mcp_server_card_digestIdentity anchor for the MCP server providing tools.
verifier_resultsPost-run verification verdicts with pass/fail, score, and claim linkage.
budget_ledgerMulti-dimensional resource accounting (tokens, latency, tools, risk, retries, human approvals).
prev_record_hashHash-chain linking for tamper-evident record sequences.
run_side_effect_class_maxDeclares the maximum side-effect class observed across the entire run.
run_context.delegation_chainOrdered list of agent delegation hops.
run_context.environment_digestContent hash of the execution environment.
run_context.dependency_lock_digestLock-file integrity for reproducibility.
ActionEvidence.side_effect_classPer-action side-effect classification.
ActionEvidence.permission_gatePlatform authorization signal.
ActionEvidence.argument_driftDrift detection between approved and observed tool arguments.
ActionEvidence.recording_modeEvidence capture depth control (validation/delta/full).
ActionEvidence.input_taint_labels / output_taint_labelsInformation-flow taint propagation.
ActionEvidence.pre_state_digest / post_state_digestBefore/after state snapshots for reproducibility.
CapabilityDecision.approval_modeStructured approval semantics (one-shot, bounded-lease, etc.).
CapabilityDecision.deny_reason_classCategorized denial reasons.

AgentHook-only Fields (No AEP Equivalent)

These fields represent capabilities unique to AgentHook v0.2's event model:

FieldPurposePotential AEP Adoption
decision.confidenceNumeric confidence score for agent decisions.Could be added to CapabilityDecision as an optional field.
decision.reasoningFree-text explanation of why a decision was made.AEP has reason_code (machine-readable); could add a human-readable complement.
observation.sourceIdentifies where an observation originated.AEP uses input_refs with URIs, but lacks a dedicated observation event type.
observation.contentRaw observation payload.AEP digests content rather than storing it (by design for privacy).
observation.trust_levelEnum classifying trust in an observation source.Novel concept; could inform AEP's taint labels or a new trust annotation.
attestation.timestamp_proofExternal timestamp authority proof (e.g., RFC 3161).AEP could adopt this alongside its Ed25519 signature for non-repudiation.
attestation.methodFlexible attestation method selection.AEP currently hardcodes Ed25519; extensible method field is a useful pattern.
model_call.messagesFull message history for an LLM call.AEP stores input_refs digests; full content available only in recording_mode: "full".
model_call.completionFull model response.Same as above -- AEP digests outputs by default.

in-toto Attestation Wrapping Feasibility

Background

in-toto is a supply-chain security framework. Its DSSE (Dead Simple Signing Envelope) format wraps arbitrary attestation predicates with cryptographic signatures. SLSA builds on in-toto for build provenance.

Proposed Mapping

An AEP record can serve as a predicate inside a DSSE envelope:

json
{
  "payloadType": "application/vnd.in-toto+json",
  "payload": "<base64 of Statement>",
  "signatures": [
    {
      "keyid": "<AEP key_id>",
      "sig": "<DSSE signature over payload>"
    }
  ]
}

Where the Statement is:

json
{
  "_type": "https://in-toto.io/Statement/v1",
  "subject": [
    {
      "name": "wasmagent-agent-binary",
      "digest": {
        "sha256": "<agent binary or container image digest>"
      }
    }
  ],
  "predicateType": "https://wasmagent.dev/aep/v0.3",
  "predicate": {
    // The full AEP record minus the `signature` field
    // (signature is now at the DSSE envelope level)
    "schema_version": "aep/v0.3",
    "run_id": "...",
    "created_at_ms": 1750950001234,
    // ... all other AEP fields
  }
}

Design Decisions

  1. Subject = the agent binary digest (or container image digest). This anchors "what software produced this evidence" in the supply-chain sense.

  2. predicateType = https://wasmagent.dev/aep/v0.3 -- a versioned URI identifying the predicate schema. Consumers can fetch the JSON Schema at this URL.

  3. Predicate = the AEP record with signature removed, since the DSSE envelope provides its own signing layer. The AEP signature field becomes redundant when wrapped; however, for standalone transport (outside DSSE), the AEP signature remains authoritative.

  4. Key management -- The same Ed25519 keypair used by AEPSigner can sign the DSSE envelope. For environments requiring multiple signers (e.g., agent + platform co-signature), DSSE's multi-signature support is natively available.

Feasibility Assessment

AspectStatus
Schema compatibilityHigh -- AEP records are self-contained JSON objects; no transformation needed beyond removing signature.
Signature migrationMedium -- Requires dual-mode: standalone AEP signature for backward compat + DSSE envelope for supply-chain consumers.
Tooling supportHigh -- in-toto-golang, in-toto-python, and sigstore/cosign all support DSSE. A thin TypeScript wrapper is needed.
Size constraintsLow risk -- Typical AEP records are 2-10 KB; well within DSSE payload limits.
Verification workflowStraightforward -- cosign verify-attestation --type https://wasmagent.dev/aep/v0.3 could validate agent evidence in CI.

Recommendations

  1. Define a canonical aep-to-agenthook adapter -- Implement a bidirectional mapping library (@wasmagent/aep-bridge) that converts AEP records to AgentHook v0.2 event streams and vice versa. Prioritize lossless AEP-to-AgentHook for interop; AgentHook-to-AEP will necessarily drop confidence and trust_level unless AEP adopts them.

  2. Propose decision.confidence and attestation.method for AEP v0.4 -- These AgentHook fields address real gaps. A confidence score on CapabilityDecision enables downstream risk scoring, and an extensible attestation.method field future-proofs beyond Ed25519.

  3. Implement DSSE wrapping as an optional output mode -- Add a --wrap=dsse flag to the AEP emitter that produces in-toto Statements alongside raw AEP records. This enables supply-chain verification via cosign without changing the default record format.

  4. Engage the AgentHook working group on budget and verifier concepts -- AEP's budget_ledger and verifier_results address EU AI Act Article 12 requirements for resource monitoring and outcome verification. Proposing these as optional AgentHook extensions would benefit the broader ecosystem.


References

Released under the Apache-2.0 License.