{"data":{"slug":"dspy","name":"DSPy","tagline":"MIT program LMs with signatures and optimizers (Stanford NLP)","category":"agents","categoryName":"AI Agents","url":"https://dspy.ai","github":"https://github.com/stanfordnlp/dspy","pricing":"open-source","hook":"DSPy programs language models — signatures and optimizers instead of brittle prompt strings.","whatsGood":"MIT (stanfordnlp/dspy). Declarative Python modules, compilers/optimizers that tune prompts and weights, community + Stanford NLP lineage. Docs at dspy.ai. Fits classifiers, RAG, and agent loops when you want systematic improvement over hand-tuned templates.","theCatch":"Vs LangChain/LangGraph (orchestration graphs) and Promptfoo (YAML eval/red-team): DSPy is program-and-optimize LMs, not an MCP-first runtime and not a hosted eval SaaS. Optimizer runs cost tokens/compute; you still bring models and data. Not a drop-in coding agent.","verdict":"MIT LM programming framework. Optimize modules; do not confuse it with MCP runtime glue.","addedAt":"2026-09-15","featured":false,"domain":"AI Agents","subSpecialty":"Orchestration","subcategory":"Orchestration","tags":["self-host","permissive","active"],"capabilities":["optimizers","prompts","python"],"surfaces":["Self-host"],"ecosystem":["Python"],"licenseModel":"OSS/MIT","githubStars":38687,"starsPerWeek":196,"access":"free","archived":false,"repo":{"createdAt":"2023-01-09","pushedAt":"2026-10-18","license":"MIT","archived":false,"checkedAt":"2026-10-19"}},"related":[{"slug":"claude-code","name":"Claude Code","tagline":"Terminal-first coding agent with deep repository context"},{"slug":"cursor","name":"Cursor","tagline":"The AI-first code editor that understands your codebase"},{"slug":"devin","name":"Devin","tagline":"Autonomous AI engineer for defined engineering tasks"},{"slug":"stagehand","name":"Stagehand","tagline":"AI-native browser automation that mixes code and natural language"},{"slug":"browser-use","name":"Browser Use","tagline":"Open-source framework for LLM-driven browser agents"}],"links":{"self":"/api/gems/dspy","html":"/gems/dspy","markdown":"/gems/dspy.md","category":"/api/gems?category=agents","categoryPage":"/stacks/agents"}}