Back to directory

DSPy

A framework for programming language models with compositional Python code instead of hand-written prompts, with algorithms that optimize the prompts and weights of the resulting pipeline.

DSPy

DSPy lets a developer build modular AI systems, such as classifiers, retrieval-augmented generation pipelines or agent loops, as Python code rather than as brittle hand-tuned prompt strings. The name stands for Declarative Self-improving Python: a program is written declaratively, and DSPy's optimizers then adjust its prompts and, where supported, model weights to improve output quality.

The project publishes a series of research papers behind its optimization techniques, including work on compiling declarative language model calls into self-improving pipelines, optimizing instructions and demonstrations for multi-stage programs, and reflective prompt evolution.

It installs from PyPI, is written in Python, and is licensed under the MIT license.

More in Agent frameworks

See all 902
  • Recurse

    recurse.run

    A serverless harness that lets a coding agent design, test, and deploy its own specialist sub-agents as tools, MCP servers, or bots, defined by a schema-validated manifest.

  • ProofForge

    shulgin.is-a.dev

    An AI-agent pipeline that decomposes a mathematics problem, proves each piece, and formalizes the result in Lean 4 and Mathlib until the Lean kernel accepts it, with six of its proofs already merged into Google DeepMind's formal-conjectures repository.

  • local-coder

    github.com

    Builds a local coding-agent team on top of Ollama and OpenCode by detecting the machine's hardware, recommending models for seven specialist roles, and testing whether each assigned model can actually use tools, edit a repository and pass verification.