Open Reader

A Song of Types and Agents - Roberto Stagi, Ratel

completed 14:16 Jul 12, 2026 Watch on YouTube

Current Status

completed

Video ID

UlFB6efYN5Q

RAG / Chat

Enabled
A Song of Types and Agents - Roberto Stagi, Ratel
Description

Python ruled unchallenged for a decade, sitting comfortably on the AIron Throne. But a quiet rebellion is brewing: the entire stack that actually deploys AI agents in production runs on npm, not pip. This lightning talk is an opinionated, slightly unhinged tour of how TypeScript is taking over the AI throne, why this happened and how you can prepare for it. Speakers: - Roberto Stagi (Ratel): Roberto is the CTO & Co-Founder of Ratel, context layer for AI Agents, EU-Ambassador at AI Socratic, and deep into the mission of making context engineering simple for everyone. X/Twitter: https://x.com/rstagi_ LinkedIn: https://linkedin.com/in/rstagi GitHub: https://github.com/rstagi

Summary

Generated by gpt-5.6-terra

At-a-Glance

  • Verdict: Skim
  • Core thesis: As AI shifts from model training toward agent-enabled product applications, TypeScript is becoming the preferred implementation layer for agents, while Python remains the language for model research, training, and inference infrastructure.
  • Why it matters: For teams shipping agent products rather than training foundation models, a TypeScript-first stack can reduce frontend/backend/agent integration friction, share schemas end to end, and capitalize on the npm ecosystem and coding-agent support.
  • Best use: Use this as a concise architectural argument for evaluating a TypeScript-first agent application layer; it is strategic framing rather than a technical implementation guide.

Executive Summary

Roberto Stagi, CTO and co-founder of Ratel, argues that the relevant language question in AI is no longer simply whether Python dominates AI. Python continues to dominate the model layer—research, training, GPU serving, and inference infrastructure—but agentic AI is increasingly an application-layer problem. Since application development is already heavily centered on TypeScript, he expects agents, their tools, APIs, interfaces, and integrations to move there as well.

His primary market signal is GitHub language usage: Python reportedly became GitHub's most-used language in 2024 under an “AI leads Python” narrative, while TypeScript reportedly overtook it in August 2025 under a similar AI-led narrative. Stagi attributes the reversal chiefly to coding agents becoming mainstream application-building tools and generating substantial TypeScript output, alongside demand to embed AI capabilities inside TypeScript applications.

The operational case for TypeScript is consolidation. A TypeScript stack can cover an agent loop, tools, backend services, and UI in one language, while allowing shared runtime schemas—he cites Zod—across model outputs, backend validation, and the user interface. This avoids maintaining contracts across a Python service and separate TypeScript frontend, while providing access to npm's application-oriented ecosystem for authentication, payments, UI, and infrastructure.

The presentation is deliberately directional and advocacy-oriented, not a balanced language benchmark. Its useful conclusion is a division of labor: retain Python where model-layer capabilities require it, but treat TypeScript as a serious default for productized agents and AI-enabled applications, especially where fast integration and consistent application contracts matter.

