AgentTrust Telemetry is a schema-first instrumentation layer between governance sources and adopter-owned telemetry/evidence destinations.
policy / approval / usage / data hooks
│
v
normalized event contract
│
schema + privacy gate
│
┌────────┴─────────┐
v v
OTel projection evidence projection
(best effort) (future, durable)
│ │
adopter's OTLP TRACE finalizer
collector/backend (future)
JSON Schema 2020-12 files in spec/schema define the six event families. Closed schemas reject unknown top-level fields. A shared envelope supplies event, run, workflow, agent, task, producer, trace, and span correlation.
Valid and invalid fixtures exercise each family, privacy rejection, missing measurements, and malformed trace context. The runner resolves schemas from an offline registry and never retrieves remote schema URLs.
The SDK validates an event before any projection. Under the default profile it rejects known content fields and all extension attributes unless each key is explicitly allowlisted.
If OpenTelemetry is installed, the SDK uses the caller's current span and adds a normalized span event. It does not create a tracer provider, processor, exporter, or duplicate agent/tool/model span.
A caller-owned structured-log emitter may receive a defensive deep copy of the validated event. Projection failures are reported independently in EmitResult.
The Node reference package in packages/typescript shares the normative schemas,
metadata-only privacy gate, normalized event factory, OTel span/log projection,
and W3C plus AgentTrust context propagation semantics. Its schema copies are
byte-compared to spec/schema in CI. It requires a caller-owned OTel provider,
exporters, and global propagator.
The optional accumulator receives validated events before OTel or log projection.
It assigns a monotonic sequence and chains canonical event bytes with SHA-256.
Memory mode is development-only. Callback mode requires the adopter's callback
to acknowledge durable commit and to be idempotent by event_id; failure aborts
operational projection and leaves local accumulator state retryable.
Sealing requires an explicit caller assessment of complete, incomplete, or
unknown. An open run always reports unknown. This assessment is an input to
future TRACE mapping, not proof generated by the accumulator.
run_idis the durable execution correlation key.trace_idandspan_idare optional lowercase W3C identifiers.- Nanosecond Unix timestamps are canonical decimal strings so JSON runtimes with IEEE-754 numbers preserve their exact 64-bit value.
- When an active span exists, supplied IDs must match it.
- Without an active span, the SDK never fabricates context; logs remain correlated by
run_id. - Synchronous cross-process work uses
extract_context(...).otel_contextas the remote parent when starting the receiving span. - Asynchronous handoff/fan-in uses
extract_context(...).link()and starts a new root span, preserving causal correlation without asserting synchronous parentage. x-agentrust-run-id,x-agentrust-workflow-id, andx-agentrust-agent-idpreserve durable run and agent-delegation metadata alongside standard W3Ctraceparent/tracestate. Extracted metadata is untrusted input.
Operational OTel signals are best effort and may be sampled or dropped. Future evidence accumulation will occur before OTel sampling through an explicit durability callback. A TRACE record must never be reconstructed from an observability backend while claiming completeness.
- Core runtime: JSON Schema validation and standard library.
- OTel integration: optional
opentelemetry-api, caller configured. - Test integration:
opentelemetry-sdkonly. - No dependency on AGT, an agent framework, collector, backend, or TRACE package in core.
Contract, SDK, OpenTelemetry semantic-convention profile, and TRACE schema versions evolve independently. Releases must state the supported combination and include golden fixtures for wire behavior.