Skip to main content

Django AI SDK is a library that provides tools and utilities for building AI-powered applications with Django. It includes features such as natural language processing, machine learning, and integration with popular AI frameworks.

Project description

Django AI SDK

A Django SDK for building AI-powered applications with support for multiple LLM providers, RAG (Retrieval-Augmented Generation), and streaming responses.

Project Status: Read This First

This is an early preview. We're actively iterating on the API and learning from real usage. Here's what that means for you:

  • Expect breaking changes: APIs will shift as we find better patterns.
  • Migrations might be reset: Don't rely on database schema stability between versions.
  • Not for production: Use this for experimentation, prototypes, and side projects. Keep critical workloads elsewhere.
  • Watch the repo: Things change quickly. Star & watch to stay in the loop.
  • Your feedback shapes the SDK: Break things, open issues, tell us what hurts.

We'd love to have you along for the ride, just keep your seatbelt on.

Install

pip install django-ai-sdk

Or with uv:

uv add django-ai-sdk

Quick Start

1. Add to INSTALLED_APPS

# settings.py
INSTALLED_APPS = [
    ...
    "django_ai_sdk",
]

Then run python manage.py migrate.

2. Define your assistant

# assistants.py
from django_ai_sdk import Assistant

class HelpDeskAssistant(Assistant):
    name = "Help Desk"
    model = "gpt-4o"
    instructions = "You are a helpful support assistant."

3. Return a streaming response

# views.py
from .assistants import HelpDeskAssistant

assistant = HelpDeskAssistant()

@router.post("/chat")
async def chat(request, payload: ChatRequest):
    return await assistant.as_view(
        payload.messages,
        thread_id=payload.thread_id,
    )

Features

  • RAG Pipelines: BM25, ChromaDB, and Qdrant hybrid search with query expansion.
  • Streaming Responses: Built-in SSE streaming. Works with Vercel AI SDK protocol.
  • Conversation Storage: Automatic message persistence. Thread-based history out of the box.
  • Tool Calling: MCP, memory, and custom tools — all managed by your Assistant.
  • Reindexing: Hot-reload documents. Cached embeddings with simple refresh API.

Documentation

Full documentation and examples: github.com/django-ai-sdk/django-ai-sdk

Project details


Download files

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

Source Distribution

django_ai_sdk-0.1.1a3.tar.gz (108.8 kB view details)

Uploaded Source

Built Distribution

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

django_ai_sdk-0.1.1a3-py3-none-any.whl (142.6 kB view details)

Uploaded Python 3

File details

Details for the file django_ai_sdk-0.1.1a3.tar.gz.

File metadata

  • Download URL: django_ai_sdk-0.1.1a3.tar.gz
  • Upload date:
  • Size: 108.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for django_ai_sdk-0.1.1a3.tar.gz
Algorithm Hash digest
SHA256 eaebbb07494aa6123280a3a1cbe9f0a9342b9757c6679f2b80a47ac6df6a286b
MD5 fb89317ce66581b4db2b216a3d4b5ea4
BLAKE2b-256 b2dd14557174f28365bf5f15705a588bf3859185ece368c570698f4cc20b1aef

See more details on using hashes here.

File details

Details for the file django_ai_sdk-0.1.1a3-py3-none-any.whl.

File metadata

  • Download URL: django_ai_sdk-0.1.1a3-py3-none-any.whl
  • Upload date:
  • Size: 142.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for django_ai_sdk-0.1.1a3-py3-none-any.whl
Algorithm Hash digest
SHA256 ed7fb8c9a2f2f55c885117ce4c9870cec39e34ffe0758b1bb2876dfb0c8bde50
MD5 ddd7156022898898dbc2f1a32d538d6c
BLAKE2b-256 903a8ec7dcad3c679530d3839873eb85100f20dc4118000c65e3846908bbf9da

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page