Compare frameworks
Pydantic AI vs Mastra vs DSPy
Every figure below carries the source that reported it and the moment it was observed. Values that failed validation are withheld rather than shown, and a dash means no source we track carries that field for that framework.
| Field | Pydantic AI | Mastra | DSPy |
|---|---|---|---|
| Stars | 21,085Synced from sourceCurrent3h ago | 29,400Synced from sourceCurrent3h ago | 38,971 (highest of the compared values)Synced from sourceCurrent3h ago |
| downloads | 3,076,771Synced from sourceStale2mo ago· past SLA | 3,150,478 (highest of the compared values)Synced from sourceCurrent3h ago | — |
| Last commit | 2026-11-08Synced from sourceCurrent3h ago | 2026-11-08Synced from sourceCurrent3h ago | 2026-11-07Synced from sourceCurrent3h ago |
| Language | pythonSeeded, unreviewedwritten 2mo ago | typescriptSeeded, unreviewedwritten 2mo ago | pythonSeeded, unreviewedwritten 2mo ago |
| Licence | MITSynced from sourceCurrent3h ago | — | MITSynced from sourceCurrent3h ago |
| Archived | noSynced from sourceCurrent3h ago | noSynced from sourceCurrent3h ago | noSynced from sourceCurrent3h ago |
| Category | structured-outputSeeded, unreviewedwritten 2mo ago | orchestrationSeeded, unreviewedwritten 2mo ago | optimisationSeeded, unreviewedwritten 2mo ago |
| Contributors | 658Synced from sourceCurrent3h ago | 701Synced from sourceCurrent3h ago | 484Synced from sourceCurrent3h ago |
| Forks | 3127Synced from sourceCurrent3h ago | 3085Synced from sourceCurrent3h ago | 3491Synced from sourceCurrent3h ago |
| Maintainer | PydanticSeeded, unreviewedwritten 2mo ago | MastraSeeded, unreviewedwritten 2mo ago | Stanford NLPSeeded, unreviewedwritten 2mo ago |
| npm downloads, monthly | — | 10391822Synced from sourceCurrent3h ago | — |
| npm downloads, weekly | — | 3150478Synced from sourceCurrent3h ago | — |
| npm package | — | @mastra/coreSynced from sourceCurrent3h ago | — |
| npm window ends | — | 2026-11-06Synced from sourceCurrent3h ago | — |
| Open issues | 1825Synced from sourceCurrent3h ago | 820Synced from sourceCurrent3h ago | 770Synced from sourceCurrent3h ago |
| PyPI downloads, monthly | 13478631Synced from sourceStale2mo ago· past SLA | — | — |
| PyPI downloads, weekly | 3076771Synced from sourceStale2mo ago· past SLA | — | — |
| PyPI package | pydantic-aiSynced from sourceCurrent3h ago | — | dspy-aiSynced from sourceCurrent3h ago |
| PyPI released | 2026-11-04T10:28:38.510837ZSynced from sourceCurrent3h ago | — | 2026-10-12T23:07:31.783801ZSynced from sourceCurrent3h ago |
| Requires Python | >=3.11Synced from sourceCurrent3h ago | — | >=3.9Synced from sourceCurrent3h ago |
| PyPI version | 2.66.0Synced from sourceCurrent3h ago | — | 3.4.1Synced from sourceCurrent3h ago |
| Repository | https://github.com/pydantic/pydantic-aiSynced from sourceCurrent3h ago | https://github.com/mastra-ai/mastraSynced from sourceCurrent3h ago | https://github.com/stanfordnlp/dspySynced from sourceCurrent3h ago |
Sources: GitHub REST API, npm registry downloads, PyPI registry metadata, pypistats.org downloads. Most recent observation 3h ago. Where a row is marked, ▲ is the highest of the values shown and ▼ the lowest — arithmetic on the figures above, not a ranking or a recommendation. Rows where neither extreme is meaningful are left unmarked rather than given a direction they do not have.
Change the comparison
Remove one, or open the directory to pick a different set. Up to 3 at a time.