# Clone the repository
git clone https://github.com/JSON-AGENTS/Validators.git
cd Validators/python
# Install dependencies
pip3 install -r requirements.txt
# Test it works
python3 test_manual.py# Install with dev dependencies
pip3 install -r requirements.txt
pip3 install pytest pytest-cov black ruff mypy
# Run tests
pytest
# Run with coverage
pytest --cov=jsonagents --cov-report=htmlfrom jsonagents import validate_manifest
# Validate a manifest file
result = validate_manifest("manifest.json")
if result.is_valid:
print("✅ Valid!")
else:
for error in result.errors:
print(f"❌ {error}")# Validate a file
python3 -m jsonagents.cli validate manifest.json
# Validate multiple files
python3 -m jsonagents.cli validate examples/*.json
# Check a URI
python3 -m jsonagents.cli check-uri ajson://example.com/agents/hello
# Check a policy expression
python3 -m jsonagents.cli check-policy "tool.type == 'http'"# Run the manual test script
python3 test_manual.pyThis will validate all example manifests from the ../Standard/examples/ directory.
jsonagents-validator/
├── jsonagents/
│ ├── __init__.py # Package exports
│ ├── validator.py # Core validator
│ ├── uri.py # URI validation
│ ├── policy.py # Policy expression parser
│ ├── cli.py # Command-line interface
│ └── schemas/
│ └── json-agents.json # Bundled schema
├── tests/
│ ├── test_validator.py
│ ├── test_uri.py
│ └── test_policy.py
├── pyproject.toml # Package configuration
├── requirements.txt # Dependencies
├── README.md
├── CHANGELOG.md
├── LICENSE
└── CONTRIBUTING.md
jsonschema>=4.20.0— JSON Schema validationrequests>=2.31.0— HTTP requests (future: remote schema fetching)click>=8.1.0— CLI frameworkrich>=13.0.0— Rich terminal outputpyyaml>=6.0— YAML support (future feature)
- Install dependencies:
pip3 install -r requirements.txt - Run manual test:
python3 test_manual.py - Try examples:
python3 -m jsonagents.cli validate ../Standard/examples/core.json - Run test suite:
pytest(requirespip3 install pytest)
Once ready:
# Build package
python3 -m build
# Upload to PyPI
python3 -m twine upload dist/*Then users can install with:
pip install jsonagents