Head to head · Agent frameworks · October 2026 research run
DSPy vs smolagents
DSPy scores 68.3 (B) on agent readiness against smolagents's 62.5 (B), and leads in 1 of 7 scored categories. smolagents leads on schema & documentation, security & auth and transparency & trust. Both do agent frameworks.
Best agent frameworks and SDKs · All 253 frameworks comparisons
Which one, for what
DSPy B
Best for Python teams who want typed LM programs they can evaluate and optimise against a metric, with ReAct for tool use.
Ahead on
- Maintenance & community, 87 against 34
Also in its favour
- No incidents deducted, where smolagents loses 6 points for them
Watch for
3.5 changed the default adapter, reasoning and API routing and removed CodeAct and ProgramOfThought in a minor release
Best for Small Python projects and research that want code-writing agents with minimal abstraction.
Ahead on
- Schema & documentation, 81 against 71
- Security & auth, 66 against 60
- Transparency & trust, 65 against 52
Watch for
No release since 1.26.0 on 29 May 2026, and few commits to main since August
Why the edge
Each category where one leads by five points or more, with the reason behind each side's score from its assessment. The numbers are in the table below; this is what they stand for.
Maintenance & community DSPy +53
DSPy 87
3.5.0 tagged on 10 November 2026, 13 days before this check (30). Three releases in the 90 days to 23 November (3.4.0, 3.4.1, 3.5.0) (20). The 50 newest issues had 19 with a comment and 8 closed, with 352 issues and 475 pull requests open, while 213 commits from about 30 authors reached the repository in 90 days (12). The package is current (15). CI on six Python versions, Dependabot and actions pinned to commit SHAs (10). 30+20+12+15+10 = 87.
smolagents 34
v1.26.0 on 29 May 2026, 161 days before this check (10). No release in the 90 days to 6 November (0). 416 open issues and 1,045 open issues and pull requests on 6 November, with 144 issues opened in the 90 days to 3 November. Of the 50 newest, 26 had a comment and 1 was closed. Two 2026 CVE records say the vendor didn't respond to the reporter, and seven commits reached main from 8 August to 6 November (6). Python only, and the package is the current one (10). CI with actions pinned to commit SHAs and Dependabot for actions (8). 10+0+6+10+8 = 34.
Transparency & trust smolagents +13
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.
smolagents 65
Apache-2.0 (30). The library stores nothing itself; the default model sends prompts to Hugging Face's inference providers, which the docs show (20). Breaking removals such as WasmExecutor shipped in minor releases, without a written deprecation policy (5). No telemetry, though no page states it (12). 30+20+5+12 = 67.
Schema & documentation smolagents +10
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.
smolagents 81
Framework reading. A typed Python API with reference pages for agents, models, tools and executors (22). llms.txt and Markdown pages on huggingface.co (10). The docs say when to use CodeAgent or ToolCallingAgent and when a sandbox is needed (17). Tools declare typed inputs in a schema dictionary or from a decorated function (12). Many runnable examples; error classes exist but aren't catalogued (10). Versions tagged with release notes, no changelog file (10). 22+10+17+12+10+10 = 81.
Security & auth smolagents +6
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.
smolagents 66
Framework reading (telemetry defaults, approvals, guardrails, sandboxing). No telemetry found in the source (25). No human approval hook beyond step callbacks; the local executor restricts imports but the guide says it isn't a security tool, and isolation needs a remote executor (10). The secure execution guide covers LLM-generated code risks, without prompt-injection guidance for tool output (7). OpenTelemetry tracing through OpenInference and run inspection (12). SECURITY.md with private reporting and CVE credit, and the remote-executor RCE was fixed in public, but two 2026 CVE records say the vendor didn't respond (12). 25+10+7+12+12 = 66.
Score by category
| Category | Weight | DSPy | smolagents | Edge |
|---|---|---|---|---|
| Reliability | 16% | 62 | 64 | smolagents +2 |
| Performance | 10%pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 71 | 81 | smolagents +10 |
| Agent ergonomics | 13% | 64 | 68 | smolagents +4 |
| Security & auth | 14% | 60 | 66 | smolagents +6 |
| Payments & pricing | 10% | 90 | 90 | even |
| Task success | 10%pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 87 | 34 | DSPy +53 |
| Transparency & trust | 7% | 52 | 65 | smolagents +13 |
| Negative events | ≤15 | 0 | -6 | |
| Total | B 68.3/100 | B 62.5/100 |
Facts side by side
| Fact | DSPy | smolagents |
|---|---|---|
| Kind | Agent framework | Agent framework |
| Vendor | Stanford NLP | Hugging Face |
| Hosted endpoint | no (local only) | no (local only) |
| Transports | ||
| Auth | None | None |
| Pricing | Free | Free |
| x402 | no | no |
| Licence | MIT | Apache-2.0 |
| Read-only variant documented | no | no |
| llms.txt | no | yes |
| Last release | 2026-11-10 | 2026-05-29 |
| Terms last updated | no document linked | 2022-09-15 |
| Privacy policy last updated | no document linked | 2023-03-28 |
| Customer content may train models | not read yet | not found in the text |
| Terms restrict automated access | not read yet | not found in the text |
| Terms restrict benchmarking | not read yet | not found in the text |
| Terms or service can change without notice | not read yet | yes |
| Arbitration or class-action waiver | not read yet | not found in the text |
| Popularity | 39k stars | 30k stars, 171k PyPI/wk |
How the scores have moved
DSPy
No score change since it was listed.
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.
smolagents
A compact Python library for code-writing and tool-calling agents, with MCP tools, any model provider and remote sandboxes through E2B, Docker, Modal or Blaxel. The newest release is 1.26.0 of 29 May 2026, a critical remote-executor RCE took about eight weeks to fix, and the local executor isn't a security boundary.
Before you call either
DSPy
- Re-evaluate saved programs after upgrading to 3.5, since the default adapter and prompts changed
- Install dspy[mcp] and convert each MCP tool with dspy.Tool.from_mcp_tool while the client session stays open
- Disable the answer cache for calls whose output must change between runs, since memory and disk caches are on by default
- Wrap tools that send, pay or delete in your own confirmation step, because ReAct runs tools without approval
- Pin dspy to a minor version, since minor releases remove APIs
smolagents
- Run CodeAgent with
executor_typeset to e2b, docker, modal or blaxel whenever the model or its inputs aren't trusted - Use smolagents 1.24.0 or later to get the remote-executor deserialisation fix
- Set max_steps and final_answer_checks so a run stops on its own
- Pass structured_output explicitly to MCPClient to avoid the default-change warning
- Pin the version, since minor releases have removed APIs
Questions
Which is better for AI agents, DSPy or smolagents?
DSPy scores 68.3 (B) on agent readiness against smolagents's 62.5 (B), and leads in 1 of 7 scored categories. smolagents leads on schema & documentation, security & auth and transparency & trust.
Are DSPy and smolagents open source?
Yes. DSPy is open source (MIT). smolagents is open source (Apache-2.0).
Other comparisons with DSPy or smolagents
- AgentOS vs DSPy
- AgentOS vs smolagents
- Agno vs DSPy
- Agno vs smolagents
- BoxLang AI vs DSPy
- BoxLang AI vs smolagents
- Claude Agent SDK vs DSPy
- Claude Agent SDK vs smolagents
- CrewAI vs DSPy
- CrewAI vs smolagents
- Cursor Agent SDK vs DSPy
- Cursor Agent SDK vs smolagents
- Docker Agent vs DSPy
- Docker Agent vs smolagents
- DSPy vs Genkit
- DSPy vs Agent Development Kit (ADK)
- DSPy vs guilds.run
- DSPy vs Haystack
- DSPy vs LangGraph
- DSPy vs LlamaIndex Framework
- DSPy vs Mastra
- DSPy vs Microsoft Agent Framework
- DSPy vs OpenAI Agents SDK
- DSPy vs Pydantic AI
- DSPy vs Strands Agents
- DSPy vs Terse Durable Actors
- DSPy vs TradingAgents
- DSPy vs AI SDK
- Genkit vs smolagents
- Agent Development Kit (ADK) vs smolagents
- guilds.run vs smolagents
- Haystack vs smolagents
- LangGraph vs smolagents
- LlamaIndex Framework vs smolagents
- Mastra vs smolagents
- Microsoft Agent Framework vs smolagents
- OpenAI Agents SDK vs smolagents
- Pydantic AI vs smolagents
- smolagents vs Strands Agents
- smolagents vs Terse Durable Actors
- smolagents vs TradingAgents
- smolagents vs AI SDK
Machine-readable
- This page as Markdown
/compare/dspy-vs-smolagents.md· slim.min.md· JSON.json(or sendAccept: text/markdown) - Each listing in full
/api/v1/tools/dspy.json·/api/v1/tools/smolagents.json - From a terminal
anchor compare dspy smolagents(the CLI) - Over MCP
compare_tools {"a": "dspy", "b": "smolagents"}at/mcp, no key