Skip to main content

Djgent

Django AI Agent Framework for building LangChain-powered AI agents in Django applications.

Installation

pip install djgent

Or with uv:

uv add djgent

Default Chat UI

Add Djgent to your Django project:

# settings.py
INSTALLED_APPS = [
    # ...
    "djgent",
    "djgent.chat",
]

DJGENT = {
    "DEFAULT_LLM": "openai:gpt-4o-mini",
    "API_KEYS": {
        "OPENAI": os.environ.get("OPENAI_API_KEY", ""),
    },
    "CHAT_UI": {
        "TITLE": "AI Assistant",
        "TOOLS": ["calculator", "datetime"],
        "AUTO_LOAD_TOOLS": True,
    },
}

Mount the built-in chat routes:

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

urlpatterns = [
    path("ai/", include("djgent.chat.urls")),
]

Run migrations and start Django:

python manage.py migrate
python manage.py runserver

Open http://127.0.0.1:8000/ai/.

Documentation

Read the full documentation here

Links

Metadata

Release files for djgent 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for djgent 0.4.1
File Size Uploaded
djgent-0.4.1.tar.gz 111.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for djgent 0.4.1
File Interpreter ABI Platform
djgent-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 259.4 kB

Release files / djgent-0.4.1.tar.gz

Download URL djgent-0.4.1.tar.gz
Size 111.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7e761b1b5e533738d7c48063a284698a25503ffe90d932c4759727bebd066926
BLAKE2b-256 checksum
How to use checksums
5fecb61e6b46c9262fbc90ade2d27d59be579f40accb88e968ffc3ed9784456c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / djgent-0.4.1-py3-none-any.whl

Download URL djgent-0.4.1-py3-none-any.whl
Size 148.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
63c23fff9e35955950246a12a6c0d3b5aeb7e78eeba44ef07729f0634bfc0f7e
BLAKE2b-256 checksum
How to use checksums
d2cde916ad50f9633d9da52f77a5a5c551d201e6414c44bf51e5ba8388036b12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release 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