django-agentweb 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. django_agentweb-0.0.1/.pre-commit-config.yaml +52 -0
  2. django_agentweb-0.0.1/AGENTS.md +52 -0
  3. django_agentweb-0.0.1/CHANGELOG.rst +11 -0
  4. django_agentweb-0.0.1/CODEOWNERS +2 -0
  5. django_agentweb-0.0.1/LICENSE +21 -0
  6. django_agentweb-0.0.1/MANIFEST.in +16 -0
  7. django_agentweb-0.0.1/PKG-INFO +172 -0
  8. django_agentweb-0.0.1/README.md +103 -0
  9. django_agentweb-0.0.1/mkdocs.yml +49 -0
  10. django_agentweb-0.0.1/news/+discovery-commerce-webmcp.feature.rst +3 -0
  11. django_agentweb-0.0.1/news/+discovery-webmcp-realign.feature.rst +5 -0
  12. django_agentweb-0.0.1/news/+jsonld-profiles.feature.rst +4 -0
  13. django_agentweb-0.0.1/news/+llms-readability.feature.rst +4 -0
  14. django_agentweb-0.0.1/news/+mcp-server-card-core.feature.rst +3 -0
  15. django_agentweb-0.0.1/news/+runtime-locks.feature.rst +2 -0
  16. django_agentweb-0.0.1/news/+scaffold.feature.rst +5 -0
  17. django_agentweb-0.0.1/pyproject.toml +217 -0
  18. django_agentweb-0.0.1/requirements/py310-django42.txt +22 -0
  19. django_agentweb-0.0.1/requirements/py310-django52.txt +22 -0
  20. django_agentweb-0.0.1/requirements/py311-django42.txt +18 -0
  21. django_agentweb-0.0.1/requirements/py311-django52.txt +18 -0
  22. django_agentweb-0.0.1/requirements/py312-django42.txt +18 -0
  23. django_agentweb-0.0.1/requirements/py312-django52.txt +18 -0
  24. django_agentweb-0.0.1/requirements/py313-django52.txt +18 -0
  25. django_agentweb-0.0.1/requirements/py314-django52.txt +18 -0
  26. django_agentweb-0.0.1/requirements/runtime.in +3 -0
  27. django_agentweb-0.0.1/runtests.py +52 -0
  28. django_agentweb-0.0.1/setup.cfg +82 -0
  29. django_agentweb-0.0.1/src/agentweb/__init__.py +17 -0
  30. django_agentweb-0.0.1/src/agentweb/apps.py +15 -0
  31. django_agentweb-0.0.1/src/agentweb/commerce/__init__.py +15 -0
  32. django_agentweb-0.0.1/src/agentweb/commerce/cap_lite.py +59 -0
  33. django_agentweb-0.0.1/src/agentweb/commerce/urls.py +15 -0
  34. django_agentweb-0.0.1/src/agentweb/commerce/views.py +35 -0
  35. django_agentweb-0.0.1/src/agentweb/conf.py +131 -0
  36. django_agentweb-0.0.1/src/agentweb/discovery/__init__.py +7 -0
  37. django_agentweb-0.0.1/src/agentweb/discovery/descriptors.py +249 -0
  38. django_agentweb-0.0.1/src/agentweb/discovery/middleware.py +54 -0
  39. django_agentweb-0.0.1/src/agentweb/discovery/urls.py +25 -0
  40. django_agentweb-0.0.1/src/agentweb/discovery/views.py +55 -0
  41. django_agentweb-0.0.1/src/agentweb/jsonld/__init__.py +35 -0
  42. django_agentweb-0.0.1/src/agentweb/jsonld/builders.py +498 -0
  43. django_agentweb-0.0.1/src/agentweb/jsonld/graph.py +80 -0
  44. django_agentweb-0.0.1/src/agentweb/jsonld/profiles.py +260 -0
  45. django_agentweb-0.0.1/src/agentweb/llms/__init__.py +7 -0
  46. django_agentweb-0.0.1/src/agentweb/llms/sections.py +61 -0
  47. django_agentweb-0.0.1/src/agentweb/llms/urls.py +72 -0
  48. django_agentweb-0.0.1/src/agentweb/llms/validate.py +47 -0
  49. django_agentweb-0.0.1/src/agentweb/llms/views.py +64 -0
  50. django_agentweb-0.0.1/src/agentweb/management/__init__.py +0 -0
  51. django_agentweb-0.0.1/src/agentweb/management/commands/__init__.py +0 -0
  52. django_agentweb-0.0.1/src/agentweb/management/commands/generate_llms_txt.py +65 -0
  53. django_agentweb-0.0.1/src/agentweb/sdf/__init__.py +6 -0
  54. django_agentweb-0.0.1/src/agentweb/sdf/urls.py +15 -0
  55. django_agentweb-0.0.1/src/agentweb/sdf/views.py +23 -0
  56. django_agentweb-0.0.1/src/agentweb/static/agentweb/webmcp.js +109 -0
  57. django_agentweb-0.0.1/src/agentweb/templates/agentweb/llms-full.txt +12 -0
  58. django_agentweb-0.0.1/src/agentweb/templates/agentweb/llms.txt +11 -0
  59. django_agentweb-0.0.1/src/agentweb/templatetags/__init__.py +0 -0
  60. django_agentweb-0.0.1/src/agentweb/templatetags/agentweb_jsonld.py +38 -0
  61. django_agentweb-0.0.1/src/agentweb/templatetags/agentweb_webmcp.py +63 -0
  62. django_agentweb-0.0.1/src/agentweb/templatetags/agentweb_webmcp_decl.py +36 -0
  63. django_agentweb-0.0.1/src/agentweb/urls.py +31 -0
  64. django_agentweb-0.0.1/src/agentweb/webmcp/__init__.py +13 -0
  65. django_agentweb-0.0.1/src/agentweb/webmcp/tools.py +99 -0
  66. django_agentweb-0.0.1/src/agentweb/webmcp/urls.py +20 -0
  67. django_agentweb-0.0.1/src/agentweb/webmcp/views.py +87 -0
  68. django_agentweb-0.0.1/src/django_agentweb.egg-info/PKG-INFO +172 -0
  69. django_agentweb-0.0.1/src/django_agentweb.egg-info/SOURCES.txt +91 -0
  70. django_agentweb-0.0.1/src/django_agentweb.egg-info/dependency_links.txt +1 -0
  71. django_agentweb-0.0.1/src/django_agentweb.egg-info/not-zip-safe +1 -0
  72. django_agentweb-0.0.1/src/django_agentweb.egg-info/requires.txt +35 -0
  73. django_agentweb-0.0.1/src/django_agentweb.egg-info/top_level.txt +1 -0
  74. django_agentweb-0.0.1/tests/__init__.py +0 -0
  75. django_agentweb-0.0.1/tests/settings.py +113 -0
  76. django_agentweb-0.0.1/tests/test_commerce.py +14 -0
  77. django_agentweb-0.0.1/tests/test_conf.py +26 -0
  78. django_agentweb-0.0.1/tests/test_discovery.py +31 -0
  79. django_agentweb-0.0.1/tests/test_integration.py +257 -0
  80. django_agentweb-0.0.1/tests/test_jsonld.py +68 -0
  81. django_agentweb-0.0.1/tests/test_jsonld_profiles.py +197 -0
  82. django_agentweb-0.0.1/tests/test_llms.py +80 -0
  83. django_agentweb-0.0.1/tests/test_llms_sections.py +45 -0
  84. django_agentweb-0.0.1/tests/test_llms_validate.py +27 -0
  85. django_agentweb-0.0.1/tests/test_middleware_commerce.py +33 -0
  86. django_agentweb-0.0.1/tests/test_profile_combinations.py +102 -0
  87. django_agentweb-0.0.1/tests/test_readiness_contracts.py +194 -0
  88. django_agentweb-0.0.1/tests/test_smoke.py +16 -0
  89. django_agentweb-0.0.1/tests/test_webmcp.py +151 -0
  90. django_agentweb-0.0.1/tests/test_webmcp_decl.py +33 -0
  91. django_agentweb-0.0.1/tests/urls.py +16 -0
  92. django_agentweb-0.0.1/tox.ini +13 -0
