# DSPy vs LlamaIndex Framework

> LlamaIndex Framework scores 73.8 (BB) 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-llamaindex
- Markdown: https://www.anchorterminal.com/compare/dspy-vs-llamaindex.md (~4,350 tokens)
- Slim: https://www.anchorterminal.com/compare/dspy-vs-llamaindex.min.md (~730 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/compare/dspy-vs-llamaindex.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

LlamaIndex Framework scores 73.8 (BB) on agent readiness against DSPy's 68.3 (B), and leads in 5 of 7 scored categories. DSPy leads on maintenance & community. 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
- LlamaIndex Framework: grade BB, 73.8/100, rank #179 of 1654. Markdown https://www.anchorterminal.com/tools/llamaindex.md · JSON https://www.anchorterminal.com/api/v1/tools/llamaindex.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.

Ahead on:
- Maintenance & community, 87 against 69

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

### LlamaIndex Framework (BB)

Good for: Python teams building retrieval-heavy agents over their own data, with many connectors.

Ahead on:
- Reliability, 70 against 62
- Schema & documentation, 85 against 71
- Agent ergonomics, 73 against 64
- Security & auth, 74 against 60
- Transparency & trust, 67 against 52

Also in its favour:
- Agent-ready, a grade of BB or better

Watch for: Core is 0.14.x, and minor versions such as 0.13 and 0.14 carried breaking changes


## Why the edge

### Maintenance & community: DSPy +18

- 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.
- LlamaIndex Framework (69): llama-index-core 0.14.25 on 21 September 2026, 46 days before this check (20). Two core changelog entries in the 90 days (19 August and 21 September), with integration packages and Workflows (2.24.1 to 2.26.1) publishing in between, so partial (12). 379 open issues and 1,291 open issues and pull requests on 6 November, with 241 issues opened in the 90 days to 3 November. Of the 50 newest, 28 had a comment and 3 were closed; a stale bot and an issue classifier run on the repository (12). Core, Workflows and integrations are current (15). CI and CodeQL passing on main and a stale-package policy that moves unmaintained integrations out of main (10). 20+12+12+15+10 = 69.

### Transparency & trust: LlamaIndex Framework +15

- 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.
- LlamaIndex Framework (67): MIT (30). The library stores nothing itself; OpenAI is the default provider unless changed, which the docs show (20). A stale-package policy and removals noted in the changelog, such as deprecated IPEX integrations removed in 0.14.25, without dated notice (10). No telemetry, though no page states it (12). 30+20+10+12 = 72.

### Schema & documentation: LlamaIndex Framework +14

- 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.
- LlamaIndex Framework (85): Framework reading. A typed Python API with a generated reference (22). llms.txt indexing the framework docs, plus a docs search API and an MCP server for the docs (10). The agents guide says what each agent class is for, and the MCP page lists the three ways to use MCP (15). Tools are typed from function signatures and Pydantic models (13). Many examples and notebooks, few documented error types (10). Dated changelog (15). 22+10+15+13+10+15 = 85.

### Security & auth: LlamaIndex Framework +14

- 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.
- LlamaIndex Framework (74): Framework reading (telemetry defaults, approvals, guardrails, sandboxing). No telemetry found in llama-index-core (25). Human-in-the-loop events in Workflows and agents can wait for a person, but there's no per-tool approval primitive and CodeActAgent's executor is the developer's to supply (12). The threat model puts input validation on the application, with no prompt-injection guidance in the agent pages (5). Instrumentation events and callback handlers for tracing (14). A huntr bug bounty, GitHub private reporting and public advisories with fixed versions (18). 25+12+5+14+18 = 74.

### Agent ergonomics: LlamaIndex Framework +9

- 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.
- LlamaIndex Framework (73): Framework reading. MCP tools through a separate llama-index-tools-mcp package, with allowed tools selectable (18). Memory token limits, iteration caps and streaming events (16). Tool errors returned to the agent, with few typed errors (12). Workflow context serialises and resumes, and the DBOS package makes runs durable (16). Few required parameters, but OpenAI is the silent default for LLM and embeddings, Python here with a separate TypeScript edition (11). 18+16+12+16+11 = 73.

### Reliability: LlamaIndex Framework +8

- 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.
- LlamaIndex Framework (70): Local-package reading. Official PyPI packages with Python 3.10 to below 4.0 (20). Public unit-test, type-check, lint, coverage and CodeQL workflows, with the type-check, lint and CodeQL runs on main passing on 3 November (25). 379 open issues and 1,291 open issues and pull requests on 6 November, with 241 issues opened in the 90 days to 3 November. Of the 50 newest, 28 had a comment and 3 were closed; a stale bot and an issue classifier run on the repository (12). A dated, generated changelog per package, but core is 0.x and minors such as 0.13 and 0.14 carried breaking changes (8). Core isn't 1.0; Workflows is at 2.x, so partial (5). 20+25+12+8+5 = 70.

## Score by category

| Category | Weight | DSPy | LlamaIndex Framework | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% | 62 | 70 | LlamaIndex Framework +8 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 71 | 85 | LlamaIndex Framework +14 |
| Agent ergonomics | 13% | 64 | 73 | LlamaIndex Framework +9 |
| Security & auth | 14% | 60 | 74 | LlamaIndex Framework +14 |
| Payments & pricing | 10% | 90 | 90 | even |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 87 | 69 | DSPy +18 |
| Transparency & trust | 7% | 52 | 67 | LlamaIndex Framework +15 |
| Negative events | ≤15 | 0 | -2 | |
| **Total** | | **68.3 · B** | **73.8 · BB** | |

## Facts side by side

| Fact | DSPy | LlamaIndex Framework |
| --- | --- | --- |
| Kind | Agent framework | Agent framework |
| Vendor | Stanford NLP | LlamaIndex |
| 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 | yes |
| Last release | 2026-11-10 | 2026-09-21 |
| Terms last updated | no document linked | no document linked |
| Privacy policy last updated | no document linked | 2026-08-24 |
| Popularity | 39k stars | 53k stars, 1.3M PyPI/wk |

## How the scores have moved

### DSPy

No score change since it was listed.

### LlamaIndex Framework

- +3.8 on 13 November 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.

**LlamaIndex Framework.** An MIT Python framework for retrieval and agents, with three agent types, multi-agent AgentWorkflow, resumable event-driven Workflows, MCP tools and a huntr bug bounty, and no telemetry found. Core is still 0.14 with breaking minors, OpenAI is the silent default, and approval and injection handling are left to the application.

## 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

### LlamaIndex Framework

1. Set Settings.llm and Settings.embed_model explicitly so calls don't go to OpenAI by default
2. Install llama-index-tools-mcp for MCP tools and pass only the allowed tools the task needs
3. Use Workflow human-in-the-loop events before tools that write or send
4. Pin llama-index-core to a minor version, since minors have broken APIs
5. Upgrade llama-index-core to 0.13.0 or later to clear the 2025 advisories

## Questions

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

LlamaIndex Framework scores 73.8 (BB) on agent readiness against DSPy's 68.3 (B), and leads in 5 of 7 scored categories. DSPy leads on maintenance & community.

### Are DSPy and LlamaIndex Framework open source?

Yes. DSPy is open source (MIT). LlamaIndex Framework is open source (MIT).


## For agents

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

## Other comparisons with DSPy or LlamaIndex Framework

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