Metadata-Version: 2.4
Name: django-agentweb
Version: 0.0.1
Summary: Make Django sites first-class citizens of the agentic web: llms.txt, Schema.org/JSON-LD, agent discovery, WebMCP tools, agentic commerce/booking and SDF — per-site opt-in.
Home-page: https://github.com/DLRSP/django-agentweb
Author: DLRSP
Author-email: DLRSP <dlrsp.dev@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/DLRSP/django-agentweb
Project-URL: Documentation, https://dlrsp.github.io/django-agentweb/
Project-URL: Repository, https://github.com/DLRSP/django-agentweb
Project-URL: Issues, https://github.com/DLRSP/django-agentweb/issues
Project-URL: Changelog, https://github.com/DLRSP/django-agentweb/blob/main/CHANGELOG.rst
Project-URL: Funding, https://github.com/sponsors/DLRSP
Keywords: django,llms-txt,ai-agents,schema-org,json-ld,webmcp,mcp,agentic-commerce,agent-ready-web,structured-data
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.12
Classifier: Framework :: Django :: 5.2
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.2
Classifier: Framework :: Django :: 4.2
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Django>=3.2
Provides-Extra: webmcp
Requires-Dist: requests>=2.28; extra == "webmcp"
Provides-Extra: webbotauth
Requires-Dist: cryptography>=42; extra == "webbotauth"
Provides-Extra: commerce
Requires-Dist: requests>=2.28; extra == "commerce"
Provides-Extra: all
Requires-Dist: requests>=2.28; extra == "all"
Requires-Dist: cryptography>=42; extra == "all"
Provides-Extra: testing
Requires-Dist: coverage; extra == "testing"
Requires-Dist: codecov; extra == "testing"
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-django; extra == "testing"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.5; extra == "docs"
Requires-Dist: mkdocs-material>=9.0; extra == "docs"
Requires-Dist: pymdown-extensions>=10.0; extra == "docs"
Requires-Dist: mkdocs-git-revision-date-plugin>=2.0; extra == "docs"
Provides-Extra: linting
Requires-Dist: flake8; extra == "linting"
Requires-Dist: flake8-pyproject; extra == "linting"
Requires-Dist: flake8-bugbear; extra == "linting"
Requires-Dist: flake8-comprehensions; extra == "linting"
Requires-Dist: flake8-tidy-imports; extra == "linting"
Requires-Dist: flake8-typing-imports; extra == "linting"
Requires-Dist: pylint; extra == "linting"
Dynamic: license-file

# django-agentweb

[![CI/CD](https://github.com/DLRSP/django-agentweb/actions/workflows/ci.yaml/badge.svg)](https://github.com/DLRSP/django-agentweb/actions/workflows/ci.yaml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

Make your Django site a **first-class citizen of the agentic web**.

`django-agentweb` is a reusable Django app that helps AI agents (and the LLMs
behind them) **discover, understand, and act on** your site — across five
complementary domains. Every domain is **opt-in per site** and **off by
default**, so you expose only what you choose.

> Status: **alpha**. Core domains (llms.txt, JSON-LD profiles, discovery /
> ai-catalog + MCP server-card, browser WebMCP, CAP Lite) are implemented and
> opt-in per site. Booking adapters and extras (Web Bot Auth, full SDF) follow.
> See the [roadmap](#roadmap).

## The five agent-web domains

| # | Domain | What it provides | Standard(s) |
|---|--------|------------------|-------------|
| 1 | **Readability** | `llms.txt` / `llms-full.txt`, per-language variants | `llms.txt` |
| 2 | **Structured data** | Schema.org JSON-LD (`Hotel`, `HotelRoom`, `Offer`, …) | Schema.org / JSON-LD |
| 3 | **Discovery** | `/.well-known/` agent descriptors & capability manifest | Agent-Ready Web |
| 4 | **WebMCP** | In-page tools agents can call (read-only by default) | Web Model Context Protocol |
| 5 | **Commerce / SDF** | Agentic booking/commerce discovery + hooks; SDF (flag, off) | CAP / UCP / AP2, SDF |

## Why

Search and assistants increasingly mediate discovery through agents. For an
independent hotel, that means letting an agent **check availability, simulate a
booking price, and start a direct reservation** — and reducing dependence on
OTAs (Booking.com / Expedia). The same building blocks benefit any content or
commerce site.

This package is intentionally **generic and externally adoptable**: it
implements all five domains even where a given deployment won't use them, to
maximise reuse and external visibility.

## Install

Until the package is published on PyPI, install from VCS or an editable checkout:

```bash
pip install "django-agentweb @ git+https://github.com/DLRSP/django-agentweb.git"
# or: pip install -e ".[testing]"
```

Extras once installed:

```bash
pip install "django-agentweb[webmcp]"  # + server-side tool proxy
pip install "django-agentweb[all]"     # everything
```

Requires `django.contrib.sites`.

## Quickstart

```python
# settings.py
INSTALLED_APPS = [
    # ...
    "django.contrib.sites",
    "agentweb",
]

AGENTWEB = {
    "LLMS": {"ENABLED": True},
    "JSONLD": {"ENABLED": True},
    "DISCOVERY": {"ENABLED": True},
    "WEBMCP": {"ENABLED": False},
    "COMMERCE": {"ENABLED": False},
    "SDF": {"ENABLED": False},
}
```

```python
# urls.py
from django.urls import include, path

urlpatterns = [
    # ...
    path("", include("agentweb.urls")),
]
```

Only the domains you enable register any URLs or expose any data.

## Security

Agent-facing surfaces have a distinct threat model (prompt/output injection,
data leakage, unsafe tool calls). Transactional tools always require
human-in-the-loop. See [`SECURITY.md`](.github/SECURITY.md).

## Roadmap

Readability → structured data → discovery → WebMCP → commerce/booking → SDF,
followed by per-site rollout. See the package docs for the current domain status.

## License

MIT — see [`LICENSE`](LICENSE).
