# DSPy

**Creator:** Stanford NLP  |  **Category:** workflow  |  **Status:** stable

## Description

Declarative Self-improving Python framework for building modular AI software. Compiles AI programs into effective prompts and weights rather than wrangling raw strings. Supports signatures, modules, optimizers, and LM-agnostic composition.

## Key Features

- Declarative signatures
- Modules and optimizers
- Compilation to prompts or weights
- LM-agnostic (OpenAI, Anthropic, Databricks, Gemini, Ollama, SGLang, LiteLLM)
- RAG and agent loop support
- Self-improving pipelines
- Inference-time optimization

## Resources

- [Website](https://dspy.ai)
- [Specification](https://dspy.ai/)
- [GitHub](https://github.com/stanfordnlp/dspy)

---
*Source: agentprotocols.app — /protocol/dspy*