Thriving Thriving Elixir EX
↑ 30 ?
DSPex nshkrdotcom/DSPex

Declarative Self Improving Elixir - DSPy Orchestration in Elixir

HEALTH ? 74 / Stable
// solo builder// hidden gem elixirbeamotperlang-vmfunctional-programmingaidspydeclarative-programmingself-improvingprogram-optimization ?

// readme

Declarative LLM programming with full access to Stanford NLP’s DSPy framework


Overview

DSPex brings DSPy β€” Stanford NLP’s framework for programming language models β€” to Elixir. It ships with SnakeBridge-generated Dspy.* bindings that mirror DSPy’s package layout (great for HexDocs + IDE navigation), plus a minimal DSPex convenience layer over SnakeBridge’s Universal FFI. Use the generated modules for the full API surface or the thin FFI wrapper for direct calls.

DSPex 0.14.0 pins and generates bindings for DSPy 3.5.0.

Why DSPex?

  • Two access layers β€” Generated Dspy.* modules + a minimal DSPex FFI wrapper
  • Full DSPy access β€” Signatures, Predict, ChainOfThought, optimizers, and more
  • Python-shaped docs β€” Module tree mirrors DSPy packages for clean HexDocs
  • 100+ LLM providers β€” OpenAI, Anthropic, Google, Ollama, and anything LiteLLM supports
  • Production-ready timeouts β€” Built-in profiles for ML inference workloads
  • Elixir-native error handling β€” {:ok, result} / {:error, reason} everywhere

Installation

Prerequisites (one-time):

  • Python…