T
Teklora-solutions/django-llm-kit
LangGraph and LangChain for Django: touchpoints, model catalogue, agents, observability and monitoring
★ 1·更新 2026-11-16
在 GitHub 查看 ↗链接已于 2026-11-17 核查 · HTTP 200 · 打开的是厂商自己的官网
装完之后怎么算装好了
- 装完该看到什么 — 命令正常结束时退出码为 0,终端里没有 "command not found" 或 "permission denied"。
- 一行自检 — 按该仓库 README 里给出的最小用法跑一次;能按 README 的描述输出就是通了。
- 答不出来怎么办 — 这个项目没有写排错说明,去仓库的 Issues 搜 install。
安装命令取自该仓库;以上判据只描述可观察到的结果,不替代项目自己的文档。
- ★ 数取值
- 1 ★ · Teklora-solutions/django-llm-kit · 取自 GitHub 搜索 API · (2026-11-19 20:00:48 核对)
- 来源明细
- 从该仓库的 GitHub 页面直接读取 · 条目类型:开源项目
- 收录与活跃
- 收录于 2026-11-16 · 最近见到 2026-11-20 · 共见到 5 次 · 被 1 个来源列出
- 评分构成
- 综合分 103 · 1 ★ · 1 个来源 · repo
- 安装
- 安装命令见上方「安装与配置」。
常见问题(答案都来自我们的记录)
它适合谁 / 用来做什么?
我们把它归在这些标签下: 开源项目。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库
Teklora-solutions/django-llm-kit;我们收录于 2026-11-16;最近见到 2026-11-20。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。README 原文(英文,未翻译) · 在 GitHub 读完整 README →
# django-llm-kit
以下摘录自该仓库的 README(片段)
Use LangGraph and LangChain in Django the Django way. Declare your models, agents and tools in code; llm-kit gives you the database storage, the HTTP and WebSocket endpoints, the admin screens, and a record of every call and what it cost.
Documentation: https://teklora-solutions.github.io/django-llm-kit/ · for AI assistants: llms.txt, llms-full.txt, and every page as Markdown.
Touchpoints: each place your code calls a model declares its model, fallbacks, required capabilities and who may choose the model (server, or client within limits). Admins can narrow it without a deploy.
Agents and subagents: one harness runs every agent; a subagent is the same harness with another model, prompt and tools. Delegation, limits, history windows, admin overrides, and a recorded run tree.
Tools from your models: declare what agents may see on a Django model and get find/save tools, limited to the caller's rows, with Django permissions and approval before changes.
Model catalogue: prices, limits and capabilities for ~12,600 models, synced from models.dev, OpenRouter and LiteLLM.
Observability: every model call, tool call and run recorded: tokens, cost, latency, time to first token, which model answered after fallbacks, and classified errors. Database, JSON logs, OpenTelemetry.
Monitoring: query functions, JSON API, an admin dashboard, a per-provider circuit breaker, alerts (email/webhook/signal), llm_kit_status, Prometheus.
Checkpointers: DjangoSaver keeps LangGraph state in your Django database (SQLite, Postgres, MySQL); or use LangGraph's PostgresSaver or your own.
Streaming and APIs: async SSE views, a DRF API and a Channels WebSocket consumer, with one payload and one set of events.
Access control: threads belong to a user, a visitor, a key your code chose, or nobody; tenants are isolated.
pip install "django-llm-kit[all]" # drf + channels + litellm + crypto + otel; or pick extras
Requires Python 3.11+, Django 5.0+, LangGraph 1.1.5+ and LangChain 1.0+ (langchain-core 1.2.5+).
## Quick start
python
# settings.py
INSTALLED_APPS = [
"daphne", # optional: makes runserver ASGI so SSE/WebSockets stream
...,
"rest_framework", # optional
"channels", # optional
"llm_kit",
LLM_KIT = {
# "touchpoint": the policy a client's "model" choice is checked against
"GRAPHS": {"assistant": {"graph": "myapp.graphs:builder", "touchpoint": "myapp.chat"}},
python
# myapp/touchpoints.py (imported automatically at startup)
from llm_kit import ClientChoice, touchpoint
chat = touchpoint(
"myapp.chat",
default="anthropic/claude-sonnet-5-5",
fallbacks=["gemini/gemini-3.8-flash"],
requires={"tool_call": True},
choice=ClientChoice(allow=("anthropic/", "gemini/"), max_price_input=5),
python
# myapp/graphs.py
from langgraph.graph import START, END, MessagesState, StateGraph
from myapp.touchpoints import chat
def call_model(state: MessagesState, config):
llm = chat.model(config=config) # the client's pick if allowed, else the default; with fallbacks
return {"messages": [llm.invoke(state["messages"], config)]}
Documentation: https://teklora-solutions.github.io/django-llm-kit/ · for AI assistants: llms.txt, llms-full.txt, and every page as Markdown.
Touchpoints: each place your code calls a model declares its model, fallbacks, required capabilities and who may choose the model (server, or client within limits). Admins can narrow it without a deploy.
Agents and subagents: one harness runs every agent; a subagent is the same harness with another model, prompt and tools. Delegation, limits, history windows, admin overrides, and a recorded run tree.
Tools from your models: declare what agents may see on a Django model and get find/save tools, limited to the caller's rows, with Django permissions and approval before changes.
Model catalogue: prices, limits and capabilities for ~12,600 models, synced from models.dev, OpenRouter and LiteLLM.
Observability: every model call, tool call and run recorded: tokens, cost, latency, time to first token, which model answered after fallbacks, and classified errors. Database, JSON logs, OpenTelemetry.
Monitoring: query functions, JSON API, an admin dashboard, a per-provider circuit breaker, alerts (email/webhook/signal), llm_kit_status, Prometheus.
Checkpointers: DjangoSaver keeps LangGraph state in your Django database (SQLite, Postgres, MySQL); or use LangGraph's PostgresSaver or your own.
Streaming and APIs: async SSE views, a DRF API and a Channels WebSocket consumer, with one payload and one set of events.
Access control: threads belong to a user, a visitor, a key your code chose, or nobody; tenants are isolated.
pip install "django-llm-kit[all]" # drf + channels + litellm + crypto + otel; or pick extras
Requires Python 3.11+, Django 5.0+, LangGraph 1.1.5+ and LangChain 1.0+ (langchain-core 1.2.5+).
## Quick start
python
# settings.py
INSTALLED_APPS = [
"daphne", # optional: makes runserver ASGI so SSE/WebSockets stream
...,
"rest_framework", # optional
"channels", # optional
"llm_kit",
LLM_KIT = {
# "touchpoint": the policy a client's "model" choice is checked against
"GRAPHS": {"assistant": {"graph": "myapp.graphs:builder", "touchpoint": "myapp.chat"}},
python
# myapp/touchpoints.py (imported automatically at startup)
from llm_kit import ClientChoice, touchpoint
chat = touchpoint(
"myapp.chat",
default="anthropic/claude-sonnet-5-5",
fallbacks=["gemini/gemini-3.8-flash"],
requires={"tool_call": True},
choice=ClientChoice(allow=("anthropic/", "gemini/"), max_price_input=5),
python
# myapp/graphs.py
from langgraph.graph import START, END, MessagesState, StateGraph
from myapp.touchpoints import chat
def call_model(state: MessagesState, config):
llm = chat.model(config=config) # the client's pick if allowed, else the default; with fallbacks
return {"messages": [llm.invoke(state["messages"], config)]}
收录徽章(可选)
想把收录标记放进 README 就复制这行,可选,不影响收录。
[](https://anclum.com/zh/s/teklora-solutions-django-llm-kit/)
- 来源
- github · https://github.com/Teklora-solutions/django-llm-kit
- 按领域浏览
- 开源项目
- Traction
- 1 ★
- 收录于
- 今天
更多条目
所属领域与标签
每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。