toolsOverview

Tools Overview

OpenReason Protocol provides five ways to validate and work with ORP documents:

1. Command-Line Interface (CLI)

Best for: Local development, shell scripts, CI/CD pipelines

pip install orp-validator
orp validate my-document.yaml

Features:

  • Create new documents with interactive prompts
  • Validate against JSON Schema
  • Check compliance levels quickly
  • Compare documents (diff)
  • Offline operation

Full CLI Documentation →

2. Python API

Best for: Integration into Python applications, automated workflows

from orp_validator import validate
 
result = validate("my-document.yaml")
print(f"Valid: {result.valid}")
print(f"Compliance: {result.compliance_level}")

Features:

  • Programmatic validation
  • Integration with data pipelines
  • Custom error handling
  • Batch processing

Full Python API Documentation →

3. REST API

Best for: Web applications, cross-platform integration, browser-based tools

curl -X POST https://api.publicreasonproject.org/api/v1/validate \
  -H "Content-Type: application/json" \
  -d '{"document": "orp_version: \"0.1\"\n..."}'

Features:

  • No installation required
  • Language-agnostic
  • Three endpoints: validate, check, diff
  • 60 requests/minute rate limit

Full REST API Documentation →

4. JavaScript SDK

Best for: Node services and browser apps that must verify an attestation without trusting the publisher

import { validateDocument, verifyAttestation } from "@openreason/sdk";
 
const verdict = await verifyAttestation(doc, (kid) => kid); // did:key kids self-resolve
console.log(verdict.valid, verdict.trust_tier);

Features:

  • Schema validation (v0.1, v0.2) and compliance check
  • Offline Ed25519 attestation verification, interoperable with the Python reference
  • RFC 8785 canonicalisation helpers
  • Source-available now; npm publication coming

JavaScript SDK Documentation →

5. MCP Server

Best for: AI agents — give any MCP host (Claude, Cursor, your own agent) native ORP tools

{ "mcpServers": { "openreason": { "command": "node", "args": ["/path/to/openreason/mcp/dist/index.js"] } } }

Features:

  • orp_validate, orp_verify_attestation, orp_explain
  • stdio transport, no infrastructure
  • Fail-closed key handling
  • Source-available now; npm publication coming

MCP Server Documentation →

Which Tool Should I Use?

Use CaseRecommended Tool
Writing ORP documentsCLI (orp new, orp validate)
CI/CD validationCLI in scripts
Python data pipelinePython API
Web applicationREST API
Quick validation testREST API or CLI
Batch processingPython API

Installation

CLI & Python API

pip install orp-validator

Requires Python 3.9+. See Installation Guide for details.

REST API

No installation required. Available at:

Version Compatibility

All tools validate against ORP v0.1 and v0.2 specifications with auto-detection.

ToolVersionORP Support
orp-validator (CLI/Python)0.4.0v0.1, v0.2 (auto-detect)
REST APIv0.4.0v0.1, v0.2 (auto-detect)

Backward compatibility: All v0.1 documents continue to validate correctly in v0.4.0 tools.

Next Steps