Reference Implementations

Data

data-validator

beginner

Validate JSON input against an optional schema. Returns valid/invalid status + error list.

APIs Used

ctx.provenancectx.telemetry.emit

Capabilities Required

data/validate

What this demonstrates

  • 1Simple synchronous validation pattern: parse → validate → return result
  • 2Optional JSON Schema validation when a schema is provided
  • 3Structured error reporting: field, message, and value for each violation
  • 4Available in TypeScript, Python, and Go — useful for comparing idioms
  • 5TypeScript: ctx.telemetry.emit via emitReferenceAuthorSignal on validation_soft_fail (schema errors)
>
SDK:

Run the tests

From monorepo root

$ pnpm test:agents:reference

$ pnpm test:agents:reference:verbose

The reference suite runs all 23 agents with createMockExecutionContext(), verifying every ctx.* API call and output shape.

See Also

SDK Reference