DSPy
Framework for programming, not prompting, language models
DSPy is a framework for building language model pipelines by writing modular Python code instead of brittle prompt strings. It can compile and optimize prompts automatically against metrics for self-hosted LLM applications.
Key features
- Declarative LLM modules
- Automatic prompt optimization
- Metric-driven compilation
- Works with local models
Strengths
- Released under the MIT license
- Mature project with 36.7k GitHub stars
- Written in Python
DSPy replaces
Compare DSPy
14 head-to-head comparisons.
Similar self-hosted ai apps
OpenClaw
Self-Hosted AIThe AI that actually does things
Hermes Agent
Self-Hosted AIThe AI agent that grows with you
OpenCode
Self-Hosted AIThe open source AI coding agent
Hugging Face Transformers
Self-Hosted AIState-of-the-art machine learning model library
Replaces OpenAI API
Langflow
Self-Hosted AIVisual framework for building AI agents and RAG pipelines
Replaces Vertex AI Agent Builder
Dify
Self-Hosted AIOpen-source platform for building production LLM apps
Replaces OpenAI Assistants, Vertex AI Agent Builder