Key Takeaways

  • Claim: AI development is bifurcating into a Python-dominated model layer and a TypeScript-favored application and agent layer. | Evidence: Stagi distinguishes Python's continuing role in training, research, GPU serving, and inference from the work of shipping AI inside products: agent loops, tools, backend services, and UIs. | Implication: Choose language by layer: preserve Python for model-centric systems, but do not assume agent products need to be implemented in Python. | Caveat: This is an architectural framing and forecast from a TypeScript-oriented speaker, not evidence that TypeScript replaces Python for ML, model serving, or research workloads.
  • Claim: The rise of coding agents makes TypeScript strategically self-reinforcing for application development. | Evidence: He cites the establishment of coding-agent products including Claude Code, Cursor, Codex, and a transcript-rendered reference likely to Lovable, arguing that their default application output is commonly TypeScript. He further predicts that more TypeScript code and deeper tool integrations will improve coding-agent output in that language. | Implication: If Ken relies heavily on coding agents to build and maintain product software, TypeScript may offer a practical productivity advantage through better generated code, templates, and ecosystem support. | Caveat: The proposed feedback loop—more TypeScript generated today leading to materially superior future TypeScript agents—is plausible but speculative; no comparative coding-agent quality data is presented.
  • Claim: A single TypeScript codebase can reduce the integration burden of agent products. | Evidence: Stagi contrasts TypeScript across agent loop, tools, backend, and UI with a common Python-agent/FastAPI backend plus React frontend architecture, where teams must maintain contracts between independently typed services. | Implication: For product teams optimizing speed and coherence, standardizing the agent-facing application layer on TypeScript can reduce cross-language handoffs and duplicated interface definitions. | Caveat: Service boundaries can still be beneficial for scaling, isolation, security, team ownership, and use of Python-only libraries; a single-language stack is not inherently the right deployment topology.
  • Claim: Shared runtime schemas are the strongest technical argument presented for TypeScript agent applications. | Evidence: He proposes defining a Zod schema once and using it for backend validation, model-facing structured output, and UI typing—“one type, checked end to end.” | Implication: Make shared schemas a design requirement for agent tool inputs, structured model outputs, API payloads, and UI state, rather than treating type safety as a compile-time frontend concern. | Caveat: Schema reuse improves contract consistency but does not itself ensure model reliability; agent outputs still need validation, error handling, authorization, and observability.
  • Claim: npm's breadth makes TypeScript particularly well suited to AI features that must connect to real application systems. | Evidence: Stagi characterizes npm as the deepest application-layer package ecosystem, naming authentication, payments, UI, and infrastructure as capabilities an AI-enabled product must integrate with. | Implication: When the agent's value depends on production integrations rather than model experimentation alone, package availability and integration maturity should be part of language selection.
  • Claim: The TypeScript AI ecosystem is growing rapidly enough to support its use for agent development. | Evidence: He cites the Vercel AI SDK rising from 1.6 million to 15.1 million weekly downloads in one year, roughly 9–10x growth, as an indicator of ecosystem momentum. | Implication: TypeScript should be evaluated as a first-class option for agent orchestration and product integration rather than only as a frontend language. | Caveat: Download growth is an adoption signal, not a direct measure of framework quality, production readiness, or suitability for a specific agent architecture.

Detailed Brief

What the GitHub-language argument does—and does not—establish

  • Claims: Stagi uses GitHub language rankings as a proxy for where AI product development is occurring, not merely for conventional web development.; His historical framing is that the surge toward Python in 2024 reflected AI's initial expansion, whereas the shift toward TypeScript in 2025 reflected AI becoming embedded in applications through coding agents.
  • Evidence: He states that Python reached the top GitHub language position in 2024 and that TypeScript passed it in August 2025.; He notes rapid developer growth on GitHub, claiming one new developer joined every second in 2025.; He points to Anthropic's acquisition of Bun, a JavaScript runtime, as a symbolic sign of AI-lab interest in the JavaScript/TypeScript ecosystem.
  • Caveats: Popularity rankings aggregate many kinds of repositories and users, so they cannot by themselves show that TypeScript is technically superior for agents.; The talk does not compare latency, model-library maturity, operational deployment, security controls, data tooling, or cost across Python and TypeScript stacks.
  • Implications: Treat language popularity as a talent, tooling, and ecosystem signal—not as the decision criterion for core inference, data science, or specialized ML workloads.; The more an AI initiative resembles a customer-facing software product with numerous integrations, the more relevant the speaker's TypeScript thesis becomes.

Notable Concepts & Terms

  • Application layer vs. model layer: The talk's central boundary: Python remains appropriate for models and ML infrastructure, while TypeScript is positioned for the product systems that call models and expose agent behavior.
  • Agentic layer: The agent loop, tool calling, orchestration, service logic, and interfaces embedded in an application; Stagi argues this layer is increasingly TypeScript-native.
  • End-to-end type consistency: Using one schema/type definition across model outputs, APIs, backend logic, and UI to reduce contract drift.
  • Zod: A TypeScript schema-validation library presented as the mechanism for sharing runtime-validated contracts across an entire agent application.
  • npm: The JavaScript/TypeScript package ecosystem, positioned as an advantage for production agent applications needing authentication, payments, UI, and infrastructure integrations.
  • Vercel AI SDK: A TypeScript-oriented AI application SDK used as the talk's example of rapid ecosystem adoption and momentum.
  • Atwood's Law: Jeff Atwood's observation that applications that can be written in JavaScript eventually will be; Stagi extends it rhetorically to TypeScript and agent applications.
  • Bun: A JavaScript runtime; the speaker cites Anthropic's acquisition of it as evidence that AI organizations see strategic value in the JavaScript ecosystem.

