agentobs-validate
Reference validation CLI and Python SDK for the AgentOBS event standard.
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
| Code | Meaning |
|---|---|
| 0 | All events valid |
| 1 | Validation errors present |
| 2 | Input parse or configuration error |
| 3 | Internal validator error |
Documentation
| Document | Description |
|---|---|
| docs/tutorial.md | Step-by-step CLI and SDK tutorial |
| docs/sdk.md | Full Python SDK API reference |
| docs/errors.md | Error code reference |
| docs/ci.md | CI integration guide (GitHub Actions, GitLab, CircleCI) |
| docs/performance.md | Benchmark results and performance notes |
| agentobsvalidatespec.md | Full 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.
Metadata
Release files for agentobs-validate 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| agentobs_validate-1.0.0.tar.gz | 43.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentobs_validate-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 67.0 kB
Release files / agentobs_validate-1.0.0.tar.gz
| Download URL | agentobs_validate-1.0.0.tar.gz |
|---|---|
| Size | 43.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b72e5747240d4e759a014c3ad787c62c5221392645104ccd262c7ec595c4762
|
|
BLAKE2b-256 checksum How to use checksums |
4834c3583c93a8454636c548b68f973b90924b12ab2f01beaea41295387f0e4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / agentobs_validate-1.0.0-py3-none-any.whl
| Download URL | agentobs_validate-1.0.0-py3-none-any.whl |
|---|---|
| Size | 23.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73243854fb3d659077cbba4bbda63d927031120862c18eb83a63d6da5cd5ea89
|
|
BLAKE2b-256 checksum How to use checksums |
684a0797a777b6014d9aa622ed5b5c85504554cb94b4f6bf9ebb6cdd0ed57cf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for agentobs-validate 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.