Stanford's framework for programming, not prompting, language models, with optimizers that tune your prompts for you.
pip install dspyDSPy lets you build AI systems from small modules instead of long hand-written prompts. You define what each step takes and returns, and DSPy optimizers improve the prompts (or fine-tune weights) against your examples and your metric.
pip install dspy
Start with the tutorials on dspy.ai, which build a small program and optimize it step by step.
Prefect · Tool / CLI
The fast, Pythonic way to build MCP servers and clients, now a full MCP application framework from Prefect.
jingyaogong · Learning resource
Train a 64M-parameter language model from scratch in about two hours, with every step written in plain PyTorch.
Promptfoo · Tool / CLI
Test and compare prompts, agents and RAG pipelines, and red-team them for security problems, from the command line.