Python still dominates model training, research, and GPU serving, while TypeScript is taking over the application and agent layers.
2
Coding agents have helped make TypeScript the default language for building new AI applications, increasing demand for TypeScript integrations.
3
TypeScript lets teams use one language, one codebase, shared schemas, and the large npm ecosystem across agents, back ends, and UIs.
Summary
Roberto Stagi argues that Python and TypeScript are winning different parts of the AI stack. Python remains the language for training, research, and GPU serving. TypeScript is becoming the language for applications that embed AI, including agents. Stagi connects this shift to coding agents such as Claude Code, Cursor, and Codex, which commonly generate TypeScript applications. He gives practical reasons to use TypeScript for agents: npm covers authentication, payments, UI, and infrastructure; a team can use one language across the agent loop, tools, back end, and UI; and shared schemas such as Zod can keep types consistent. He also points to rapid growth in the Vercel AI SDK. His recommendation is to keep training models in Python while considering TypeScript for agents and applications. He expects the split between Python at the inference layer and TypeScript at the application layer to grow.
AI moved from model infrastructure into applications
Stagi describes AI moving up the stack. It used to focus on training models, machine learning infrastructure, and related systems. Now AI is shipped inside products as application features, creating applications that can think. He says the application layer has historically belonged to TypeScript, even though Python still owns the model side. In his view, the shift is about where AI is used, rather than Python disappearing from AI altogether.
Stagi draws a boundary between the brain of an AI system and the application around it. Python remains dominant for training, research, and GPU serving, and he expects that to continue. The change is that teams no longer need Python to build every application with AI inside it. TypeScript has expanded from UI and back-end work into the agent layer, where applications call models and expose agentic features.
Coding agents helped TypeScript pass Python on GitHub
Stagi points to August 2025, when TypeScript passed Python as the most-used language on GitHub. He connects this change to the growth of coding agents. Claude Code, Cursor, and Codex established themselves as common ways to build applications, and they generally produced TypeScript applications. Since many new applications now include AI or agentic capabilities, that usage creates more demand for TypeScript-based AI integrations.
Stagi says TypeScript can benefit from a feedback loop. It is already the default language for many coding agents, so more TypeScript applications can provide material for improving future coding agents. Those agents can also develop deeper, more native TypeScript integrations. If teams want high-quality generated applications, Stagi thinks it makes sense to build agents in the language where these tools are becoming strongest.
TypeScript gives teams access to npm, which Stagi calls a very rich package manager. He names authentication, payments, UI, and infrastructure as areas covered by the ecosystem. Since agents now need to connect to ordinary application features, using npm lets developers work with those integrations from the same environment. His argument is practical: the agent is part of a product, so its language should have access to the product's surrounding systems.
One TypeScript codebase can span the whole product
Stagi says a TypeScript application can use one language and one codebase for the agent loop, tools, back-end service, and UI. A Python-based setup may split the system between a service using FastAPI and Pydantic AI and a separate React application. That split requires a contract between services and ongoing synchronization. With TypeScript, the boundaries between these parts can be smaller and easier to manage.
Shared schemas keep types consistent across the stack
Stagi focuses on typing as another reason to use TypeScript. A Python service and a React or Vue application can end up with separate sets of types that must be synchronized. With Zod, he says a team can define a schema once and use it in the back end, model-facing code, and UI. The same type can then be checked across the application instead of being recreated at each boundary.
Python training and TypeScript agents will coexist
Stagi does not predict that Python will leave AI. He recommends continuing to train models in Python while considering TypeScript for agents and applications. His expected division is that models and inference systems will keep running in the Python ecosystem, including pip, while the agents that call those models will increasingly ship through npm. He thinks overlooking TypeScript now could leave developers behind as the application-layer gap widens.
"The model can still run on pip. But the agents, which is the application layer today, so the agent that called the models will probably ship on NPM."13:08
Who should watch
You build AI products and are deciding whether the agent layer should live in Python or TypeScript.
Your stack crosses an agent service, a back end, and a web UI, and duplicated types or service contracts are causing maintenance work.
You use coding agents and want to understand why TypeScript may produce better results from those tools over time.