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.

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.3.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.3-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_for_agents-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 9e1f9fc5f3177a5f63f0b568eaaa7ebf378e6f6a34bdbe0b3c284c29cda9c69b
MD5 73d5e912f6e89070092e4ca37ef04c77
BLAKE2b-256 1671351e4928bb262b2a731a32b704ff39de96f9235f605776e87dead9a3efcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_for_agents-0.0.3.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.3-py3-none-any.whl.

File metadata

File hashes

Hashes for django_for_agents-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2b56967ade2cd042759db6dc3ccebd3dd85c560084c4059a22696006d5d1fbaf
MD5 11f5f9d3c640ef4e4c8927fb68421a62
BLAKE2b-256 780c128be1f484a3a3b947907597821e429a485a28ebb8b15b3633f0db44d878

See more details on using hashes here.

Provenance

The following attestation bundles were made for django_for_agents-0.0.3-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

This release

0.0.3 This release

2 files

0.0.2

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