Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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

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.1a11.tar.gz (127.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.1a11-py3-none-any.whl (164.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: django_ai_sdk-0.1.1a11.tar.gz
  • Upload date:
  • Size: 127.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.13

File hashes

Hashes for django_ai_sdk-0.1.1a11.tar.gz
Algorithm Hash digest
SHA256 86935a33f6b2a807e172135fcad4615054ec0b347596ae227d404154c8ca7397
MD5 d6c786ec6e77ce9eae6ac72642eba6aa
BLAKE2b-256 4ad57b92cd43381e87ef7b0284ef495eb772771143c78e02fcbe24f1aaff79ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_ai_sdk-0.1.1a11-py3-none-any.whl
Algorithm Hash digest
SHA256 0a3657c8f008f84afd216b755bf3dc7022d29cdd62390f212f87bf3284f5cec7
MD5 0b1c133eb681658e4546c44a63b68946
BLAKE2b-256 e78ad9b7c5e7414b89de0799ed03ed613ae6e4a016eb2d299be9530b5ad59c00

See more details on using hashes here.

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