A Song of Types and Agents - Roberto Stagi, Ratel
AI Engineer · 14 min · 123 sentences · from YouTube's caption track
Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.
- 00:02Hello, and thank you for being here.
- 00:04I'm Roberto, and today I'm going to tell you this song of types and agents.
- 00:11Uh basically a song that speaks about languages that fight each other to conquer what's the throne in the AI realm.
- 00:21And how I think that TypeScript might actually be winning this war.
- 00:27But let's start from the beginning.
- 00:30A few years ago, whenever someone was building uh in AI, they were certainly using Python.
- 00:39Like there was no doubt.
- 00:41All the other languages were bowing to Python because um because of its dominion uh over the AI world.
- 00:51And then, when in 2022 ChatGPT was released, everybody started wondering and starting understanding that AI was becoming something more.
- 01:05Was going outside of the bubble that lived for years.
- 01:09And started to becoming something more ambitious.
- 01:14And together with it, Python, which was the standard language for AI, became more ambitious as well.
- 01:22And that's how in 2024 uh GitHub actually claim claimed the ladder and became the most popular language on GitHub.
- 01:34So, you know, everybody was happy.
- 01:37Python finally reached the top.
- 01:40But little did they know that there was another contender for the throne.
- 01:48Another contender that was rising to challenge the claim that Python had on the throne.
- 01:54And this contender, as you may have guessed by now, was indeed TypeScript.
- 02:01But, before talking about this, let me present myself.
- 02:05My name is Roberto.
- 02:07I'm the CTO and co-founder of Reto, a context layer for AI agents.
- 02:12And I'm also the EU ambassador for AI's Pratic, a global community of AI builders meeting once per month to discuss the latest news in AI.
- 02:23I'm also a long-time JavaScript then turned TypeScript developer.
- 02:28And that's basically why I am talking about TypeScript today.
- 02:35So, let's begin.
- 02:38As we said, AI started moving up to the stack.
- 02:43It was moving from the infrastructure layer of these models, machine learning, and all related ecosystem towards the application layer.
- 02:54This means that AI stopped being something that you train, and it started being something that you ship inside your application.
- 03:06Applications started featuring AI, starting having features powered by AI.
- 03:13Which basically means that we started having applications that think.
- 03:19And the application layer was not Python's.
- 03:24The application layer has been TypeScript's for pretty long time now.
- 03:32Don't get me wrong, like I still think that Python has its own application.
- 03:39Like I still think that the brain of the of the agent and all the of all the AI world is actually still owned by Python.
- 03:50All the training, the research, the GPU serving is all Python's.
- 03:54Uh Has been Python's all along and it's going to be Python's for long time yet.
- 04:00And um what's changing is actually the application layer.
- 04:05Like few years ago, if you wanted to build something with AI built in the application, you had to use Python.
- 04:14But today, that's not the case anymore.
- 04:16And that's all uh the shift is about.
- 04:20TypeScript doesn't just own, you know, the UI or the back end.
- 04:24Started owning also the agentic layer of our application.
- 04:31And that's why in August 2025, TypeScript TypeScript actually passed Python as the most used language on GitHub.
- 04:41And the funny thing is that the reason that the GitHub reports gave was the same.
- 04:47Like in 2024, it said AI leads Python to the top language.
- 04:53While in 2025, it said AI leads TypeScript as the first language.
- 05:01And in both cases, as you can see, the global developers, the number of global developers were surging.
- 05:10In 2020 2025, we even have one new developer joining GitHub every second.
- 05:18So, what actually changed in this year?
- 05:24Like yeah, we were flooded from like new developers.
- 05:29In 2024, these newcomers were reaching for Python, or even maybe existing developers were reaching for Python.
- 05:37And in 2025, they reached for TypeScript instead.
- 05:42What changed between 2024 and 2025 was actually coding agents.
- 05:48The coding agents grew up like we saw established um we saw the players establishing themselves like Lava Cloud Code, Cursor, Codex.
- 06:00They became the default way to build applications.
- 06:04And the default way to uh to which these coding agents actually built the applications was TypeScript.
- 06:14And you know since every new app pretty much every new app is an agent today because they ship these AI and agentic capabilities, they are hungry to embed AI
- 06:30inside themselves.
- 06:32The demand to have more AI integrations, more and more AI integrations doesn't fall on through Python.
- 06:41[clears throat]
- 06:41It falls on TypeScript.
- 06:47And pretty much all the tools that we use to build AI today already run on TypeScript.
- 06:54We even saw an AI lab acquiring a JavaScript runtime like last December Anthropic acquired Bun.
- 07:05But still, you know, okay, everybody use is using TypeScript because of the coding agents and we are having more and more demand to build uh AI to embed AI inside TypeScript
- 07:21application.
- 07:22But does this mean that we should do it?
- 07:25Like this is a fair question, like it's an honest question and it's a question worth answering.
- 07:32And the answer in my opinion can be yes like for several reasons.
- 07:38The first one is that since TypeScript is the default language for coding agents today, we can expect that they will become better and better in in TypeScript because we are having more and more application in TypeScript, which are going to field
- 07:55the training of next coding agents.
- 07:58And then we are having uh deeper integrations and more native integrations from these coding agents towards TypeScript, and we can expect that the quality of the output in TypeScript
- 08:10is going to be better and better from these coding agents.
- 08:14Since we're building applications, and uh we want to have like the highest quality of these applications, might make sense to build agents, which are the new kind of applications in TypeScript.
- 08:28And also, if you use TypeScript, you are actually tapping into what is probably the richest package manager out there.
- 08:38NPM comes with everything, uh pretty much everything, like authentication, payments, UI, infra.
- 08:48Like it's uh the deepest up layer tail that there is.
- 08:52So, since again, AI is coming towards the application layer, we need to integrate with all these right now.
- 09:01And tapping inside NPM is a very convenient way to do that.
- 09:09Also, you have by building in TypeScript, you can have one single language throughout all your code base.
- 09:18You can have one single code base for the whole application.
- 09:22Because you can use TypeScript for your agent loop, for the tools, for the back end service, for the UI.
- 09:28While if you use Python, you probably have to split uh split it at least into two services.
- 09:35Which means, you know, one service with FastAPI, Pydantic AI, and whatever.
- 09:41And then another um separate React application that you need to sync between between these two with a uh with a contract, which you have to maintain and synchronize.
- 09:55And speaking of contracts, with TypeScript, you can have one single consistent typing across all your all your application.
- 10:07While if you use Python instead, you at some point will stop at a boundary, cuz you will have your agent, maybe your back end, etc. with one consistent typing,
- 10:18and then you will have your React application or Vue or whatever with um another set of typing at which you need to synchronize between the two.
- 10:30So, if you use TypeScript, you can use Zod as a single schema throughout all your application, which is very convenient.
- 10:38You can define a type once.
- 10:40You can use this type in the back end and uh in the model, and you can use the same type in your UI.
- 10:48One type, checked and went.
- 10:53Also, like it makes sense to build in TypeScript today uh also in the AI ecosystem because we are seeing a very surge in in the AI ecosystem as well.
- 11:05Like take the Versatile AI SDK, for example, you can see that in just 1 year, it went from 1.6 million to 15.1 million downloads per week, which is between 9 and 10x
- 11:18in just 1 year.
- 11:22So, finally, I'd to put everything together.
- 11:24In my opinion, yes, it makes sense to build AI agents in TypeScript because you have like a uh you can leverage the the de facto default language for coding agent.
- 11:37You can have one single language for your whole application and your whole code base.
- 11:42You can tap into uh fast-growing AI ecosystem.
- 11:46You can have consistent typing uh across all your application.
- 11:51And you can tap into the richest package manager that there is, NPM.
- 11:59So, um you might ask was all this unpredictable?
- 12:05And the answer is actually no. Someone predicted this uh many years ago, almost 20 years ago.
- 12:12Jeff Atwood said, "Any application that can be written in JavaScript will eventually be written in JavaScript."
- 12:20And you know, as you as you probably know in the last few years, we have a corollary of this that any application that could be written in JavaScript will eventually be written in TypeScript.
- 12:32And so basically, we can say that any application, even the gigantic ones, will be written in TypeScript.
- 12:43And be mindful that what I showed you today is just the beginning.
- 12:47Like, we are just getting started.
- 12:50You can project this in a few years and you can see that on the application layer, the difference between TypeScript and Python is actually going to widen from here.
- 13:02So, um as I said, the model can still run on pip.
- 13:09But the agents, which is the application layer today, so the agent that called the models will probably ship on NPM.
- 13:20So, everything on the inference layer, you know, it's going to be Python.
- 13:25But everything but else, probably all TypeScript.
- 13:31Let me leave you with one recommendation then.
- 13:34Um keep training in Python.
- 13:36As I said, I don't see that's one going away soon.
- 13:41But please consider building the agents and the applications in TypeScript.
- 13:47Because if you don't do that now, if you overlook TypeScript, you are probably going to fall behind.
- 13:56That was all on my side today.
- 13:58I thank you all for your listening.
- 14:01And please scan the QR code for the slides.
- 14:05Reach out to me if you agree or if you disagree, if you have any feedback, and let's get in touch.
- 14:11Thank you.
- 14:13Bye-bye.