# DSPy vs Genkit

> Genkit scores 78.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-genkit
- Markdown: https://www.anchorterminal.com/compare/dspy-vs-genkit.md (~4,050 tokens)
- Slim: https://www.anchorterminal.com/compare/dspy-vs-genkit.min.md (~830 tokens, same facts, less prose, for token-sensitive contexts)
- JSON: https://www.anchorterminal.com/compare/dspy-vs-genkit.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

Genkit scores 78.1 (A) on agent readiness against DSPy's 68.3 (B), and leads in 5 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
- Genkit: grade A, 78.1/100, rank #63 of 1654. Markdown https://www.anchorterminal.com/tools/genkit.md · JSON https://www.anchorterminal.com/api/v1/tools/genkit.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 key needed to call it

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

### Genkit (A)

Good for: Teams adding agents to full-stack apps in TypeScript, Go, Python or Dart, especially on Firebase or Google Cloud.

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

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

Watch for: The Genkit CLI and Developer UI send Google Analytics events after a first-run notice, until `genkit config set analyticsOptOut true`


## Why the edge

### Agent ergonomics: Genkit +21

- 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.
- Genkit (85): An MCP host with two servers is about 15 lines, each server's tools namespaced and loaded with getActiveTools (20). Context compression and retry middleware in JS, and usage budgets in Go 1.14 (20). tool.Fail and SoftToolErrors send errors back to the model in Go, with less shown for JS (12). Retry middleware, resumable loops and restartable interrupts (18). Few required settings and SDKs in four languages (15). 20+20+12+18+15 = 85.

### Transparency & trust: Genkit +17

- 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.
- Genkit (69): Apache-2.0 (30). Google's general privacy policy applies, the analytics notice links Google's cookie policy and tracing content is opt-in, but there's no Genkit statement of what leaves the machine (15). Release notes list deprecations and Python has a migration guide, with no written deprecation policy or dates (10). CLI and Developer UI analytics disclosed in the docs with an opt-out (20). 30+15+10+20 = 75.

### Schema & documentation: Genkit +12

- 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.
- Genkit (83): Typed TypeScript, Go and Python interfaces documented per language, with typed option interfaces on the MCP page; no separate API reference was read (22). llms.txt with per-language bundles, Markdown for every page and API rules for coding agents (10). The interrupts page says when to pause for approval and when to use restartable tools (14). Tools and flows take Zod, Pydantic or Go struct schemas (15). Examples on every page read, and Go 1.14 documents recoverable tool errors, but no error reference was found (10). Dated release posts and a Python migration guide, without a changelog file (12). 22+10+14+15+10+12 = 83.

### Security & auth: Genkit +10

- 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.
- Genkit (70): No usage reporting found in the runtime libraries, but the CLI and Developer UI send Google Analytics events after a first-run notice, opt-out by config (20). Interrupts for human approval and ToolApproval middleware with an allowlist and an optional judge model (20). The Go 1.14 notes say the judge never sees tool results, so injected text can't sway it, but no general prompt-injection guidance was found (10). OpenTelemetry tracing with message content opt-in, and a local trace viewer (15). No SECURITY.md and no security.txt on genkit.dev; advisories couldn't be checked, as OSV's search needs a browser and GitHub's pages refused us (5). Framework reading. 20+20+10+15+5 = 70.

### Reliability: Genkit +7

- 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.
- Genkit (69): Official packages on npm, PyPI, the Go module proxy and pub.dev, with Python 3.10 to 3.14 stated (20). A tests workflow runs on pull requests for JS, Go and Python, plus e2e and sample workflows, but GitHub's pages refused us so we couldn't see whether main passes (15). 707 open issues and pull requests per GitHub's search API on 23 November; reply times unread (12). Semver tags with release candidates, and blog release notes that list deprecations, but no changelog file (10). JS 1.44, Go 1.14 and Dart 1.0 are stable while Python is 0.14.0 and Beta (12). 20+15+12+10+12 = 69.

## Score by category

| Category | Weight | DSPy | Genkit | Edge |
| --- | --- | --- | --- | --- |
| Reliability | 16% | 62 | 69 | Genkit +7 |
| Performance | 10%, pending | pending | pending | not scored in this run |
| Schema & documentation | 13% | 71 | 83 | Genkit +12 |
| Agent ergonomics | 13% | 64 | 85 | Genkit +21 |
| Security & auth | 14% | 60 | 70 | Genkit +10 |
| Payments & pricing | 10% | 90 | 90 | even |
| Task success | 10%, pending | pending | pending | not scored in this run |
| Maintenance & community | 7% | 87 | 85 | DSPy +2 |
| Transparency & trust | 7% | 52 | 69 | Genkit +17 |
| Negative events | ≤15 | 0 | 0 | |
| **Total** | | **68.3 · B** | **78.1 · A** | |

## Facts side by side

| Fact | DSPy | Genkit |
| --- | --- | --- |
| Kind | Agent framework | Agent framework |
| Vendor | Stanford NLP | Google |
| Hosted endpoint | no (local only) | no (local only) |
| Transports |  |  |
| Auth | None | API key |
| 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-11-19 |
| Terms last updated | no document linked | 2026-07-30 |
| Privacy policy last updated | no document linked | 2026-10-01 |
| Customer content may train models | not read yet | yes |
| Terms restrict automated access | not read yet | yes |
| Terms restrict benchmarking | not read yet | not found in the text |
| Terms or service can change without notice | not read yet | not found in the text |
| Arbitration or class-action waiver | not read yet | not found in the text |
| Popularity | 39k stars | 6.6k stars, 264k npm/wk |

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

**Genkit.** An open-source framework in TypeScript, Go, Python and Dart with tool calling, interrupts for human approval, a ToolApproval middleware, an MCP host, client and server, and llms.txt docs per language. The Python SDK is still 0.x and marked Beta, and the CLI and Developer UI send Google Analytics usage data unless opted out.

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

### Genkit

1. Run `genkit config set analyticsOptOut true` on every machine and CI runner that uses the Genkit CLI or Developer UI
2. Pass `--non-interactive` to `genkit start` in scripts so the analytics notice does not block the run
3. Define tools that move money, send email or delete data as interrupts or behind ToolApproval, so a person or judge approves each call
4. Fetch the per-language bundle from llms.txt (llms-js.txt, llms-go.txt, llms-python.txt) instead of the full documentation file
5. Import the Go module from github.com/firebase/genkit/go, which still carries the old path after the move to genkit-ai

## Questions

### Which is better for AI agents, DSPy or Genkit?

Genkit scores 78.1 (A) on agent readiness against DSPy's 68.3 (B), and leads in 5 of 7 scored categories.

### Are DSPy and Genkit open source?

Yes. DSPy is open source (MIT). Genkit is open source (Apache-2.0).


## For agents

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

## Other comparisons with DSPy or Genkit

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