Skip to main content

ASAP Protocol compliance testing harness

Project description

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asap_compliance-1.2.0.tar.gz (72.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

asap_compliance-1.2.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file asap_compliance-1.2.0.tar.gz.

File metadata

  • Download URL: asap_compliance-1.2.0.tar.gz
  • Upload date:
  • Size: 72.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for asap_compliance-1.2.0.tar.gz
Algorithm Hash digest
SHA256 3b06b82c22d5865afc818958f16c18ca4582549c5c9e7364dc9597bad4e9e7f6
MD5 cb25e330536b581dc22baee2ff5f80b5
BLAKE2b-256 38d4c0f1c4effa23f7ca00a1dd8d950489f91ee07b2aa3e5aaaf5b10fdf616d5

See more details on using hashes here.

File details

Details for the file asap_compliance-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: asap_compliance-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for asap_compliance-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 73cbc0b8fb2dc5b715561f8a728057ee3f216b2adf752c56372902d7efaa54f7
MD5 a618e0cc46f5af64dd943cdaf0ae0ddd
BLAKE2b-256 a67e6700f8125a5e563e4b852d958090de5dc00b3861401fbc1e3a08882e7a7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page