I recently saw a tweet from Sam Bhagwat (Mastra AI's Founder) which mentions that around 60–70% of YC X25 agent companies are building their AI agents in TypeScript.
This stat surprised me because early frameworks like LangChain were originally Python-first.
So, why the shift toward TypeScript for building AI agents?
Here are a few possible reasons I’ve understood:
- Many early projects focused on stitching together tools and APIs. That pulled in a lot of frontend/full-stack devs who were already in the TypeScript ecosystem.
- TypeScript’s static types and IDE integration are a huge productivity boost when rapidly iterating on complex logic, chaining tools, or calling LLMs.
- Also, as Sam points out, full-stack devs can ship quickly using TS for both backend and frontend.
- Vercel's AI SDK also played a big role here.
I would love to know your take on this!
I think that's because the data they're trained upon (both blogs, code, ...) is Typescript mixed with Python for Backend. And second is that (as you pointed out) JS Ecosystem is very strong and python lacks a lot of UI libraries.
If they exists, they're wrappers on top of React (Reflex.dev kinda)