Skip to content

OrchestrationStanford NLP

DSPy

Program — don't prompt — your language models.

Pricing
FREE
Platforms
APICLI
Models
Model-agnostic
Verified
Jun 13, 2026

DSPy is an open-source Python framework for building LLM applications by writing modular code instead of brittle prompt strings. You declare input/output signatures and compose modules, then DSPy compiles and optimizes the underlying prompts — and can even tune model weights — for classifiers, RAG pipelines, and agent loops.

Capabilities 3

What it actually does — grouped by capability family.

  • Agent framework (primary capability)
  • Prompt management (primary capability)
  • RAG pipeline (secondary capability)

Pros & cons

  • Declarative, modular alternative to prompts
  • Automatic prompt and weight optimization
  • Provider- and model-agnostic
  • Strong research backing and adoption
  • Steeper learning curve than direct prompting
  • Optimizers can add compute and cost
  • Smaller ecosystem than LangChain

Tags

Further reading

View all Orchestration
  • View LangChain details
    OrchestrationFREEOSS

    LangChain

    LangChain

    The default open-source framework for composing LLM apps.

    Python + TypeScript framework for chaining prompts, tools, retrievers, and memory into LLM applications. Ubiquitous in the ecosystem; pairs with LangGraph for agent orchestration and LangSmith for tracing.

    Huge ecosystem of integrations
    Abstraction layers add overhead
    • framework
    • python
    • typescript
    • rag
    • +1
  • View LangGraph details
    OrchestrationFREEOSS

    LangGraph

    LangChain

    Graph-based agent orchestration. Stateful loops with checkpoints.

    LangChain's agent layer. Model agents as nodes in a state graph with persistent checkpoints, human-in-the-loop steps, and durable execution. Strong when you need a long-running, debuggable agent rather than a one-shot chain.

    Durable checkpointed state
    Steeper learning curve
    • agents
    • graph
    • state
    • open-source
  • View LlamaIndex details
    OrchestrationFREEMIUMOpen core

    LlamaIndex

    LlamaIndex

    The data framework for LLM apps — RAG, agents, and document workflows.

    An open-source framework (Python + TypeScript) for connecting LLMs to your data — ingestion, indexing, retrieval, and agentic document workflows. Pairs with the managed LlamaCloud (LlamaParse) for production parsing and extraction. The most-used RAG framework after LangChain.

    Best-in-class RAG primitives
    Narrower than full orchestration frameworks
    • framework
    • rag
    • agents
    • open-source
  • View Pydantic AI details
    OrchestrationFREEOSS

    Pydantic AI

    Pydantic

    Type-safe Python agent framework, the Pydantic way.

    An open-source Python framework for building production-grade agents with validated, structured outputs instead of raw-string parsing. Model-agnostic across OpenAI, Anthropic, Gemini and many more, with composable tools, durable execution, MCP support, and built-in observability via Pydantic Logfire. MIT-licensed from the team behind Pydantic.

    Type-safe, validated structured outputs
    Python-only
    • python
    • agents
    • type-safe
    • open-source