Django app for the DeskCrew support widget
A template tag or middleware for AI live chat, tickets and a help center, plus a client to create tickets from your code.
Website • Integrations • For agents • Sign up
⭐ Help more people find DeskCrew. Star this repo!
Live chat, an AI support chatbot and helpdesk ticketing for Django, in one package. django-deskcrew adds the DeskCrew support widget to a Django project: visitors chat with an AI that answers from your knowledge base, anything it cannot answer becomes a ticket, and a human approves every reply before it sends. A template tag for your base template or an opt-in middleware, plus a small client so a contact form, a view or a Celery task can open a ticket from Python.
Works with Django 4.2 to 5.2, HTMX, Django REST Framework sites with a template front end, Wagtail and django-allauth. Nothing to add to static files or a bundler. Free plan, no credit card: https://deskcrew.io/signup
- Live chat on a Django site without writing JavaScript: one template tag, or one setting for every page.
- An AI chatbot for customer support that only answers from your own help articles and hands off to a person when unsure.
- Contact form to support ticket: pass the cleaned form data to
create_ticketand the message lands in your inbox as a ticket, no email backend needed. - A help center and knowledge base for a SaaS, an online store, a Wagtail site or an internal tool.
- Replacing a paid chat widget (Intercom, Crisp, Tawk.to, Zendesk, Freshdesk, HelpScout) with one that starts free and never sends a reply you did not approve.
pip install django-deskcrew
# settings.py
INSTALLED_APPS = [..., "deskcrew"]
DESKCREW = {
"WIDGET_KEY": os.environ.get("DESKCREW_WIDGET_KEY"), # pub_... from Dashboard → Install
"BOARD": "your-board", # optional
"SITE_URL": "https://www.example.com", # this site's public origin
# "COLOR": "#4f46e5", "POSITION": "right", "GREETING": "Hi! How can we help?",
}In your base template, just before </body>:
{% load deskcrew %}
{% deskcrew_widget %}Or set "AUTO_INJECT": True and add "deskcrew.middleware.DeskcrewMiddleware" to MIDDLEWARE; the tag is then added to every successful HTML response. JSON, redirects, streaming responses, errors and pages that already carry the tag are left alone.
Once per environment:
python manage.py deskcrew_register_origin
from deskcrew.client import create_ticket
create_ticket(email=request.user.email, message=form.cleaned_data["message"], name=request.user.get_full_name())Returns True when DeskCrew accepted the ticket. It never raises into your request cycle and gives up after ten seconds.
pip install django-deskcrew, add "deskcrew" to INSTALLED_APPS, put your widget key in the DESKCREW setting, and add {% load deskcrew %}{% deskcrew_widget %} before </body> in your base template. Every template that extends it gets the chat bubble. Set "AUTO_INJECT": True with the middleware instead if you would rather not touch templates.
Yes. The widget mounts once into its own container, so HTMX swaps and partial updates do not touch it. Wagtail pages render through your base template like any other. A DRF project only needs it on the templates that serve a browser; the middleware skips JSON responses.
No. The widget is a single external script loaded from deskcrew.io, not a static asset. There is nothing to collect, pin or bundle.
Yes. create_ticket(name=, email=, message=) posts the ticket and returns True or False. It never raises into your request cycle and times out after ten seconds, so call it from a task (Celery, Django-Q, Huey) when you create tickets in bulk.
It answers only from the knowledge base you publish on DeskCrew and says so when it does not know. Anything it cannot answer becomes a ticket, and a person approves every outbound reply. The AI never emails a customer on its own.
Yes. The free plan includes the chat widget, ticketing, a public help center and a monthly AI answer allowance, with no credit card. Paid plans add inbound email, white-label and more AI answers: https://deskcrew.io/pricing
The client in deskcrew.client is plain Python and works anywhere. The template tag, middleware and management command are Django-only; on Flask or FastAPI paste the one-line widget snippet from https://deskcrew.io/integrations/django into your base template instead.
One script tag pointing at https://deskcrew.io/desk.js with your public key and the optional board, colour, position and greeting, each validated and escaped. deskcrew_register_origin posts your SITE_URL and key to https://deskcrew.io/api/widget/register-origin. create_ticket posts the name, email and message to https://deskcrew.io/api/widget/submit with SITE_URL as the Origin. Nothing else leaves your project. Terms: https://deskcrew.io/terms. Privacy: https://deskcrew.io/privacy.
Python 3.9 to 3.13. Django 4.2, 5.0, 5.1 or 5.2.
MIT

