Skip to content

Choosing Backends

Every infrastructure and AI package in QuadKit separates caller code from backend drivers: your services inject a protocol from quadkit-contracts, application.yaml selects the backend, and optional extras pull only the SDKs you run in production.

Availability: quadkit-ai-llm is published at 0.0.50, alongside the SQL and cache packages.

Terminal window
uv add "quadkit-ai-llm[anthropic,openai]"
uv add "quadkit-sql[postgres]"
uv add "quadkit-cache[redis]"
ProviderExtraBest forKey trade-off
anthropic[anthropic]Tool-heavy agents, long context, coding & structured reasoningAPI cost on frontier tiers
openai[openai]Broad model catalog, structured outputs, multimodal workloadsCloud API dependency
ollama[ollama]Local dev, offline CI, strict data residencyRequires local GPU/CPU capacity
groq[groq]Ultra-low-latency token streaming on open-weight modelsContext window & rate caps vary by tier
mistral / cohere[mistral], [cohere]Multilingual generation, EU residency, enterprise rerank/chatSmaller ecosystem than OpenAI/Anthropic
openrouter(built-in HTTP)Single key across dozens of hosted models & fallback chainsAdditional gateway hop
BackendExtraBest forKey trade-off
sqlite[sqlite]Local development, single-node apps, fast integration testsSingle writer; limited ALTER TABLE
postgres[postgres]Production default — transactional workloads, JSONB, concurrencySeparate database service to operate
mysql[mysql]Existing MySQL/MariaDB fleets and read-replica topologiesFewer JSON/index capabilities than PostgreSQL
BackendExtraBest forKey trade-off
memory(built-in)Local dev, tests, single-process servicesProcess-local; cleared on restart
redis[redis]Production caching, stampede locks, shared TTL stateRequires Redis/Valkey
memcached[memcached]High-throughput volatile key-value cachingNo persistence or rich data structures
BackendExtraBest forKey trade-off
local(built-in)Development, single-host deployments, test fixturesHost-bound disk; no built-in CDN
s3 / S3-compatible (r2, MinIO)[aws]General object storage, presigned uploads/downloadsEgress fees on AWS S3 (zero egress on Cloudflare R2)
gcs[gcp]GCP-native workloadsTied to GCP IAM & buckets
azure[azure]Azure-native workloadsTied to Azure Blob Storage

Event & background job backends (quadkit-events, quadkit-tasks)

Section titled “Event & background job backends (quadkit-events, quadkit-tasks)”
BackendPackage / ExtraBest forKey trade-off
memoryBuilt into bothIn-process domain events, tests, single-worker jobsLost on process exit
sqlite / postgresquadkit-events[sqlite,postgres]Durable event store, transactional outbox, projectionsThroughput bounded by SQL write rate
redisquadkit-tasks[redis]Low-latency background job queues & scheduled tasksAt-most-once unless paired with retries/DLQ
rabbitmqquadkit-events[rabbitmq], quadkit-tasks[rabbitmq]Durable routing, acknowledgements, dead-letter exchangesBroker operational overhead
kafkaquadkit-events[kafka]High-volume event streaming, consumer groups, replayHeaviest operational footprint

For multi-step business processes with retries, human approvals, or compensating rollbacks across services, pair events/tasks with quadkit-workflow.

Notification channels (quadkit-notification)

Section titled “Notification channels (quadkit-notification)”
ChannelExtraTypical use
console / memory(built-in)Local development, deterministic test assertions, in-app inbox
smtp / sendgrid(built-in SMTP), [sendgrid]Transactional email, digests, verification links
twilio[twilio]SMS alerts and verification codes
apns / web-push[apns], [web-push]Mobile and browser push notifications
slack / whatsapp[slack], [whatsapp]Operational alerts and customer messaging
CapabilityExtraWhen to enable
Health checks (/health, /ready)(built-in)Every service — aggregates provider health_check() status automatically
Host & process gauges[system]CPU, memory, and file-descriptor metrics via psutil
Prometheus /metrics[prometheus]Scraped Kubernetes / VM monitoring stacks
OpenTelemetry OTLP[otel]Distributed traces and metrics exported to Grafana Tempo, Jaeger, Honeycomb, or Datadog