Installation¶
Base Package¶
Includes: coherence scorer, streaming kernel, safety kernel, ground truth store, heuristic scoring.
Supported Default Path¶
For new users and contributors, the supported default is Python-only:
This path keeps setup to the Python package, FastAPI service, local Chroma persistence, and the CLI. Rust acceleration, the Go gateway, Julia tuning, Lean verification, TensorRT, and WASM are advanced optional paths. They should not be required for the base install, quickstart, or first contributor tasks.
Run director-ai doctor after enabling optional extras. It reports the active
runtime stack and warns when environment settings request optional components
that are not installed.
See Runtime Boundaries for the supported default path and the advanced runtime boundary.
Recommended Setup¶
Use the default path for first local runs, first production trials, and first contributor tasks:
That gives one supported path before choosing specialized backends:
| Layer | Default Choice | Why |
|---|---|---|
| Runtime | Python package | Smallest supported surface |
| API | FastAPI service | Local and production-compatible HTTP path |
| Proxy | Generated quickstart proxy | Standard guarded-chat entry point |
| Retrieval | Local Chroma | Persistent facts without external services |
| Diagnostics | director-ai doctor |
Checks optional runtime drift |
Advanced Backend Matrix¶
Pick an advanced backend only when its capability is required. The base install and quickstart must remain usable without these extras.
Scoring and Inference¶
| Extra | Command | Adds |
|---|---|---|
nli |
pip install director-ai[nli] |
FactCG-DeBERTa-v3-Large NLI (75.6% per-ds mean BA, 14.6ms/pair ONNX GPU) |
embed |
pip install director-ai[embed] |
Embedding cosine-similarity scorer (~65% BA, 3ms CPU) |
nli-lite |
pip install director-ai[nli-lite] |
Distilled NLI (~70% BA, 5ms CPU, ONNX) |
minicheck |
pip install director-ai[minicheck] |
MiniCheck alternative |
onnx |
pip install director-ai[onnx] |
ONNX Runtime inference (14.6ms/pair GPU, portable CPU fallback) |
quantize |
pip install director-ai[quantize] |
bitsandbytes 8-bit quantization |
Retrieval and Knowledge Base¶
| Extra | Command | Adds |
|---|---|---|
vector |
pip install director-ai[vector] |
ChromaDB vector store |
embeddings |
pip install director-ai[embeddings] |
sentence-transformers (bge-large) |
Provider and Agent Integrations¶
| Extra | Command | Adds |
|---|---|---|
openai |
pip install director-ai[openai] |
OpenAI SDK guard |
anthropic |
pip install director-ai[anthropic] |
Anthropic SDK guard |
langchain |
pip install director-ai[langchain] |
LangChain integration |
llamaindex |
pip install director-ai[llamaindex] |
LlamaIndex integration |
langgraph |
pip install director-ai[langgraph] |
LangGraph integration |
haystack |
pip install director-ai[haystack] |
Haystack integration |
crewai |
pip install director-ai[crewai] |
CrewAI integration |
Operations, Training, and Development¶
| Extra | Command | Adds |
|---|---|---|
finetune |
pip install director-ai[finetune] |
Domain-specific NLI fine-tuning (torch, transformers, datasets) |
grpc |
pip install director-ai[grpc] |
gRPC server (grpcio, protobuf) |
physical |
pip install director-ai[physical] |
MuJoCo adapter support; ROS 2 and CARLA use their vendor installs behind the same runtime boundary |
server |
pip install director-ai[server] |
FastAPI server |
otel |
pip install director-ai[otel] |
OpenTelemetry tracing |
enterprise |
pip install director-ai[enterprise] |
Multi-tenant, audit, Redis |
docs |
pip install director-ai[docs] |
MkDocs documentation tools |
dev |
pip install director-ai[dev] |
pytest, ruff, mypy, sphinx |
Production Presets¶
FactCG NLI (75.6% per-dataset mean BA, 14.6ms/pair ONNX GPU batch), ChromaDB + bge-large embeddings, OpenAI SDK interception.
For managed service deployments, start from the recommended setup first and add
provider, NLI, or observability extras only after director-ai doctor reports
the base stack as healthy.
GPU Acceleration¶
For GPU-accelerated NLI scoring:
Set device and dtype:
from director_ai import CoherenceScorer
scorer = CoherenceScorer(
use_nli=True,
nli_device="cuda",
nli_torch_dtype="float16",
nli_quantize_8bit=True, # reduces VRAM, slightly slower than fp32
)
Python Version¶
Requires Python 3.11+.