ASAP Compliance Harness
Protocol compliance testing suite for ASAP (Async Simple Agent Protocol) implementations.
Overview
The Compliance Harness validates that ASAP agents follow the protocol specification. Third parties can use this package to certify their agents are ASAP-compliant, enabling ecosystem interoperability.
Installation
uv add asap-compliance
# or
pip install asap-compliance
Usage
Run compliance tests against an agent:
pytest --asap-agent-url https://your-agent.example.com -m asap_compliance
Or set the agent URL via environment variable:
ASAP_AGENT_URL=https://your-agent.example.com pytest -m asap_compliance
Test Categories
- handshake (implemented): Agent connection, health/content-type, manifest schema, signature verification, version negotiation
- schema (implemented): Pydantic model compliance (Envelope, TaskRequest, TaskResponse, McpToolResult, MessageAck, extensions, extra='forbid')
- state: Task state machine transitions
- mcp-auth-bridge (v1.3.0+, requires
asap-protocol>=2.5.0): Stdio MCP Auth Bridge release gate — JWT paths, grants, constraints, manifest ⊆ registered tools. See MCP Auth Bridge andexamples/mcp_auth_bridge/README.md.
Protocol v2.2 and Compliance Harness v2
This package focuses on handshake, schema, state, and SLA validators for third-party certification. Compliance Harness v2 (identity, streaming, errors, versioning, batch, audit checks against the v2.2 spec) ships with the main asap-protocol library — use from asap.testing.compliance import run_compliance_harness_v2 on an ASGI app. See the changelog for v2.2.0 details.
Programmatic Usage
# Handshake validation (against live agent)
from asap_compliance import ComplianceConfig, validate_handshake
config = ComplianceConfig(agent_url="https://your-agent.example.com")
result = validate_handshake(config)
if result.passed:
print("Agent is compliant")
else:
for check in result.checks:
if not check.passed:
print(f"FAIL: {check.name} - {check.message}")
# Schema validation (static, for envelope/payload dicts)
from asap_compliance import validate_schema
envelope_dict = {"asap_version": "0.1", "sender": "urn:asap:agent:a", ...}
schema_result = validate_schema(envelope_dict)
if schema_result.passed:
print("Envelope and payload schema valid")
Development
cd asap-compliance
uv sync
uv run pytest
Metadata
Release files for asap-compliance 1.3.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 | |
|---|---|---|---|
| asap_compliance-1.3.0.tar.gz | 81.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| asap_compliance-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 101.9 kB
Release files / asap_compliance-1.3.0.tar.gz
| Download URL | asap_compliance-1.3.0.tar.gz |
|---|---|
| Size | 81.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbc8a00ba0e5ecbd5e065de27972a46bf465b5ddbf324dc21f868d185c6f8bd7
|
|
BLAKE2b-256 checksum How to use checksums |
7c02821ca213ca125db2596352cf7b3b68cd018d097f64963b51b688dc3b7c59
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Release files / asap_compliance-1.3.0-py3-none-any.whl
| Download URL | asap_compliance-1.3.0-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f8d6167aeb43d651e46adabf5aba082354aafc6013461f6497f51824fb74147
|
|
BLAKE2b-256 checksum How to use checksums |
ad8168e6d152f3475bdbe2d4adb16feeccb9700a28d43925f01eff8cda9e6244
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|