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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
djgent-0.4.1.tar.gz
(111.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
djgent-0.4.1-py3-none-any.whl
(148.1 kB
view details)
File details
Details for the file djgent-0.4.1.tar.gz.
File metadata
- Download URL: djgent-0.4.1.tar.gz
- Upload date:
- Size: 111.3 kB
- Tags: Source
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e761b1b5e533738d7c48063a284698a25503ffe90d932c4759727bebd066926
|
|
| MD5 |
3e532adcc5d47fe7fbdc1480dc45a88a
|
|
| BLAKE2b-256 |
5fecb61e6b46c9262fbc90ade2d27d59be579f40accb88e968ffc3ed9784456c
|
File details
Details for the file djgent-0.4.1-py3-none-any.whl.
File metadata
- Download URL: djgent-0.4.1-py3-none-any.whl
- Upload date:
- Size: 148.1 kB
- Tags: Python 3
- Uploaded using 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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63c23fff9e35955950246a12a6c0d3b5aeb7e78eeba44ef07729f0634bfc0f7e
|
|
| MD5 |
70bee817f82ee4764085018773bfd492
|
|
| BLAKE2b-256 |
d2cde916ad50f9633d9da52f77a5a5c551d201e6414c44bf51e5ba8388036b12
|