The AI Stack
Sign in

DSPy

Framework for programming modular AI systems with language models.

Updated May 2026

Overview

Website
dspy.ai

Product overview

DSPy (Declarative Self-improving Python) is an open-source framework for building modular AI software that enables developers to program with language models rather than manually engineering prompts. The framework automates prompt optimization and orchestrates LLM fine-tuning, allowing developers to define typed interfaces (signatures) and compose modular components into scalable AI systems. DSPy is maintained by Stanford NLP and designed for building applications ranging from simple classifiers to sophisticated RAG pipelines and agent loops.

Moat

  • Proprietary Technology

DSPy is an open-source Python framework for programming language models, enabling developers to build robust AI applications by treating prompts as optimizable implementation details rather than manual tweaks, using primitives like Signatures, Modules, Adapters, and Optimizers.

Headwinds

Academic project may struggle to compete with well-funded commercial orchestration frameworks despite technical innovation.