Technology · Agentic → Frameworks · Open Source · wiki:deep

DSPy

DSPy (Stanford) is a declarative framework for programming language-model pipelines as composable modules with signatures, and for optimizing those pipelines with teleprompters against metrics. It treats prompt quality as an optimization problem rather than folklore. In an agentic OS, DSPy is valuable wherever you can define a metric (faithfulness, task success, latency budget) and want systematic improvement of extractors, routers, or proposal writers.

Why it matters here

In this catalog it is the Frameworks option when you need to compose multi-step agent loops and tool handoffs. Keep DSPy on the observe/propose side of the loop: useful signals and drafts, with human or policy authority still required before anything irreversible runs.

How it works

DSPy programs LM pipelines as modules with signatures, then optimizes prompts/weights against metrics (teleprompters) instead of hand-tuning strings.

  1. Declare signatures and modules (Predict, ChainOfThought, …).
  2. Compose a program over datasets.
  3. Optimize with a teleprompter against a metric.
  4. Compile/run the optimized program in production.

Related: mirascope · topics/32-eval-harnesses · topics/12-central-nervous-system

Flow

When to reach for it

  • Use when: DSPy (Stanford) is a declarative framework for programming language-model pipelines as composable modules with signatures, and for optimizing those pipelines with teleprompters against metrics matches the bottleneck and you specifically need to compose multi-step agent loops and tool handoffs.
  • Skip when: another pack already covers the need with less ops surface, or DSPy would become a second place people retype truth.
  • Prefer instead: compare Mirascope before locking the cell.

Limits

  • Ops: confirm license, hosting, and release cadence for DSPy (stanfordnlp/dspy) before relying on it in a live corridor.
  • Integration: bad credentials, scopes, or schema drift produce empty retrievals or runaway tool/model spend without an obvious UI alarm.
  • Scope: Frameworks components support agents; they are not the company ledger or the approval authority.

What we checked

Claims below are backed by science sources on disk.

Primary / product role

DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines · MODERATE

“We introduce DSPy, a programming model that abstracts LM pipelines as text transformation graphs, i.e. imperative computation graphs where LMs are invoked through declarative modules.”

Docs or contrast

stanfordnlp/dspy repository · MODERATE

“DSPy is a framework for programming—not prompting—language models.”

Additional source

When DSPy vs LangGraph (cross-source) · MODERATE

“DSPy is often a better fit when the primary goal is metric-guided prompt or program optimization.”
Research inventory

9 tags · 38 out · 39 in · 3 artifacts · 1 gaps · 21 corpus docs

Catalog tags

landscape.layer
Agentic
landscape.subcategory
Frameworks
license_tag
Open Source
maps.dm
absent
maps.features
13
one_liner
Frameworks
review.depth
science
slug
dspy
title
DSPy

Artifacts

  • dm_map · absent
  • features_map · present · technologies/dspy/features.md
  • readme · present · technologies/dspy/README.md

Out · alternative_to

Out · maps_to

In · alternative_to

In · in_stack

In · maps_to

Corpus tags

category
Agentic → Frameworks
dedication
open-source
feature
agent-building-platform
agent-lifecycle
caas-platform
learning-adaptation
multi-agent-collaboration
os-agent-infrastructure
os-ai-workforce
r2-01-architecture
r2-02-assistant-expert
r2-33-skill-registry
single-purpose-agent
wt-authoring
wt-intelligence
kind
map_edge
tech_features
tech_quote
tech_readme
needs_deepen
false
quality
ok
slug
dspy
source_id
arxiv-2310-03714
dspy-github
langgraph-vs-dspy-2607
technology
dspy

Corpus documents (21)

map_edge · 13

  • dspy → agent-building-platform
  • dspy → agent-lifecycle
  • dspy → caas-platform
  • dspy → learning-adaptation
  • dspy → multi-agent-collaboration
  • dspy → os-agent-infrastructure
  • dspy → os-ai-workforce
  • dspy → r2-01-architecture
  • … +5 more

tech_features · 1

  • DSPy · features

tech_quote · 6

  • DSPy · arxiv-2310-03714
  • DSPy · arxiv-2310-03714
  • DSPy · arxiv-2310-03714
  • DSPy · dspy-github
  • DSPy · langgraph-vs-dspy-2607
  • DSPy · langgraph-vs-dspy-2607

tech_readme · 1

  • DSPy