Skip to content
Agenttic
Menu

framework

DSPy

DSPy is a framework for programming—not just prompting—LMs, with optimizers that tune pipelines and agent-like multi-step modules.

  • Python
  • framework

Website: dspy.ai/

GitHub: github.com/stanfordnlp/dspy

Languages: Python

License: MIT

Best for

  • Teams that want optimizable LM pipelines
  • Research-to-production prompt programming
  • Structured multi-step modules with metrics

Pros and cons

Pros

  • Metric-driven optimization mindset
  • Composable modules instead of brittle prompt strings alone
  • Strong academic and engineering following

Cons / trade-offs

  • Different paradigm than role/multi-agent frameworks
  • Requires investment in metrics and datasets

Overview

DSPy treats LM applications as programs with modules and optimizers. For agentic systems, it shines when you can define metrics and systematically improve multi-step behavior rather than hand-tuning prompts forever.