Catalog PyPI
Back to packageRELEASE DETAILS

0.2.0

PyPI

aidr-verifier

Verify AI agents' AIDR identities on your own site, offline: credentials and RFC 9421 signatures.

ai-agentsaiafaidrbot-verificationidentityrfc9421
Published21 Oct 2026
Direct dependencies5
Transitive dependenciesNot calculated

README

Version 0.2.0 documentation

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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 5

Native requirements
5 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
aidr-crypto
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
aidr-crypto<0.3,>=0.2runtime
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.27runtime
django
Environment
{
  "extras": "",
  "marker": "extra == \"django\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
django>=4.2; extra == "django"runtime
fastapi
Environment
{
  "extras": "",
  "marker": "extra == \"fastapi\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
fastapi>=0.110; extra == "fastapi"runtime
flask
Environment
{
  "extras": "",
  "marker": "extra == \"flask\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
flask>=3.0; extra == "flask"runtime

Distribution files

2 collected
aidr_verifier-0.2.0-py3-none-any.whl

bdist_wheel · 43.22 KB · Python py3

Source file
aidr_verifier-0.2.0.tar.gz

sdist · 35.42 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:34 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:fdf9f282585ce96c1b0997cbfa64eae5a6e3da98a657df213c972b2d979d9a5c

Other collected versions

View all collected versions →