// agents · stanfordnlp/dspy

dspy

Program language models with code and compilers — not fragile prompts.

★ 38.6k stars⑂ 3.4k forksMITupdated 2026-10
▦ visual — this project's README ships no embeddable screenshot,
so here's a placeholder. The guide below is complete regardless.
// project facts

Project facts

dspy is an open-source ai agents project by stanfordnlp (stanfordnlp/dspy on GitHub). It has 38,554 GitHub stars and 3,406 forks, is released under the MIT license, and was last updated on GitHub on 7 October 2026.

GitHub stars
38,554
Forks
3,406
License
MIT
Last updated on GitHub
7 October 2026
Category
AI Agents
Listing
Full install guide
Official site
Official site
// how it works

How it works

  1. Pick a use case

    Choose one concrete task — narrow beats ambitious for a first run.

  2. Clone and explore

    Fetch the source and skim the docs folder.

  3. Configure credentials

    Set the environment variables or keys the project needs.

  4. Launch your first run

    Execute the example workflow and watch what happens.

// features

Why people love it

Program, don't prompt

LM behavior as code with signatures.

Automatic optimizers

Compile and tune programs with data.

Multi-model support

Not tied to a single provider.

Composable modules

Build complex pipelines from simple parts.

Evaluation built in

Measure what your tuning actually did.

Research pedigree

From Stanford NLP, with papers behind it.

Advertisement
// run it

Run it yourself

  1. Step 1 — Clone the repo

    Download the source and move into the project folder.

    git clone https://github.com/stanfordnlp/dspy.git
    cd dspy
  2. Step 2 — Create a venv and install

    Isolate dependencies, then install requirements.

    python -m venv .venv && source .venv/bin/activate
    pip install -r requirements.txt
  3. Step 3 — Run it

    Launch using the entry point shown in the README.

    python -m dspy  # check README for the exact command
// use cases

What you can build

Advertisement
// faq

Questions, answered

Who maintains dspy?

It is an open-source project at stanfordnlp/dspy with 3406 forks. Check the contributors tab and recent commits to judge how active maintenance is.

Is dspy free to use?

Yes — it's MIT licensed: free to use, modify, and ship commercially. Just keep the license notice in copies.

Do I need ML expertise?

Some — DSPy is a programming framework with optimizers, aimed at engineers comfortable with data-driven iteration.

Which models does it support?

Many major providers; programs are model-agnostic by design. Check the docs for the current list.

How do I get started?

Clone the repo and follow the README quickstart — the docs at https://dspy.ai walk through setup.

// keep exploring

Similar tools

AI Agents

system-prompts-and-models-of-ai-tools

FULL Augment Code, Claude Code, Cluely, CodeBuddy, Comet, Cursor, Devin AI, Junie, Kiro, Leap.new, Lovable, Manus, NotionAI, Orchids.app, Perplexity, Poke, Q…

★ 144.0k starsGPL-3.0
View guide →
AI Agents

openpi

Physical Intelligence's open vision-language-action models (pi0, pi0-FAST, pi0.5) for robot policies.

★ 14.1k starsApache-2.0
View guide →
Agents

magentic

Use LLMs as plain Python functions: prompts become typed, testable code.

★ 2.4k starsMIT
View guide →
AI Agents

unstructured

Turn messy documents into clean, structured data for language models.

★ 15.5k starsApache-2.0
View guide →
AI Agents

ida-pro-mcp

AI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.

★ 12.5k starsMIT
View guide →
AI Agents

lerobot

Hugging Face's LeRobot: datasets, models and tools to make real-world robotics AI accessible

★ 28.0k starsApache-2.0
View guide →
// alternatives

Alternatives in AI Agents

The most-starred other AI Agents projects in the LibreAI catalogue — the realistic shortlist if dspy is not the right fit.

Get dspy

Free and open — grab the source, star the repo, and start creating.