Skip to main content

aidr-verifier

Verify an AI agent's identity on your own site, offline: the agent's credential (signed by the AIDR registry) and its RFC 9421 request signature. Nothing in the request path calls the registry.

pip install "aidr-verifier[fastapi]"

ASGI (FastAPI, Starlette): the middleware keeps keys and revocation state in sync in the background and puts the result in request.state.aidr:

from aidr_verifier import AidrMiddleware, RelyingPartyConfig

app.add_middleware(AidrMiddleware, config=RelyingPartyConfig(
    issuer="https://api.evolivcore.com", public_origin="https://shop.example", min_agal=1))

Anonymous visitors pass as anonymous; a request that claims an identity and fails is refused. An audience-bound credential is checked against the site being visited (or public_origin). Flask (WSGI), in one line:

from aidr_verifier.wsgi import AidrWSGIMiddleware, RelyingPartyConfig

app.wsgi_app = AidrWSGIMiddleware(app.wsgi_app, RelyingPartyConfig(
    issuer="https://api.evolivcore.com", public_origin="https://shop.example"))
# request.environ["aidr"] in a view

Classic Django: add "aidr_verifier.django.AidrMiddleware" first in MIDDLEWARE and set AIDR = {"issuer": "https://api.evolivcore.com", "public_origin": "https://shop.example"}; views read request.aidr.

public_origin is your site's own origin (or AIDR_PUBLIC_ORIGIN; a list for several host names). Signatures are checked against it, never against the Host header a client sends, which would let a request signed for another site be replayed here. On localhost it can be left out. In 0.1.3 a missing public_origin logs a warning; from 0.2.0 agents are refused without it.

If the registry stays out of reach, agents are refused (503 aidr.registry.unavailable) once the newest revocation list held was signed 11 minutes (max_revocation_age_seconds=660) earlier, judged from its signed iat; anonymous visitors are unaffected. Every AIDR verifier applies the same limit. health()["revocation_issued_at"] shows how close a site is to it.

mode="verified-only" (with verified_only_paths) refuses anonymous requests with 401, as the Cloudflare Worker and the Node middleware do. Or verify a request yourself with AgentVerifier. Apache-2.0.

Metadata

Release files for aidr-verifier 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aidr-verifier 0.1.3
File Size Uploaded
aidr_verifier-0.1.3.tar.gz 36.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aidr-verifier 0.1.3
File Interpreter ABI Platform
aidr_verifier-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 80.5 kB

Release files / aidr_verifier-0.1.3.tar.gz

Download URL aidr_verifier-0.1.3.tar.gz
Size 36.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bf0cd5218ba309011960645c647ef0fe0cdac578ce5674083b240bd36b6c3fe6
BLAKE2b-256 checksum
How to use checksums
d5eab37ce1e4445857d1b2b856fbfeaac9438a658aa5eb954e227cc998f21898
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release files / aidr_verifier-0.1.3-py3-none-any.whl

Download URL aidr_verifier-0.1.3-py3-none-any.whl
Size 44.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d7aa0dfac41796bf6fbc96a56fb8cdb01971f716c673aa53c89f3a24630d2390
BLAKE2b-256 checksum
How to use checksums
f56ff3c6e838bd32733c3be0b914e4e958908c7044fa5556a5e1613f94248c61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page