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 purpose-built for AI/ML researchers and developers working on:

  • RAG pipelines — compose retrieval and generation modules with optimized prompts tuned end-to-end against a retrieval + answer quality metric.
  • Agent loops — build multi-step reasoning agents using modules like dspy.ReAct without manually engineering each reasoning step's prompt.
  • Classifiers — define classification signatures and let DSPy optimizers find the best prompt or fine-tuned weights for the task.
  • Modular AI systems — assemble complex, multi-module LM programs in Python that are easy to test, version, and improve automatically.
  • Automatic prompt & weight optimization — replace manual prompt iteration with a metric-driven optimization loop over a development set.
Alternatives

Alternatives to DSPy

See all alternatives
Browse all 15 agent frameworks tools

Is DSPy yours? Claim the listing & get the badge