@@ -0,0 +1,52 @@
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v6.0.0
4
+ hooks:
5
+ - id: check-added-large-files
6
+ - id: check-case-conflict
7
+ - id: check-json
8
+ - id: check-merge-conflict
9
+ - id: check-symlinks
10
+ - id: check-toml
11
+ - id: end-of-file-fixer
12
+ - id: trailing-whitespace
13
+ - repo: https://github.com/asottile/pyupgrade
14
+ rev: v3.21.2
15
+ hooks:
16
+ - id: pyupgrade
17
+ args: [--py36-plus]
18
+ - repo: https://github.com/psf/black-pre-commit-mirror
19
+ rev: 26.3.1
20
+ hooks:
21
+ - id: black
22
+ - repo: https://github.com/asottile/blacken-docs
23
+ rev: 1.20.0
24
+ hooks:
25
+ - id: blacken-docs
26
+ additional_dependencies:
27
+ - black>=22.12.0
28
+ - repo: https://github.com/pycqa/isort
29
+ rev: 8.0.1
30
+ hooks:
31
+ - id: isort
32
+ args: ["--profile", "black"]
33
+ - repo: https://github.com/PyCQA/flake8
34
+ rev: 7.3.0
35
+ hooks:
36
+ - id: flake8
37
+ additional_dependencies:
38
+ - flake8-pyproject
39
+ - flake8-bugbear
40
+ - flake8-comprehensions
41
+ - flake8-tidy-imports
42
+ - flake8-typing-imports
43
+ - repo: https://github.com/mgedmin/check-manifest
44
+ rev: "0.51"
45
+ hooks:
46
+ - id: check-manifest
47
+ args: [--no-build-isolation]
48
+ additional_dependencies:
49
+ - Django>=3.2
50
+ - build
51
+ - setuptools>=77
52
+ - wheel
@@ -0,0 +1,52 @@
1
+ # django-agentweb
2
+
3
+ - **Generation:** modern-module
4
+ - **GitHub:** DLRSP/django-agentweb
5
+ - **Context pack:** `~/.cursor/context/dlrsp/`
6
+ - **Registry:** `~/.cursor/context/dlrsp/registry.yaml`
7
+ - **Agents manifest:** `~/.cursor/context/dlrsp/agents-manifest.md`
8
+
9
+ ## Git (local only — never commit)
10
+
11
+ This file, local rules (`.**/rules/*.mdc`), commands (`.**/commands/*.md`), `**/dlrsp-runs/`, and `exec_*.bat` are excluded by the agent-architecture block in `.gitignore`.
12
+ Do not add repo-specific commands or rules — extend context pack templates (`tooling-registry.md`).
13
+ Never commit vendor IDE path names or product branding in published scaffold files.
14
+
15
+ ## Canonical plan
16
+
17
+ - No elaborated plan in repo-plan-index — run elaborate_all_repo_plans.py
18
+
19
+ ## Agent entry points (Cursor Desktop)
20
+
21
+ - `/dlrsp-plan-review` — plan-orchestrator
22
+ - `/dlrsp-code-review` — pre-merge review
23
+ - `/dlrsp-test-battery` — test battery rollout (modules)
24
+ - `/dlrsp-release-prep` — release checklist (no auto bump)
25
+ - `/dlrsp-verify` — gate setup
26
+
27
+ ## Operating model
28
+
29
+ - **Cursor Desktop:** implementazione, orchestrazione agenti, review
30
+ - **PyCharm (optional):** debug, verifica tox/pytest, bump release manuale
31
+
32
+ ## Shell
33
+
34
+ - Tests: `pytest tests/ -v`
35
+ - Tox: `tox -e py311-django42` (project command `/tox-matrix`)
36
+ - Pre-commit: `pre-commit run --all-files`
37
+ - Workflow pin: DLRSP/workflows@main
38
+
39
+ ## Release (manual — user only)
40
+
41
+ - Checklist: `/dlrsp-release-prep` in Cursor
42
+ - Bump: `exec_bump-patch.bat` | `exec_bump-minor.bat` | `exec_bump-major.bat`
43
+ - Agents must **not** run bump scripts unless explicitly asked
44
+
45
+ ## Project commands
46
+
47
+ - `/release-bump` — manual bump steps (`.cursor/commands/`)
48
+ - `/tox-matrix` — tox troubleshooting
49
+
50
+ ## Do not touch
51
+
52
+ - `.tox/`, `venv/`, build artifacts
@@ -0,0 +1,11 @@
1
+ =========
2
+ Changelog
3
+ =========
4
+
5
+ .. towncrier release notes start
6
+
7
+ Unreleased
8
+ ==========
9
+
10
+ Initial package scaffold of ``django-agentweb``.
11
+ See ``news/`` for in-progress change fragments.
@@ -0,0 +1,2 @@
1
+ # Require review from Code Owners
2
+ * @dlrsp-dev @dlrsp-actions[bot]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2010-present DLRSP (https://dlrsp.org) and other contributors.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,16 @@
1
+ include *.py
2
+ include *.rst
3
+ include *.md
4
+ include *.yaml
5
+ include *.yml
6
+ include *.cfg
7
+ include tox.ini
8
+ include LICENSE
9
+ include CODEOWNERS
10
+
11
+ recursive-include requirements *.in *.txt
12
+ recursive-exclude requirements *.py
13
+ recursive-include src *.py *.html *.css *.js *.po *.mo *.gif *.png *.txt *.json
14
+ recursive-include tests *.py
15
+ recursive-include news *.rst
16
+ recursive-exclude docs *
@@ -0,0 +1,172 @@
1
+ Metadata-Version: 2.4
2
+ Name: django-agentweb
3
+ Version: 0.0.1
4
+ 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.
5
+ Home-page: https://github.com/DLRSP/django-agentweb
6
+ Author: DLRSP
7
+ Author-email: DLRSP <dlrsp.dev@gmail.com>
8
+ License-Expression: MIT
9
+ Project-URL: Homepage, https://github.com/DLRSP/django-agentweb
10
+ Project-URL: Documentation, https://dlrsp.github.io/django-agentweb/
11
+ Project-URL: Repository, https://github.com/DLRSP/django-agentweb
12
+ Project-URL: Issues, https://github.com/DLRSP/django-agentweb/issues
13
+ Project-URL: Changelog, https://github.com/DLRSP/django-agentweb/blob/main/CHANGELOG.rst
14
+ Project-URL: Funding, https://github.com/sponsors/DLRSP
15
+ Keywords: django,llms-txt,ai-agents,schema-org,json-ld,webmcp,mcp,agentic-commerce,agent-ready-web,structured-data
16
+ Classifier: Development Status :: 3 - Alpha
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Framework :: Django :: 5.2
21
+ Classifier: Environment :: Web Environment
22
+ Classifier: Framework :: Django
23
+ Classifier: Framework :: Django :: 3.2
24
+ Classifier: Framework :: Django :: 4.2
25
+ Classifier: Intended Audience :: Developers
26
+ Classifier: Operating System :: OS Independent
27
+ Classifier: Programming Language :: Python
28
+ Classifier: Programming Language :: Python :: 3
29
+ Classifier: Programming Language :: Python :: 3 :: Only
30
+ Classifier: Programming Language :: Python :: 3.10
31
+ Classifier: Programming Language :: Python :: 3.11
32
+ Classifier: Topic :: Internet :: WWW/HTTP
33
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
34
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
35
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
36
+ Classifier: Topic :: Software Development :: Libraries
37
+ Requires-Python: >=3.10
38
+ Description-Content-Type: text/markdown
39
+ License-File: LICENSE
40
+ Requires-Dist: Django>=3.2
41
+ Provides-Extra: webmcp
42
+ Requires-Dist: requests>=2.28; extra == "webmcp"
43
+ Provides-Extra: webbotauth
44
+ Requires-Dist: cryptography>=42; extra == "webbotauth"
45
+ Provides-Extra: commerce
46
+ Requires-Dist: requests>=2.28; extra == "commerce"
47
+ Provides-Extra: all
48
+ Requires-Dist: requests>=2.28; extra == "all"
49
+ Requires-Dist: cryptography>=42; extra == "all"
50
+ Provides-Extra: testing
51
+ Requires-Dist: coverage; extra == "testing"
52
+ Requires-Dist: codecov; extra == "testing"
53
+ Requires-Dist: pytest; extra == "testing"
54
+ Requires-Dist: pytest-django; extra == "testing"
55
+ Provides-Extra: docs
56
+ Requires-Dist: mkdocs>=1.5; extra == "docs"
57
+ Requires-Dist: mkdocs-material>=9.0; extra == "docs"
58
+ Requires-Dist: pymdown-extensions>=10.0; extra == "docs"
59
+ Requires-Dist: mkdocs-git-revision-date-plugin>=2.0; extra == "docs"
60
+ Provides-Extra: linting
61
+ Requires-Dist: flake8; extra == "linting"
62
+ Requires-Dist: flake8-pyproject; extra == "linting"
63
+ Requires-Dist: flake8-bugbear; extra == "linting"
64
+ Requires-Dist: flake8-comprehensions; extra == "linting"
65
+ Requires-Dist: flake8-tidy-imports; extra == "linting"
66
+ Requires-Dist: flake8-typing-imports; extra == "linting"
67
+ Requires-Dist: pylint; extra == "linting"
68
+ Dynamic: license-file
69
+
70
+ # django-agentweb
71
+
72
+ [![CI/CD](https://github.com/DLRSP/django-agentweb/actions/workflows/ci.yaml/badge.svg)](https://github.com/DLRSP/django-agentweb/actions/workflows/ci.yaml)
73
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
74
+
75
+ Make your Django site a **first-class citizen of the agentic web**.
76
+
77
+ `django-agentweb` is a reusable Django app that helps AI agents (and the LLMs
78
+ behind them) **discover, understand, and act on** your site — across five
79
+ complementary domains. Every domain is **opt-in per site** and **off by
80
+ default**, so you expose only what you choose.
81
+
82
+ > Status: **alpha**. Core domains (llms.txt, JSON-LD profiles, discovery /
83
+ > ai-catalog + MCP server-card, browser WebMCP, CAP Lite) are implemented and
84
+ > opt-in per site. Booking adapters and extras (Web Bot Auth, full SDF) follow.
85
+ > See the [roadmap](#roadmap).
86
+
87
+ ## The five agent-web domains
88
+
89
+ | # | Domain | What it provides | Standard(s) |
90
+ |---|--------|------------------|-------------|
91
+ | 1 | **Readability** | `llms.txt` / `llms-full.txt`, per-language variants | `llms.txt` |
92
+ | 2 | **Structured data** | Schema.org JSON-LD (`Hotel`, `HotelRoom`, `Offer`, …) | Schema.org / JSON-LD |
93
+ | 3 | **Discovery** | `/.well-known/` agent descriptors & capability manifest | Agent-Ready Web |
94
+ | 4 | **WebMCP** | In-page tools agents can call (read-only by default) | Web Model Context Protocol |
95
+ | 5 | **Commerce / SDF** | Agentic booking/commerce discovery + hooks; SDF (flag, off) | CAP / UCP / AP2, SDF |
96
+
97
+ ## Why
98
+
99
+ Search and assistants increasingly mediate discovery through agents. For an
100
+ independent hotel, that means letting an agent **check availability, simulate a
101
+ booking price, and start a direct reservation** — and reducing dependence on
102
+ OTAs (Booking.com / Expedia). The same building blocks benefit any content or
103
+ commerce site.
104
+
105
+ This package is intentionally **generic and externally adoptable**: it
106
+ implements all five domains even where a given deployment won't use them, to
107
+ maximise reuse and external visibility.
108
+
109
+ ## Install
110
+
111
+ Until the package is published on PyPI, install from VCS or an editable checkout:
112
+
113
+ ```bash
114
+ pip install "django-agentweb @ git+https://github.com/DLRSP/django-agentweb.git"
115
+ # or: pip install -e ".[testing]"
116
+ ```
117
+
118
+ Extras once installed:
119
+
120
+ ```bash
121
+ pip install "django-agentweb[webmcp]" # + server-side tool proxy
122
+ pip install "django-agentweb[all]" # everything
123
+ ```
124
+
125
+ Requires `django.contrib.sites`.
126
+
127
+ ## Quickstart
128
+
129
+ ```python
130
+ # settings.py
131
+ INSTALLED_APPS = [
132
+ # ...
133
+ "django.contrib.sites",
134
+ "agentweb",
135
+ ]
136
+
137
+ AGENTWEB = {
138
+ "LLMS": {"ENABLED": True},
139
+ "JSONLD": {"ENABLED": True},
140
+ "DISCOVERY": {"ENABLED": True},
141
+ "WEBMCP": {"ENABLED": False},
142
+ "COMMERCE": {"ENABLED": False},
143
+ "SDF": {"ENABLED": False},
144
+ }
145
+ ```
146
+
147
+ ```python
148
+ # urls.py
149
+ from django.urls import include, path
150
+
151
+ urlpatterns = [
152
+ # ...
153
+ path("", include("agentweb.urls")),
154
+ ]
155
+ ```
156
+
157
+ Only the domains you enable register any URLs or expose any data.
158
+
159
+ ## Security
160
+
161
+ Agent-facing surfaces have a distinct threat model (prompt/output injection,
162
+ data leakage, unsafe tool calls). Transactional tools always require
163
+ human-in-the-loop. See [`SECURITY.md`](.github/SECURITY.md).
164
+
165
+ ## Roadmap
166
+
167
+ Readability → structured data → discovery → WebMCP → commerce/booking → SDF,
168
+ followed by per-site rollout. See the package docs for the current domain status.
169
+
170
+ ## License
171
+
172
+ MIT — see [`LICENSE`](LICENSE).
@@ -0,0 +1,103 @@
1
+ # django-agentweb
2
+
3
+ [![CI/CD](https://github.com/DLRSP/django-agentweb/actions/workflows/ci.yaml/badge.svg)](https://github.com/DLRSP/django-agentweb/actions/workflows/ci.yaml)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5
+
6
+ Make your Django site a **first-class citizen of the agentic web**.
7
+
8
+ `django-agentweb` is a reusable Django app that helps AI agents (and the LLMs
9
+ behind them) **discover, understand, and act on** your site — across five
10
+ complementary domains. Every domain is **opt-in per site** and **off by
11
+ default**, so you expose only what you choose.
12
+
13
+ > Status: **alpha**. Core domains (llms.txt, JSON-LD profiles, discovery /
14
+ > ai-catalog + MCP server-card, browser WebMCP, CAP Lite) are implemented and
15
+ > opt-in per site. Booking adapters and extras (Web Bot Auth, full SDF) follow.
16
+ > See the [roadmap](#roadmap).
17
+
18
+ ## The five agent-web domains
19
+
20
+ | # | Domain | What it provides | Standard(s) |
21
+ |---|--------|------------------|-------------|
22
+ | 1 | **Readability** | `llms.txt` / `llms-full.txt`, per-language variants | `llms.txt` |
23
+ | 2 | **Structured data** | Schema.org JSON-LD (`Hotel`, `HotelRoom`, `Offer`, …) | Schema.org / JSON-LD |
24
+ | 3 | **Discovery** | `/.well-known/` agent descriptors & capability manifest | Agent-Ready Web |
25
+ | 4 | **WebMCP** | In-page tools agents can call (read-only by default) | Web Model Context Protocol |
26
+ | 5 | **Commerce / SDF** | Agentic booking/commerce discovery + hooks; SDF (flag, off) | CAP / UCP / AP2, SDF |
27
+
28
+ ## Why
29
+
30
+ Search and assistants increasingly mediate discovery through agents. For an
31
+ independent hotel, that means letting an agent **check availability, simulate a
32
+ booking price, and start a direct reservation** — and reducing dependence on
33
+ OTAs (Booking.com / Expedia). The same building blocks benefit any content or
34
+ commerce site.
35
+
36
+ This package is intentionally **generic and externally adoptable**: it
37
+ implements all five domains even where a given deployment won't use them, to
38
+ maximise reuse and external visibility.
39
+
40
+ ## Install
41
+
42
+ Until the package is published on PyPI, install from VCS or an editable checkout:
43
+
44
+ ```bash
45
+ pip install "django-agentweb @ git+https://github.com/DLRSP/django-agentweb.git"
46
+ # or: pip install -e ".[testing]"
47
+ ```
48
+
49
+ Extras once installed:
50
+
51
+ ```bash
52
+ pip install "django-agentweb[webmcp]" # + server-side tool proxy
53
+ pip install "django-agentweb[all]" # everything
54
+ ```
55
+
56
+ Requires `django.contrib.sites`.
57
+
58
+ ## Quickstart
59
+
60
+ ```python
61
+ # settings.py
62
+ INSTALLED_APPS = [
63
+ # ...
64
+ "django.contrib.sites",
65
+ "agentweb",
66
+ ]
67
+
68
+ AGENTWEB = {
69
+ "LLMS": {"ENABLED": True},
70
+ "JSONLD": {"ENABLED": True},
71
+ "DISCOVERY": {"ENABLED": True},
72
+ "WEBMCP": {"ENABLED": False},
73
+ "COMMERCE": {"ENABLED": False},
74
+ "SDF": {"ENABLED": False},
75
+ }
76
+ ```
77
+
78
+ ```python
79
+ # urls.py
80
+ from django.urls import include, path
81
+
82
+ urlpatterns = [
83
+ # ...
84
+ path("", include("agentweb.urls")),
85
+ ]
86
+ ```
87
+
88
+ Only the domains you enable register any URLs or expose any data.
89
+
90
+ ## Security
91
+
92
+ Agent-facing surfaces have a distinct threat model (prompt/output injection,
93
+ data leakage, unsafe tool calls). Transactional tools always require
94
+ human-in-the-loop. See [`SECURITY.md`](.github/SECURITY.md).
95
+
96
+ ## Roadmap
97
+
98
+ Readability → structured data → discovery → WebMCP → commerce/booking → SDF,
99
+ followed by per-site rollout. See the package docs for the current domain status.
100
+
101
+ ## License
102
+
103
+ MIT — see [`LICENSE`](LICENSE).
@@ -0,0 +1,49 @@
1
+ ---
2
+ site_name: django-agentweb
3
+ site_description: Make Django sites first-class citizens of the agentic web.
4
+ site_url: https://dlrsp.github.io/django-agentweb/
5
+ repo_url: https://github.com/DLRSP/django-agentweb
6
+ repo_name: DLRSP/django-agentweb
7
+ edit_uri: blob/main/docs/
8
+
9
+ theme:
10
+ name: material
11
+ features:
12
+ - navigation.sections
13
+ - navigation.top
14
+ - content.code.copy
15
+ palette:
16
+ - scheme: default
17
+ primary: teal
18
+ toggle:
19
+ icon: material/weather-night
20
+ name: Switch to dark mode
21
+ - scheme: slate
22
+ primary: teal
23
+ toggle:
24
+ icon: material/weather-sunny
25
+ name: Switch to light mode
26
+
27
+ markdown_extensions:
28
+ - admonition
29
+ - pymdownx.highlight
30
+ - pymdownx.superfences
31
+ - tables
32
+ - toc:
33
+ permalink: true
34
+
35
+ plugins:
36
+ - search
37
+ - git-revision-date
38
+
39
+ nav:
40
+ - Home: index.md
41
+ - Getting started: getting-started.md
42
+ - Domains:
43
+ - Readability (llms.txt): domains/llms.md
44
+ - Structured data (JSON-LD): domains/jsonld.md
45
+ - Discovery: domains/discovery.md
46
+ - WebMCP: domains/webmcp.md
47
+ - Commerce & booking: domains/commerce.md
48
+ - SDF: domains/sdf.md
49
+ - Security: security.md
@@ -0,0 +1,3 @@
1
+ Discovery middleware emits Link/ai-catalog and Permissions-Policy tools=(self)
2
+ when WebMCP is on. CAP Lite Product/Offer helpers under ``agentweb.commerce``.
3
+ Declarative WebMCP form attributes via ``{% webmcp_form_attrs %}``.
@@ -0,0 +1,5 @@
1
+ Discovery adds ARD ``/.well-known/ai-catalog.json`` (specVersion 1.0, CORS ``*``)
2
+ alongside the existing agent descriptor. WebMCP realigned to browser-native
3
+ registration (``{% webmcp_register %}`` + ``webmcp.js`` for
4
+ ``navigator.modelContext``); HTTP tool invoke is an opt-in remote bridge
5
+ (``REMOTE_BRIDGE``, default off).
@@ -0,0 +1,4 @@
1
+ JSON-LD profile stack: generic builders (Organization/WebSite/WebPage/
2
+ Article/Breadcrumb/FAQ + lodging multi-type), ``build_graph`` with ``@id``
3
+ dedupe, profile registry (MVP + additive recipe/person/local_business/review),
4
+ and price-accuracy helper. Native-only; no new runtime extras.
@@ -0,0 +1,4 @@
1
+ Readability domain matured: ``text/plain`` Content-Type, H1+blockquote
2
+ templates, curated ``SECTIONS`` with ``EXCLUDE_PATTERNS``, language-keyed
3
+ cache + ``Vary``/``Content-Language``, ``/{lang}/llms.txt`` via i18n_patterns,
4
+ and ``generate_llms_txt`` under ``agentweb.management``.
@@ -0,0 +1,3 @@
1
+ Added ``/.well-known/mcp/server-card.json`` (MCP Server Card) linked from
2
+ ``ai-catalog.json``, and tightened Core readiness contracts for WebMCP safety
3
+ hints and lodging Offer / UnitPriceSpecification JSON-LD.
@@ -0,0 +1,2 @@
1
+ Ship per-env ``requirements/py*-django*.txt`` locks in the package wheel and
2
+ enable CI wheel-lock assertion for tox matrix installs.
@@ -0,0 +1,5 @@
1
+ Initial package scaffold: core ``agentweb`` app with per-site activation
2
+ (``AGENTWEB`` setting + feature flags) and sub-apps for the five agent-web
3
+ domains — readability (``llms.txt``), structured data (Schema.org/JSON-LD),
4
+ agent discovery (``/.well-known``), WebMCP tools, agentic commerce/booking and
5
+ SDF. Domains are opt-in per site and default to off.