Skip to main content

Django for Agents

github-tests-badge github-mypy-badge codecov-badge pypi-badge pypi-versions license-badge

django-for-agents helps Django projects expose agent-friendly content:

  • Markdown responses via HTTP content negotiation (Accept: text/markdown).
  • Optional debug toggle (?for_agents=1) in development.
  • Automatic llms.txt endpoint generation from your URL configuration.
  • Frontmatter metadata and markdown whitespace normalization.

Supported Python versions: 3.12, 3.13, 3.14.

Install

uv add django-for-agents

Minimal setup

  1. Add the app to INSTALLED_APPS.
  2. Include django_for_agents.urls in your root URL config.
  3. Inherit ViewForAgents for pages you want agent-ready.
  4. Optionally create matching .md templates for markdown responses.

If no matching .md template exists, django-for-agents falls back to converting the rendered HTML template into markdown automatically. This fallback requires the optional markdownify dependency:

uv add 'django-for-agents[markdown]'

If neither a .md template nor markdownify is available, requests for markdown receive a 501 Not Implemented response explaining what is missing, so agents can fall back to HTML instead of hitting a 500.

INSTALLED_APPS = [
    # ...
    "django_for_agents",
]

from django.urls import include, path

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

Documentation

  • Full docs source: docs/
  • Read the Docs config: .readthedocs.yaml

Main docs pages:

  • docs/installation.rst
  • docs/quickstart.rst
  • docs/settings.rst
  • docs/views.rst
  • docs/llms_txt.rst
  • docs/api.rst

Build and publish

uv build
uv publish

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_for_agents-0.0.2.tar.gz (14.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_for_agents-0.0.2-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file django_for_agents-0.0.2.tar.gz.

File metadata

  • Download URL: django_for_agents-0.0.2.tar.gz
  • Upload date:
  • Size: 14.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for django_for_agents-0.0.2.tar.gz
Algorithm Hash digest
SHA256 24e62d5c353e89129f91fd74c49707c3f307fe957abeea48362461a8bd0213b2
MD5 2ec2a018fbb4f56b72bc1fcf5fb47d63
BLAKE2b-256 7b192231d8cde745854515ffac738113b8aced08560d0be0f51379b47e6aa0d9

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_for_agents-0.0.2.tar.gz:

Publisher: release.yml on eillarra/django-for-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file django_for_agents-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_for_agents-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d0911af4d5398804268a9647ec2166ba33360dc24f7a9cf2da80ad2302cda1d8
MD5 d09ffb99092ec210e3fff3404abddec2
BLAKE2b-256 464a2a4ef4a314071fc2a1b7afbc5779c396dec2a87cb539edf73d90cd66c272

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_for_agents-0.0.2-py3-none-any.whl:

Publisher: release.yml on eillarra/django-for-agents

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.0.3

2 files

This release

0.0.2 This release

2 files

0.0.1

2 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