Catalog PyPI
PACKAGE EXPLORERView in registry

agentobs-validate

PyPI

Reference validation CLI for the AgentOBS event standard

agentobsclijsonlobservabilityvalidation
Versions collected1
Direct dependencies3From release 1.0.0
Last observed20 Oct, 22:47 UTC

README

Version 1.0.0 documentation

agentobs-validate

Reference validation CLI and Python SDK for the AgentOBS event standard.

CI


Overview

agentobs-validate validates JSON or JSONL event streams against the AgentOBS schema. It can be used as a CLI tool for CI pipelines or as a Python library for programmatic validation.

If an event stream passes validation, it is considered AgentOBS compliant.


Installation

pip install agentobs-validate

For development:

git clone https://github.com/veerarag1973/AgentOBSValidate.git
cd AgentOBSValidate
pip install -e ".[dev]"

Quick Start — CLI

# Validate a JSONL stream
agentobs-validate events.jsonl

# Validate a JSON array
agentobs-validate events.json

# JSON output for CI / downstream scripts
agentobs-validate events.jsonl --json

# Read from STDIN
cat events.jsonl | agentobs-validate

# OpenTelemetry compatibility: accept camelCase field names
agentobs-validate events.jsonl --otel

# Pin to a specific schema version
agentobs-validate events.jsonl --schema-version 0.1

# Cryptographic HMAC-SHA256 signature verification
agentobs-validate events.jsonl --key-file signing.key

# Export the AgentOBS event JSON Schema (Draft 2020-12)
agentobs-validate --export-schema > agentobs-schema.json

Quick Start — Python SDK

from agentobs_validate.validator.engine import validate_event, validate_stream
from agentobs_validate.validator.input_parser import iter_events
from agentobs_validate.validator.context import ValidationContext

# Validate a single dict
result = validate_event(1, {
    "event_id": "01HZQSN7PQVR2K4M0BXJD3GSTA",
    "timestamp": "2026-03-06T10:00:00.000Z",
    "event_type": "agent.plan.created",
    "source": "spanforge@1.0.0",
    "trace_id": "4bf92f3577b34da6a3ce929d0e0e4736",
    "span_id": "00f067aa0ba902b7",
})
print(result.status)  # "pass"

# Validate a JSONL file
result = validate_stream(iter_events("events.jsonl"))
print(f"{result.valid}/{result.events_checked} valid")

# OTel mode + HMAC key
ctx = ValidationContext(otel_mode=True, key_bytes=open("signing.key", "rb").read().rstrip())
result = validate_stream(iter_events("events.jsonl"), ctx)

Exit Codes

CodeMeaning
0All events valid
1Validation errors present
2Input parse or configuration error
3Internal validator error

Documentation

DocumentDescription
docs/tutorial.mdStep-by-step CLI and SDK tutorial
docs/sdk.mdFull Python SDK API reference
docs/errors.mdError code reference
docs/ci.mdCI integration guide (GitHub Actions, GitLab, CircleCI)
docs/performance.mdBenchmark results and performance notes
agentobsvalidatespec.mdFull specification

Running Tests

pytest

Targets ≥95% coverage. Current: 100% across 639 tests.


Status

v1.0.0 — Fully implemented. All validation features complete including OTel compatibility, HMAC-SHA256 signature verification, JSON Schema export, and schema version negotiation.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
1.0.07 Mar 20263

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:47 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:f3c6c26192b8436cb43b91ef72ec2bac2d30ce9c30ee44d379cd71f5c2998df6