DSPy logo

DSPy

Free tier

The framework for programming—not prompting—language models

Free·All audiences·Open source

Key strengths

Programming (not prompting) language modelsModular AI system composition in PythonAutomatic prompt and weight optimizationSupports classifiers, RAG pipelines, and agent loopsDeclarative Self-improving Python (DSPy) paradigm
Completely free
Founded 2022
Self-hostable

Facts verified against github.com on

Get alerts when DSPy changes

Free. We'll email you when pricing, the free tier, API access or open-source status changes.

No ratings yet

DSPy is an open-source Python framework (MIT license, ~38,500 GitHub stars) that replaces hand-crafted prompt strings with declarative, composable modules for programming language models. Instead of brittle prompt templates, developers define typed signatures and chain modules (e.g., dspy.ChainOfThought, dspy.ReAct) into pipelines. DSPy's optimizers (formerly "teleprompters") then automatically tune prompts and/or fine-tune weights against a metric, eliminating manual prompt engineering. It supports classifiers, retrieval-augmented generation (RAG) pipelines, and multi-step agent loops. Installable via pip install dspy-ai; self-hostable with any compatible LM backend.

Alternatives

Alternatives to DSPy

See all alternatives
Browse all 15 agent frameworks tools

Is DSPy yours? Claim the listing & get the badge