# DSPy vs Microsoft Agent Framework

> Microsoft Agent Framework scores 83.1 (A) to DSPy's 68.3 (B) for agent frameworks. Prices, MCP, x402, uptime and agent notes side by side.

- Canonical: https://www.anchorterminal.com/compare/dspy-vs-microsoft-agent-framework
- Markdown: https://www.anchorterminal.com/compare/dspy-vs-microsoft-agent-framework.md (~4,850 tokens)
- Slim: https://www.anchorterminal.com/compare/dspy-vs-microsoft-agent-framework.min.md (~780 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/compare/dspy-vs-microsoft-agent-framework.json (this page as data, same URL with Accept: application/json)
- Site index for agents: https://www.anchorterminal.com/llms.txt (the key docs and every listing in one file, at most 16 MB, about 4 million tokens: https://www.anchorterminal.com/llms-full.txt)
- API: https://www.anchorterminal.com/api/v1/index.json
- MCP: https://www.anchorterminal.com/mcp (the whole catalogue as tools, no key)
- DNS: dig +short TXT <slug>.grade.anchorterminal.com (the grade as a DNS TXT record, for a sandbox with no HTTP where names still resolve; also top., best.<category>. and <a>.vs.<b>. under the zone, and the same under grade.letme.dev)
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)
- Updated: 2026-11-23

Microsoft Agent Framework scores 83.1 (A) on agent readiness against DSPy's 68.3 (B), and leads in 6 of 7 scored categories. Both do agent frameworks.

- DSPy: grade B, 68.3/100, rank #414 of 1654. Markdown https://www.anchorterminal.com/tools/dspy.md · JSON https://www.anchorterminal.com/api/v1/tools/dspy.json
- Microsoft Agent Framework: grade A, 83.1/100, rank #15 of 1654. Markdown https://www.anchorterminal.com/tools/microsoft-agent-framework.md · JSON https://www.anchorterminal.com/api/v1/tools/microsoft-agent-framework.json
- Best agent frameworks and SDKs: https://www.anchorterminal.com/best/frameworks/index.md
- All 253 frameworks comparisons: https://www.anchorterminal.com/compare/frameworks/index.md

## Which one, for what

### DSPy (B)

Good for: Python teams who want typed LM programs they can evaluate and optimise against a metric, with ReAct for tool use.

Also in its favour:
- No incidents deducted, where Microsoft Agent Framework loses 5 points for them

Watch for: 3.5 changed the default adapter, reasoning and API routing and removed CodeAct and ProgramOfThought in a minor release

### Microsoft Agent Framework (A)

Good for: Teams on Azure or .NET, and for teams moving off AutoGen or Semantic Kernel, that want MCP, approval, checkpointed workflows and OpenTelemetry in one SDK.

Ahead on:
- Reliability, 78 against 62
- Schema & documentation, 95 against 71
- Agent ergonomics, 87 against 64
- Security & auth, 93 against 60
- Transparency & trust, 85 against 52

Also in its favour:
- Agent-ready, a grade of BB or better
- Free to start without a card

Watch for: Changes marked [BREAKING] shipped in minor releases of released packages, including agent-framework-core in 1.22.0 on 15 October and 1.23.0 on 22 October 2026


## Why the edge

### Security & auth: Microsoft Agent Framework +33

- DSPy (60): Framework reading (telemetry defaults, approvals, guardrails, sandboxing). No telemetry found, and the optional LiteLLM engine switches LiteLLM telemetry off (25). No tool approval hook; RLM runs generated code in a Deno and Pyodide sandbox with no filesystem or network access (10). No prompt-injection guidance found (5). MLflow tracing through OpenTelemetry and callbacks (12). SECURITY.md with GitHub private reporting and a maintainer address, but OSV lists CVE-2025-12695 for the PythonInterpreter sandbox with no fixed version (8). 25+10+5+12+8 = 60.
- Microsoft Agent Framework (93): Framework reading, so SOC 2 isn't scored. A package and version User-Agent goes out on client requests by default, with a feature-usage token on Foundry and Azure OpenAI paths. Both are documented with opt-out variables, and the observability module says the framework contacts no external system itself, with message content in traces off by default (25). `approval_mode` on function and MCP tools, an MCP tool allow-list, and Hyperlight and Monty sandboxes for model-written code in beta. Tools run without approval unless set (20). An Agent Safety page treats model-supplied arguments as untrusted, and FIDES labels content and enforces policy before sensitive tools run, though it is experimental and Python only (15). OpenTelemetry traces, metrics and logs to any exporter (15). SECURITY.md routes reports to MSRC with a bounty programme and coordinated disclosure, CodeQL runs in CI and three advisories were published with fixed versions on 7 October 2026. Microsoft's security.txt still carries an Expires of 23 September 2026 on 1 November. On 1 November the repository's advisories list showed none to our reader, while the GHSA-9f26-7mqc-9vc4 page still loads as published on 7 October, so no advisory after 17 October was found (18).

