// agents · stanfordnlp/dspy

dspy

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.

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

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

  • Optimize a RAG pipeline systematically.
  • Build LM features with versioned, testable code.
  • Tune few-shot examples automatically.
  • Compare model behavior across tasks.
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.

  • openclaw★ 391.6k

    A personal AI that really does things — on any OS, with your data staying yours.

  • superpowers★ 294.9k

    An agentic skills framework & software development methodology that works.

  • ECC★ 275.2k

    Agent harness optimization system with skills, memory and security for Claude Code, Codex and more

  • hermes-agent★ 252.0k

    The agent that grows with you — a Python framework for adaptive AI agents.

  • deepseek-harness★ 245.5k

    DeepSeek's plugin-based agent harness where everything is a plugin.

// more in agents

More in AI Agents

Nearby AI Agents projects in the catalogue, closest in stars to dspy — keep exploring the shelf either side of it.

  • UI-TARS-desktop★ 39.2k

    ByteDance's open-source multimodal AI agent stack: GUI agents that see and operate real desktops

  • playwright-mcp★ 37.9k

    Microsoft's Playwright-powered MCP server for browser automation.

  • OpenViking★ 39.4k

    A self-evolving context database unifying agent memory, RAG, and skills.

  • khoj★ 37.6k

    Your self-hostable AI second brain for answers, agents, and automations.

  • LightRAG★ 40.0k

    Simple, fast retrieval-augmented generation with graph smarts.

  • firecracker★ 37.2k

    Secure, fast microVMs that make serverless possible.

Get dspy

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