# DSPy (slim)

> DSPy is an open-source Python framework from Stanford NLP for writing language-model programs as typed signatures and modules, with a ReAct agent, MCP tool conversion, evaluation and optimisers that tune prompts and weights.

- Full: https://www.anchorterminal.com/tools/dspy.md (~5,500 tokens) · this version ~1,280 tokens · JSON https://www.anchorterminal.com/tools/dspy.json · canonical https://www.anchorterminal.com/tools/dspy
- Index: https://www.anchorterminal.com/llms.txt · API: https://www.anchorterminal.com/api/v1/index.json · MCP: https://www.anchorterminal.com/mcp · Updated: 2026-11-23 · pricing https://www.anchorterminal.com/tools/dspy#pricing · reviews https://www.anchorterminal.com/tools/dspy#reviews
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

**B · 68.3/100 · rank #414 of 1654 · #18 in Agent frameworks & SDKs · not agent-ready · confidence medium**


Assessment: An MIT Python framework with typed signatures, a ReAct agent that returns tool errors to the model, MCP tool conversion, a Deno sandbox for generated code, no telemetry found and monthly releases. Release 3.5 changed defaults and removed APIs in a minor version, and there is no tool approval hook or llms.txt.

## Facts

- Kind: Agent framework · vendor: Stanford NLP · category: Agent frameworks & SDKs · legal entity: not named · provenance 36/100
- Packages: pypi `dspy`
- Auth: None · pricing: Free · x402: no · licence: MIT
- Benchmark probes: not run yet, so Performance is pending
- Surface listed: The open-source dspy package for Python, read from the stanfordnlp/dspy repository (source, docs, workflows, SECURITY.md, tags), dspy.ai (home, tools and MCP pages), OSV and the GitHub search API on 23 November 2026. Nothing was installed
- Agents: dspy.ReAct(signature, tools, max_iters=20) runs structured tool calls, tells the model its turn budget, and forces a final submit when the budget runs out. RLM lets a model write and run Python that can call the model again
- MCP: The mcp extra adds dspy.Tool.from_mcp_tool, which converts tools listed by an MCP client session, with stdio and HTTP examples in the tutorial
- Optimisers: Optimisers such as MIPROv2 and GEPA tune instructions, demonstrations and weights against a metric, and dspy.Evaluate scores programs on a dataset
- Cache: In-memory and on-disk answer caches are on by default, with restricted pickle loading for the disk cache
- Tracing: The production docs point to MLflow tracing, based on OpenTelemetry
- Telemetry: None found in the source. The optional LiteLLM engine sets litellm.telemetry to False
- Runtimes: Python 3.10 to 3.15; tests run on 3.10 to 3.15, with 3.15 allowed to fail
- Which DSPy: The stanfordnlp/dspy project at dspy.ai, the only product of the name found. The package classifier still reads Development Status 3 - Alpha

- Scores: Reliability 62, Performance not tested, Schema & documentation 71, Agent ergonomics 64, Security & auth 60, Payments & pricing 90, Task success not tested, Maintenance & community 87, Transparency & trust 52
- Why: Reliability, Local-package reading. · Schema & documentation, Framework reading. · Agent ergonomics, Framework reading. · Security & auth, Framework reading (telemetry defaults, approvals, guardrails, sandboxing). · Payments & pricing, Self-hosted rule. · Maintenance & community, 3.5.0 tagged on 10 November 2026, 13 days before this check (30). · Transparency & trust, MIT (30).
- Sources: 8, open questions: 5, both in the full twin
- Capabilities: agent.framework, agent.mcp-client, obs.evals
- JSON: https://www.anchorterminal.com/api/v1/tools/dspy.json · card, about 200 tokens, for choosing between listings: https://www.anchorterminal.com/tools/dspy.card.md
- Its vendor verifies the listing with `verify_listing` or `POST https://www.anchorterminal.com/api/v1/verify` (the full twin says how); no effect on the grade.
- Support: Discord https://discord.gg/XCGy2WDCQB; isaac@dspy.ai; https://github.com/stanfordnlp/dspy/issues; more in the full twin

## Before you call it

1. Re-evaluate saved programs after upgrading to 3.5, since the default adapter and prompts changed
2. Install dspy[mcp] and convert each MCP tool with dspy.Tool.from_mcp_tool while the client session stays open
3. Disable the answer cache for calls whose output must change between runs, since memory and disk caches are on by default
4. Wrap tools that send, pay or delete in your own confirmation step, because ReAct runs tools without approval
5. Pin dspy to a minor version, since minor releases remove APIs

## Connect

```bash
pip install dspy   # MCP tools: pip install "dspy[mcp]"
```

## Similar tools

| Tool | Grade | Score | Shared capabilities | Slim |
| --- | --- | --- | --- | --- |
| Cursor Agent SDK | B | 65.5 | agent.framework, agent.mcp-client, obs.evals | https://www.anchorterminal.com/tools/cursor-agent-sdk.min.md |
| AI SDK | AA | 93.6 | agent.framework, agent.mcp-client | https://www.anchorterminal.com/tools/vercel-ai-sdk.min.md |
| OpenAI Agents SDK | AA | 90 | agent.framework, agent.mcp-client | https://www.anchorterminal.com/tools/openai-agents-sdk.min.md |
| Pydantic AI | AA | 85.6 | agent.framework, agent.mcp-client | https://www.anchorterminal.com/tools/pydantic-ai.min.md |
| Strands Agents | A | 83.7 | agent.framework, agent.mcp-client | https://www.anchorterminal.com/tools/strands-agents.min.md |


## Panel reviews (0, desk reviews from public material, no calls made)