Operator Notes / Why Ken Should Care

  • Adopt a layer-by-layer language policy: use Python only where ML/model-serving dependencies demand it, and default agent product surfaces, tools, integrations, and UI-adjacent services to TypeScript unless there is a clear exception.
  • Standardize a shared runtime-schema approach for model responses, tool contracts, APIs, and frontend state; evaluate Zod or an equivalent before expanding agent workflows.
  • Run a small build comparison for a representative agent workflow: TypeScript end to end versus Python service plus TypeScript client, measuring contract changes, iteration time, integration effort, and generated-code quality.
  • Do not use GitHub rankings or SDK download counts as sufficient evidence for a platform decision; validate security, observability, deployment, queueing, and Python-library interoperability for the intended production workload.

Source/Metadata

  • Title: A Song of Types and Agents - Roberto Stagi, Ratel
  • Transcript words: 3026
  • Duration seconds: 856
  • Timestamp note: No usable timestamps or chapters were provided. The latter portion of the transcript substantially repeats the main presentation.

Transcript

1755 words en Processed in 145.4s

Hello, and thank you for being here. I'm Roberto, and today I'm going to tell you this song of Types and Agents. A song that speaks about languages that fight each other to conquer the throne in the AI realm, and how I think that TypeScript might actually be winning this war. But let's start from the beginning. A few years ago, whenever someone was building an AI, they were certainly using Python. There was no doubt. All the other languages were bowing to Python because of its dominion over the AI world. And then, in 2022, when Agipity was released, everybody started wondering and understanding that AI was becoming something more, was going outside of the bubble that it lived in for years, and started to become something more ambitious. And together with it, Python, which was the standard language for AI, became more ambitious as well. And that's how, in 2024, GitHub actually claimed the ladder and became the most popular language on GitHub. Everybody was happy. Python finally reached the top, but little did they know that there was another contender for that throne, another contender that was rising to challenge the claim that Python had on the throne. And this contender, as you may have guessed by now, was indeed TypeScript. But before talking about this, let me present myself. My name is Roberto. I'm the CTO and co-founder of Rato, a context layer for AI agents. And I'm also the EU ambassador for AI Socratic, a global community of AI builders meeting once per month to discuss the latest news in AI. I'm also a long-time JavaScript-then-turned-TypeScript developer. And that's why I am talking about TypeScript today. So let's begin. As we said, AI started moving up the stack. It was moving from the infrastructure layer of these models, machine learning, and all the related ecosystem toward the application layer. This means that AI stopped being something that you train, and it started being something that you ship inside your application. Applications started featuring AI, started having features powered by AI, which means that we started having applications that think. And the application layer was not Python's. The application layer has been TypeScript for a pretty long time now. Don't get me wrong. I still think that Python has its own application. I still think that the brain of the agent and all the AI world is actually still owned by Python. All the training, the research, the GPU serving is all Python. It has been Python all along, and it's going to be Python for a long time. And what's changing is actually the application layer. A few years ago, if you wanted to build something with AI built into the application, you had to use Python. But today, that's not the case anymore. And that's what the shift is about. TypeScript doesn't just own the UI or the backend. It started owning also the agentic layer of our application. And that's why, in August 2025, TypeScript actually passed Python as the most used language on GitHub. And the funny thing is that the reason the GitHub report gave was the same. In 2024, it said AI leads Python to top language, while in 2025, it said AI leads TypeScript as the first language. And in both cases, as you can see, the number of global developers was surging. In 2025, we even have one new developer joining GitHub every second. So, what actually changed in this year? We were flooded with new developers. In 2024, these new developers were reaching for Python. Or maybe existing developers were reaching for Python. And in 2025, they reached for TypeScript instead. What changed between 2024 and 2025 was actually coding agents. The coding agents grew up. We saw the players establishing themselves: Lavapog, CloudCode, Courser, Codex. They became the default way to build applications. And the default way in which these coding agents actually build the applications was TypeScript. And 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 inside themselves, the demand to have more AI integrations, more and more AI integrations, doesn't fall onto Python. It falls on TypeScript. And pretty much all the tools that we use to build AI today already run on TypeScript. We even saw an AI lab acquiring a JavaScript runtime. Last December, Anthropic acquired a ban. But still, okay, everybody is using TypeScript because of the coding agents, and we are having more and more demand to embed AI inside TypeScript applications. But does this mean that we should do it? This is a fair question. It's an honest question, and it's a question worth answering. And the answer, in my opinion, can be yes, for several reasons. The 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 TypeScript, because we are having more and more applications in TypeScript, which are going to build the training of next coding agents. And then, we are having deeper integrations and more native integrations from these coding agents toward TypeScript. And we can expect that the quality of the output in TypeScript is going to be better and better from these coding agents. Since we are building applications, and we want to have the highest quality of these applications, it might make sense to build agents, which are the new kind of applications, in TypeScript. And also, if you use TypeScript, you are actually tapping into what is probably the richest package manager out there. So here, npm comes with everything, pretty much everything: authentication, payments, UI, infra. It's the deepest app-layer tail that there is. So since, again, AI is coming toward the application layer, we need to integrate with all this right now. And tapping into npm is a very convenient way to do that. Also, by building in TypeScript, you can have one single language throughout all your codebase. You can have one single codebase for the whole application, because you can use TypeScript for your agent loop, for the tools, for the backend service, for the UI. While, if you use Python, you probably have to split it at least into two services, which means one service with FastAPI, PyDAMP, TKI, and whatever, and then another separate React application that you need to sync between these two with a contract, which you have to maintain and synchronize. And speaking of contracts, with TypeScript, you can have one single consistent typing across all your application. While if you use Python instead, you, at some point, will stop at a boundary, because you will have your agent, maybe your backend, etc., with one consistent typing, and then you will have your React application, or Vue, or whatever, with another set of typing, which you need to synchronize between the two. So, if you use TypeScript, you can use Zod as a single schema throughout all your application, which is very convenient. You can define the type once. You can use this type in the backend and in the model. And you can use the same type in your UI. One type, checked end to end. Also, it makes sense to build in TypeScript today, also in the AI ecosystem, because we are seeing a surge in the AI ecosystem as well. Take the Versoilize AI SDK, for example. You can see that in just one year, it went from 1.6 million to 15.1 million downloads per week, which is between 9x and 10x in just one year. So finally, to put everything together, in my opinion, yes, it makes sense to build AI agents in TypeScript, because you can leverage the de facto default language for coding agents, you can have one single language for your whole application, your whole codebase, you can tap into a fast-growing AI ecosystem, you can have consistent typing across all your application, and you can tap into the richest package manager that there is, npm. So, you might ask, was all this unpredictable? And the answer is actually no. Someone predicted this many years ago, almost 20 years ago. Jeff Atwood said any application that can be written in JavaScript will eventually be written in JavaScript. And, as you probably know, in the last few years, we have a corollary of this: an application that could be written in JavaScript will eventually be written in TypeScript. And so, we can say that any application, even the agentic ones, will be written in TypeScript. Jeff Atwood said that that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts the agents, which is the application layer today, so the agent that called the models will probably ship on npm. So everything on the inference layer is going to be Python, but everything else, probably all TypeScript. Let me leave you with one recommendation, then. Keep training in Python. As I said, I don't see that one going away soon, but please consider building the agents and the applications in TypeScript, because if you don't do that now, if you overlook TypeScript, you are probably going to fall behind. That was all on my side today. I thank you all for your listening, and please scan the QR code for the slides. Reach out to me if you agree or if you disagree, if you have any feedback, and let's get in touch. Thank you. Bye bye. TypeScript doesn't just own, you know, the UI or the backend. It started owning also the agentic layer of our application. And that's why, in August 2025, TypeScript actually passed Python as the most used language on GitHub. And the funny thing is that the reason that the GitHub report gave was the same. Like, in 2024, it said AI leads Python to top language. While in 2025, it said AI leads TypeScript as the first language. And in both cases, as you can see, the global developers, the number of global developers were surging. In 2025, we even have one new developer joining GitHub every second. So, what actually changed in this year? Like, yeah, we were flooded from, like, new developers. In 2024, these new cameras were reaching for Python. Or even maybe existing developers were reaching for Python. And in 2025, they reached for TypeScript instead. What changed between 2024 and 2025 was actually coding agents. The coding agents grew up. Like, we saw established... We saw the players establishing themselves. Like, Lavapog, CloudCode, Courser, Codex. They became the default way to build applications. And the default way to which these coding agents actually build the applications was TypeScript. And, 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 inside themselves, the demand to have more AI integrations, more and more AI integrations, doesn't fall onto Python. And, it falls on TypeScript. And, pretty much all the tools that we use to build AI today already run on TypeScript. We even saw an AI lab acquiring a JavaScript runtime. Like, last December, Anthropic acquired a ban. But, still, you know, okay, everybody is using TypeScript because of the coding agents. And, we are having more and more demand to build... To embed AI inside TypeScript application. But, does this mean that we should do it? Like, this is a fair question. Like, it's an honest question. And, it's a question worth answering. And, the answer, in my opinion, can be yes. Like, for several reasons. The 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 TypeScript, because we are having more and more applications in TypeScript, which are going to build the training of next coding agents. And, then, we are having deeper integrations and more native integrations from these coding agents towards TypeScript. And, we can expect that the quality of the output in TypeScript is going to be better and better from these coding agents. Since we are building applications, and we want to have, like, the highest quality of these applications, it might make sense to build agents, which are the new kind of applications in TypeScript. And, also, if you use TypeScript, you are actually tapping into what is probably the richest package manager out there. So, here, NPM comes with everything, pretty much everything, like authentication, payments, UI, infra, like it's the deepest up layer tail that there is. So, since, again, AI is coming towards the application layer, we need to integrate with all this right now. And tapping inside NPM is a very convenient way to do that. So, you can also, by building in TypeScript, you can have one single language throughout all your codebase. You can have one single codebase for the whole application, because you can use TypeScript for your agent loop, for the tools, for the backend service, for the UI. While, if you use Python, you probably have to split it at least into two services, which means, you know, one service with FastAPI, PyDAMP, TKI, and whatever. And then, another separate React application that you need to sync between these two with a contract, which you have to maintain and synchronize. And speaking of contracts, with TypeScript, you can have one single consistent typing across all your application. While if you use Python instead, you, at some point, will stop at a boundary, because you will have your agent, maybe your backend, etc., with one consistent typing. And then, you will have your React application, or Vue, or whatever, with another set of typing, which you need to synchronize between the two. So, if you use TypeScript, you can use Zod as a single schema throughout all your application, which is very convenient. You can define the type once. You can use this type in the backend and in the model. And you can use the same type in your UI. One type checked end-to-end. Also, like, it makes sense to build in TypeScript today, also in the AI ecosystem, because we are seeing a very surge in the AI ecosystem as well. Like, take the Versoilize AI SDK, for example. You can see that in just one year, it went from 1.6 million to 15.1 million downloads per week, which is between 9 and 10x in just one year. So, finally, like, to put everything together, in my opinion, yes, it makes sense to build the AI agents in TypeScript, because you have, like, you can leverage the de facto defaults language for coding agent, you can have one single language for your whole application, your whole code base. You can tap into a fast-growing AI ecosystem. You can have consistent typing across all your application. And you can tap into the richest package manager that there is, NPM. So, you might ask, was all this unpredictable? And the answer is actually no. Someone predicted this many years ago, almost 20 years ago. Jeff Atwood said any application that can be written in JavaScript will eventually be written in JavaScript. Jeff Atwood said any application that can be written in JavaScript. And, you know, as you probably know, in the last few years, we have a corollary of this, that an application that could be written in JavaScript will eventually be written in TypeScript. And so, basically, we can say that any application, even the agentic ones, will be written in TypeScript. Jeff Atwood said that in that abstracts that that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that abstracts that the agents, which is the application layer today, so the agent that called the models will probably ship on npm. So everything on the inference layer, you know, it's going to be Python, but everything else, probably all TypeScript. Let me leave you with one recommendation then. Keep training in Python. As I said, I don't see that one going away soon, but please consider building the agents and the applications in TypeScript, because if you don't do that now, if you overlook TypeScript, you are probably going to fall behind. That was all on my side today. I thank you all for your listening, and please scan the QR code for the slides. Reach out to me if you agree or if you disagree, if you have any feedback, and let's get in touch. Thank you. Bye bye.