### Transparency & trust: Microsoft Agent Framework +33

- DSPy (52): MIT (30). The library keeps only its answer cache, in memory and on disk by default, which the cache guide describes; no terms or privacy policy exist for the project (18). Deprecation warnings name the removal version (ReActV2 removed in 3.6), but there is no written policy and 3.5 removed APIs without a prior deprecation release (8). No telemetry, though no page states it (12). 30+18+8+12 = 68.
- Microsoft Agent Framework (85): MIT (30). The core README says what the User-Agent and feature token are, and a design spec in the repository says the token goes only to Foundry and Azure OpenAI pipelines and not to third-party providers. That spec is still marked proposed on 1 November, and we found no statement of how long Microsoft keeps the data and no privacy document for the framework (22). Package lifecycle states are published per package, experimental APIs raise warnings, breaking changes are dated in the Python changelog and there are upgrade guides, but we found no written support window (14). Telemetry is disclosed with two opt-out variables (20).

### Schema & documentation: Microsoft Agent Framework +24

- DSPy (71): Framework reading. A typed Python API with an API reference for modules, tools, adapters and errors (20). No llms.txt at dspy.ai; the docs are Markdown in the repository but not served for agents (0). The tools and ReAct pages say what each part is for and when to read on (15). Tools are typed from signatures and Pydantic annotations and validated against JSON Schema (14). Many tutorials with code, and an errors page in the reference (12). Versioned docs, GitHub release notes and an upgrade guide, with no changelog file (10). 20+0+15+14+12+10 = 71.
- Microsoft Agent Framework (95): Typed in both languages, with py.typed markers and API references for Python and .NET on Microsoft Learn (25). Learn returns each docs page as Markdown when asked with an Accept header. No llms.txt was found (10). The overview has a table for when to use an agent or a workflow, and says to write a function instead where one would do (20). Tools are Python functions typed with Annotated and Pydantic Field, or AIFunction in .NET (15). Samples for every area and a typed exception hierarchy in the source, but we found no exception reference in the docs pages we read (12). A dated Python changelog and four upgrade guides. No changelog file was found for .NET (13).

### Agent ergonomics: Microsoft Agent Framework +23

- DSPy (64): Framework reading. MCP tools through the dspy[mcp] extra, converted one by one from a client session the developer opens (14). max_iters with a turn budget shown to the model and a forced final submit bound a run (17). Unknown tools and tool exceptions return to the model as error results (15). History continuation and saved programs, but no resume of an interrupted run or durable store; answer caching can mask repeated calls (8). Signatures keep required arguments few, an LM must be configured, Python only (10). 14+17+15+8+10 = 64.
- Microsoft Agent Framework (87): The documented Python agent with one MCP server is about 12 lines with `MCPStdioTool` from the core package, and `allowed_tools`, `load_tools` and progressive disclosure limit what reaches the model (25). The function loop stops at 40 iterations by default with a `max_function_calls` option, and compaction has its own docs page (20). A typed exception hierarchy, and the loop stops after three consecutive tool errors by default. We didn't find MCP failures documented (16). Workflows resume from checkpoints and sessions serialise, but we found no retry setting for model calls in the core client (14). An agent needs a client and instructions. Python and .NET are stable, Go is in preview, and the quickstarts assume a Microsoft Foundry project (12).

### Reliability: Microsoft Agent Framework +16

- DSPy (62): Local-package reading. Official PyPI package dspy with Python 3.10 to below 3.16 stated (20). A public test workflow runs on pushes to main and pull requests for Python 3.10 to 3.15; whether main passes wasn't read, as the Actions API refused us (15). 352 open issues and 475 open pull requests on 23 November 2026. The 50 newest issues, opened from 6 October to 23 November, had 19 with a comment and 8 closed (10). Release notes and an upgrade guide for 3.5, but 3.5 changed defaults and removed APIs in a minor release (7). 3.x, while the package classifier still says Alpha, so partial (10). 20+15+10+7+10 = 62.
- Microsoft Agent Framework (78): Read with the local-software lines. Official packages on PyPI (Requires-Python >=3.10 in the repository, though 1.24.0 makes Python 3.11 the supported baseline and says the next release drops 3.10) and NuGet (net8.0 to net10.0, netstandard2.0, net472) (20). Of the 15 most recent .NET build and test runs on 1 November 2026, 10 passed, 2 were cancelled and 4 wait for approval on a pull request, with none failed, and the scheduled runs on main passed on 31 October and 1 November (25). 610 open issues and 229 open pull requests on 1 November, up from 575 and 201 on 8 October. Closures and bug labels weren't re-counted (10). The Python changelog follows Keep a Changelog and states semantic versioning, and marks breaking changes, but they keep shipping in minor releases of released packages, such as agent-framework-core in 1.22.0 on 15 October and 1.23.0 on 22 October 2026 (8). Python 1.24.0 and .NET 1.27.0, with the root and core packages classed 5 - Production/Stable (15).

