Observed since 21 Oct, 09:46 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
AI2Web (ai2w) Python SDK - capability model, manifest builder, validator, negotiation, server handler.
ai2web)The Python reference implementation of the AI2Web protocol - for Django, Flask, FastAPI, or plain Python. Mirrors @ai2web/core.
pip install ai2web
from ai2web import ai2web, validate, handle
manifest = (
ai2web({"name": "Example Store", "url": "https://example.com", "type": "ecommerce"})
.capability("content")
.capability("commerce", {"endpoint": "/ai2w/products", "checkout": True})
.transports({"mcp": {"enabled": True, "endpoint": "/ai2w/mcp"}, "rest": {"enabled": True}})
.auth({"methods": ["none", "oauth2"], "oauth2": {"pkce": True, "scopes": ["checkout"]}})
.consent({"requires_user_approval_for": ["purchase"]})
.contact({"support": "help@example.com"})
.build()
)
result = validate(manifest) # {'score': 90+, 'tier': 'Standard', ...}
# Serve every AI2Web route from one call (framework-agnostic):
res = handle({"manifest": manifest}, method, path, body, origin)
ai2web.manifest - fluent capability-model builder (ai2web(...), Manifest).ai2web.validator - validate() + AI Readiness scoring (spec §9/§11).ai2web.negotiator - negotiate() capability negotiation (spec §5).ai2web.server - handle() framework-agnostic route handler.ai2web.safety - is_safe_public_url() / assert_safe_public_url() SSRF guard.ai2web.export - to_llms_txt() / to_agent_json() projections of the manifest (RFC-0015).The builder also carries the v0.2 optional modules - .governance(...), .usage_policy(...),
.legal(...), .agent_identity(...), .knowledge(...) - and actions accept intent and
bindings. All are additive: a minimal manifest stays valid without them.
python tests/run.py # dependency-free; includes the shared conformance contract
Requires Python 3.9+. Zero runtime dependencies.
MIT.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.4.2 | 23 Jul 2026 | 0 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 21 Oct, 09:46 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:04642414f62a9331cd80c6853396031eecdc29db966b292810c06e099088fbbe