by Arindam1729 on 6/7/25, 8:50 PM with 17 comments
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!
by ecesena on 6/7/25, 9:50 PM
I think ppl underestimate the cost of context switch between languages, even if you're really proficient in more than one.
If you're a team with 1-2 eng and have to build a frontend, you are forced to use js/ts. Now, if you can keep everything in a monorepo in the same language, you're simply moving faster. And I'm sure people will criticize and bring counter examples... but statistically 60-70% of the teams will just be faster working this way.
My first startup was frontend php, backend python, 2 eng; soon we specialized one working on frontend, the other on backend, it's tedious to context switch. My last startup was typescript for everything, again 2 eng, same code base, same coding style, both iterating on all code. (And daily I work in rust & C, I'm definitely not a frontend eng nor a js/ts enthusiast, I'm just reflecting on efficiency.)
by foobarbaz33 on 6/8/25, 2:12 PM
Typescript let's you start with a cross platform GUI right out of the gate. Text based HTML GUI is screen reader friendly, battle hardened for many years to get accessibility right.
Type system is advanced and allows for that sweet IDE experience.
And.... the Javascript ecosystem is the only game in town that gets close to the Lisp immediate feedback experience. (no Javascript is not as good as a lisp image, but it's better than nothing). Change a function, see the result instantly in the browser while you're app is still running. I'm not 100% sure this is true for Typescript as it must compile to javascript first, but compiling the TypeScript for 1 modified file with an on-save-hook could still be a pretty quick feedback loop.
Do these reasons have anything to do with AI agents? no but it would explain why people are already using Typescirpt, and thus use it for AI agents.
by shams93 on 6/7/25, 9:03 PM
by amazingamazing on 6/7/25, 11:33 PM
by tomasen9987 on 6/7/25, 8:59 PM
by pianopatrick on 6/8/25, 8:06 AM
by iMax00 on 6/7/25, 9:05 PM
by rvz on 6/7/25, 9:11 PM
Typescript (which is still "Javascript") is extremely immature for a "backend" language.
I can't take anyone seriously if they believe or use such a pseudo-typed language like typescript and especially a weakly typed language with dynamic types on a costly runtime such as Javascript on the backend.
Both of them should stay far away from anything backend.