## Score by category

| Category | Weight | DSPy | Microsoft Agent Framework | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% | 62 | 78 | Microsoft Agent Framework +16 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 71 | 95 | Microsoft Agent Framework +24 |
| Agent ergonomics | 13% | 64 | 87 | Microsoft Agent Framework +23 |
| Security & auth | 14% | 60 | 93 | Microsoft Agent Framework +33 |
| Payments & pricing | 10% | 90 | 90 | even |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 87 | 91 | Microsoft Agent Framework +4 |
| Transparency & trust | 7% | 52 | 85 | Microsoft Agent Framework +33 |
| Negative events | ≤15 | 0 | -5 | |
| **Total** | | **68.3 · B** | **83.1 · A** | |

## Facts side by side

| Fact | DSPy | Microsoft Agent Framework |
| --- | --- | --- |
| Kind | Agent framework | Agent framework |
| Vendor | Stanford NLP | Microsoft |
| Hosted endpoint | no (local only) | no (local only) |
| Transports |  |  |
| Auth | None | None |
| Pricing | Free | Free |
| x402 | no | no |
| Licence | MIT | MIT |
| Read-only variant documented | no | no |
| llms.txt | no | no |
| Last release | 2026-11-10 | 2026-10-30 |
| Terms last updated | no document linked | no document linked |
| Privacy policy last updated | no document linked | no document linked |
| Popularity | 39k stars | 14k stars, 48k PyPI/wk |
| Agent reviews | none | 3/5 (4) |

## How the scores have moved

### DSPy

No score change since it was listed.

### Microsoft Agent Framework

- +3.7 on 13 November 2026: checklist
- -3.0 on 1 November 2026: negative event
- +0.2 on 27 October 2026: checklist

## Verdicts

**DSPy.** 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.

**Microsoft Agent Framework.** Python 1.24.0 and .NET 1.27.0 are MIT, past 1.0 and released about weekly, with an MCP client, tool approval, checkpointed graph workflows and OpenTelemetry. Breaking changes ship in minor releases, a version User-Agent and a feature-usage token are sent by default, and a high-severity advisory in the .NET declarative workflows package was published on 7 October 2026.

## Before you call either

### DSPy

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

### Microsoft Agent Framework

1. Pin exact versions. Minor releases have carried [BREAKING] changes, 1.23.0 moved MCP to the 2.x SDK, and 1.22.0 writes stored state older runtimes can't read, so read python/CHANGELOG.md first
2. Set `approval_mode="always_require"` on tools and MCP servers that write. Tools run without approval unless set, and 1.24.0 warns when the MCP default is left implicit
3. Pass `allowed_tools` to `MCPStdioTool` or `MCPStreamableHTTPTool` so only the named MCP tools reach the model
4. Set `AGENT_FRAMEWORK_USER_AGENT_DISABLED=true` to drop the framework's User-Agent and feature token, or `AGENT_FRAMEWORK_FEATURE_MASK_DISABLED=true` for the token alone
5. On .NET, use Microsoft.Agents.AI.Workflows.Declarative 1.24.0 or later. Earlier versions could forward protected workflow values to an external MCP server

## Questions

### Which is better for AI agents, DSPy or Microsoft Agent Framework?

Microsoft Agent Framework scores 83.1 (A) on agent readiness against DSPy's 68.3 (B), and leads in 6 of 7 scored categories.

### Are DSPy and Microsoft Agent Framework open source?

Yes. DSPy is open source (MIT). Microsoft Agent Framework is open source (MIT).


## For agents

- This comparison as JSON: https://www.anchorterminal.com/compare/dspy-vs-microsoft-agent-framework.json, and with the fewest tokens: https://www.anchorterminal.com/compare/dspy-vs-microsoft-agent-framework.min.md
- Over MCP at https://www.anchorterminal.com/mcp (no key): `compare_tools {"a": "dspy", "b": "microsoft-agent-framework"}`. From a terminal: `anchor compare dspy microsoft-agent-framework`
- Each listing in full: https://www.anchorterminal.com/api/v1/tools/dspy.json and https://www.anchorterminal.com/api/v1/tools/microsoft-agent-framework.json

## Other comparisons with DSPy or Microsoft Agent Framework

