DSPy alternatives (2026)
Quick answer: The top picks on this list are LlamaIndex, AstrBot and Mastra. They lead 11 matching tools, ranked by GitHub stars on each listing. Pricing is what each maker states. Read each listing before you choose. Sources checked December 4, 2026. No vendor paid for a position.
Ranked comparison (top 10)
Dated .
| # | Tool | Pricing | Best for | Open source | Runs locally | GitHub stars |
|---|---|---|---|---|---|---|
| 1 | Open source + cloud | build an agent, automate workflows | Yes | Self-hosted | 53,110 | |
| 2 | Open source | build an agent, automate workflows | Yes | Self-hosted | 47,869 | |
| 3 | Open source | build an agent, automate workflows | Yes | Self-hosted | 29,973 | |
| 4 | Open source + cloud | build an agent, automate workflows | Yes | Self-hosted | 27,154 | |
| 5 | Open source | build an agent, give agents memory | Yes | Self-hosted | 2,187 | |
| 6 | Open source | build an agent, monitor & evaluate agents | Yes | Offline | 2,006 | |
| 7 | See site | build an agent, give agents memory | No | 1,295 | ||
| 8 | Open source | build an agent, automate workflows | Yes | Self-hosted | 1,072 | |
| 9 | Open source + cloud | write code, build an agent | Yes | Self-hosted | 315,292 | |
| 10 | Open source | write code, build an agent | Yes | Offline | 30,633 |
How we rank: GitHub stars on each listing. Stars and maturity come from each AgentScout listing. No vendor paid for a position.
Sources checked .
DSPy is a frameworks tool: Stanford framework for programming rather than prompting language models, with optimizers that tune prompts and weights for RAG pipelines and agent loops. Pricing, as the maker states it: Open source. Its GitHub repo has 38,855 stars. We found 156 tools in the directory that do overlapping work (writing code, building AI agents); 150 of them are open source and 2 list a free or freemium plan. Below are the 10 closest, ranked by how many tasks and sub-tasks they share with DSPy, then by GitHub stars.
Updated
LlamaIndex (Open source + cloud): Framework for agents over your data (RAG, document agents). Consider it because it has more GitHub stars (52,743 vs 38,855).
AstrBot (Open source): Open-source agent chatbot platform and framework that connects LLMs, plugins and tools to mainstream messaging apps for assistants, support bots and knowledge bases. Consider it because it has more GitHub stars (44,991 vs 38,855).
Mastra (Open source): TypeScript framework for agents, workflows and RAG. Consider it because it also covers workflow automation.
Haystack (Open source + cloud): Open-source orchestration framework for building production LLM apps, RAG and agents. Consider it because it also covers multi-agent orchestration.
Neuron AI (Open source): PHP framework for creating and orchestrating AI agents with LLMs, tools, vector stores and memory. Consider it because it also covers memory and multi-agent orchestration.
Langchain.rb (Open source): Ruby library for building LLM-powered applications, RAG and assistants. Consider it because it does the same job with a different approach (open source).
BaseAI (See site): Web AI framework from Langbase for building AI agents with memory (RAG) and deploying them serverless. Consider it because it also covers memory.
Dynamiq (Open source): Python orchestration framework for building agentic and RAG applications from reusable nodes and workflows. Consider it because it also covers workflow automation and multi-agent orchestration.
ECC (Open source + cloud): The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond Consider it because it also covers memory and research and reports; it has more GitHub stars (293,059 vs 38,855).
smolagents (Open source): Hugging Face's minimal library for code-writing agents. Consider it because it does the same job with a different approach (open source).
DSPy vs alternatives at a glance
| Tool | Pricing | Open source / licence | GitHub stars | Good for |
|---|---|---|---|---|
| Open source | MIT | 38,855 | writing code, building AI agents | |
| Open source + cloud | MIT | 52,743 | building AI agents, working with documents | |
| Open source | GNU Affero General Public License v3.0 | 44,991 | automating workflows, building AI agents | |
| Open source | Apache License 2.0, except ee/ directories (separate licence) | 29,209 | automating workflows, building AI agents | |
| Open source + cloud | Apache License 2.0 | 26,885 | automating workflows, building AI agents | |
| Open source | MIT | 2,163 | building AI agents, building multi-agent systems | |
| Open source | MIT | 2,006 | building AI agents, working with documents | |
| See site | No | 1,290 | building AI agents, working with documents | |
| Open source | Yes | 1,072 | automating workflows, building AI agents | |
| Open source + cloud | MIT | 293,059 | writing code, building AI agents | |
| Open source | Apache License 2.0 | 30,144 | writing code, building AI agents |
More
Alternatives are picked from directory data only: same category plus shared tasks and sub-tasks. Pricing is as each maker states it; GitHub stars as recorded on each listing.