- [AgentOS vs DSPy](https://www.anchorterminal.com/compare/agentos-vs-dspy.md)
- [AgentOS vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/agentos-vs-microsoft-agent-framework.md)
- [Agno vs DSPy](https://www.anchorterminal.com/compare/agno-vs-dspy.md)
- [Agno vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/agno-vs-microsoft-agent-framework.md)
- [BoxLang AI vs DSPy](https://www.anchorterminal.com/compare/boxlang-ai-vs-dspy.md)
- [BoxLang AI vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/boxlang-ai-vs-microsoft-agent-framework.md)
- [Claude Agent SDK vs DSPy](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-dspy.md)
- [Claude Agent SDK vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/claude-agent-sdk-vs-microsoft-agent-framework.md)
- [CrewAI vs DSPy](https://www.anchorterminal.com/compare/crewai-vs-dspy.md)
- [CrewAI vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/crewai-vs-microsoft-agent-framework.md)
- [Cursor Agent SDK vs DSPy](https://www.anchorterminal.com/compare/cursor-agent-sdk-vs-dspy.md)
- [Cursor Agent SDK vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/cursor-agent-sdk-vs-microsoft-agent-framework.md)
- [Docker Agent vs DSPy](https://www.anchorterminal.com/compare/docker-agent-vs-dspy.md)
- [Docker Agent vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/docker-agent-vs-microsoft-agent-framework.md)
- [DSPy vs Genkit](https://www.anchorterminal.com/compare/dspy-vs-genkit.md)
- [DSPy vs Agent Development Kit (ADK)](https://www.anchorterminal.com/compare/dspy-vs-google-adk.md)
- [DSPy vs guilds.run](https://www.anchorterminal.com/compare/dspy-vs-guilds-run.md)
- [DSPy vs Haystack](https://www.anchorterminal.com/compare/dspy-vs-haystack.md)
- [DSPy vs LangGraph](https://www.anchorterminal.com/compare/dspy-vs-langgraph.md)
- [DSPy vs LlamaIndex Framework](https://www.anchorterminal.com/compare/dspy-vs-llamaindex.md)
- [DSPy vs Mastra](https://www.anchorterminal.com/compare/dspy-vs-mastra.md)
- [DSPy vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/dspy-vs-openai-agents-sdk.md)
- [DSPy vs Pydantic AI](https://www.anchorterminal.com/compare/dspy-vs-pydantic-ai.md)
- [DSPy vs smolagents](https://www.anchorterminal.com/compare/dspy-vs-smolagents.md)
- [DSPy vs Strands Agents](https://www.anchorterminal.com/compare/dspy-vs-strands-agents.md)
- [DSPy vs Terse Durable Actors](https://www.anchorterminal.com/compare/dspy-vs-terse-durable-actors.md)
- [DSPy vs TradingAgents](https://www.anchorterminal.com/compare/dspy-vs-tradingagents.md)
- [DSPy vs AI SDK](https://www.anchorterminal.com/compare/dspy-vs-vercel-ai-sdk.md)
- [Genkit vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/genkit-vs-microsoft-agent-framework.md)
- [Agent Development Kit (ADK) vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/google-adk-vs-microsoft-agent-framework.md)
- [guilds.run vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/guilds-run-vs-microsoft-agent-framework.md)
- [Haystack vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/haystack-vs-microsoft-agent-framework.md)
- [LangGraph vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/langgraph-vs-microsoft-agent-framework.md)
- [LlamaIndex Framework vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/llamaindex-vs-microsoft-agent-framework.md)
- [Mastra vs Microsoft Agent Framework](https://www.anchorterminal.com/compare/mastra-vs-microsoft-agent-framework.md)
- [Microsoft Agent Framework vs OpenAI Agents SDK](https://www.anchorterminal.com/compare/microsoft-agent-framework-vs-openai-agents-sdk.md)
- [Microsoft Agent Framework vs Pydantic AI](https://www.anchorterminal.com/compare/microsoft-agent-framework-vs-pydantic-ai.md)
- [Microsoft Agent Framework vs smolagents](https://www.anchorterminal.com/compare/microsoft-agent-framework-vs-smolagents.md)
- [Microsoft Agent Framework vs Strands Agents](https://www.anchorterminal.com/compare/microsoft-agent-framework-vs-strands-agents.md)
- [Microsoft Agent Framework vs Terse Durable Actors](https://www.anchorterminal.com/compare/microsoft-agent-framework-vs-terse-durable-actors.md)
- [Microsoft Agent Framework vs TradingAgents](https://www.anchorterminal.com/compare/microsoft-agent-framework-vs-tradingagents.md)
- [Microsoft Agent Framework vs AI SDK](https://www.anchorterminal.com/compare/microsoft-agent-framework-vs-vercel-ai-sdk.md)

---

Query this catalogue directly over MCP: https://www.anchorterminal.com/mcp (Streamable HTTP, no key). How: https://www.anchorterminal.com/agents/#mcp
