AI Engineer World's Fair 2026
A Song of Types and Agents
Loading slides…
Read the talk
A Song of Types and Agents
As AI moves from training models to shipping applications, TypeScript offers a practical way to connect agent loops, tools, backend services and interfaces through shared code and schemas.
From a talk by Roberto Stagi
Before you start: Basic familiarity with TypeScript, backend services and model APIs will help with the shared-schema example.
Who owns the AI language throne?
If Python became the leading language on GitHub as AI expanded, why would TypeScript become its challenger? Roberto Stagi opens with a contest for the AI language throne. For years, Python was the obvious choice for AI development. ChatGPT’s release in 2022 brought AI beyond its specialist audience, expanding both the ambitions of applications and the reach of Python.
In the GitHub report Stagi cites, Python ranked first in 2024 by broad contribution activity; JavaScript still led code pushes. That distinction matters: a language can lead one measure without dominating every kind of development. TypeScript enters the story as the challenger whose strength lies in building applications.
Stagi brings an application developer’s perspective to that contest. He introduces himself as Ratel’s CTO and co-founder, an EU ambassador for AI Socratic, and a longtime JavaScript developer who moved to TypeScript. His interest is where agents fit into the software that developers ship.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
From training models to shipping applications
The relevant shift is from model infrastructure to the application layer. AI becomes something developers ship inside a product, rather than only something they train. A model call now sits alongside the interface, backend logic and other features that make an application useful. That brings AI development into territory where TypeScript already has a strong presence.
This leaves substantial work in Python. In Stagi’s division of responsibilities, research, training and GPU serving remain its domain. What changes is the language needed to build the application around those capabilities: TypeScript can cover the UI, backend and increasingly the agentic layer that calls models and coordinates work.
Stagi cites TypeScript overtaking Python in GitHub’s August 2025 ranking by monthly contributors. He juxtaposes two reports that both associated AI with the rise of their leading language—Python in 2024, then TypeScript in 2025. The 2025 report also described GitHub signups averaging more than one new developer per second over September 2024–August 2025. These are platform activity measures, not proof that coding agents caused developers to switch languages. They set up the next question: what changed in how people were building applications?
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Coding agents create demand for TypeScript integrations
Stagi’s proposed explanation is that coding agents matured. Lovable, Claude Code, Cursor and Codex became established ways to build applications. He characterizes TypeScript as their default application language—a description of the development pattern he sees, rather than a universal rule about what these tools can generate.
The next link is demand for AI inside those applications. If a product is already written in TypeScript, adding an agent creates pressure for model integrations and agent tooling in the same ecosystem. Stagi describes this expansively, treating agentic features as an increasingly ordinary part of new applications. He points to Anthropic’s acquisition of Bun in December 2025 as a concrete signal of an AI lab investing in a JavaScript runtime.
But adoption does not settle the engineering choice. An application may already use TypeScript, and coding tools may make it convenient, without that alone establishing where its agent should live. The useful question becomes: what does keeping the agent in TypeScript actually buy?
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
A possible feedback loop in generated code
The first benefit is prospective. More TypeScript applications could provide more training material for future coding agents. Deeper native integrations between those agents and TypeScript tooling could also improve the quality of generated applications. Together, these changes could reinforce the initial preference for TypeScript.
Stagi presents this as an expectation, not a measured improvement in coding accuracy. Its relevance to agent development follows from his broader premise: if an agent is part of an application, improvements in the tools that build applications should benefit the agent code too.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
The application around the model call
The next benefit is already familiar to application developers: npm supplies packages for authentication, payments, interfaces and infrastructure. Stagi calls it probably the richest package ecosystem available. The practical point is the breadth of surrounding product capabilities, rather than an ecosystem ranking.
As AI moves into applications, it must integrate with those capabilities. Building the agent in TypeScript puts it in the same package ecosystem as the rest of the product, making existing application integrations available alongside the model-facing code.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
One language, one shared contract
TypeScript can cover the agent loop, its tools, the backend service and the UI within one codebase. Stagi contrasts this with a Python service using FastAPI or Pydantic AI alongside a separate React application. That is a common architecture, not a mandatory consequence of choosing Python, but it introduces a contract between the services that must be maintained.
| Concern | Shared TypeScript codebase | Python service and React or Vue UI |
|---|---|---|
| Agent and interface code | One language | Two language ecosystems |
| Type definitions | Can be shared directly | Must stay synchronized across a boundary |
| Application contract | Shared schema can define it | Separate representations must agree |
The boundary becomes especially visible in types. A Python agent and backend may have internally consistent definitions, while the frontend has another set. Changing a record means keeping both representations aligned.
Zod provides a concrete way to share that contract. Define a schema once, infer its TypeScript type, and reuse it in the backend, model-facing code and UI. For example, a proposed task can have one definition throughout the application:
typescript
import { z } from "zod";
export const ProposedTask = z.object({
title: z.string().min(1),
status: z.enum(["pending", "approved"]),
});
export type ProposedTask = z.infer<typeof ProposedTask>;
export function validateProposal(input: unknown) {
const result = ProposedTask.safeParse(input);
if (!result.success) {
return { ok: false as const, issues: result.error.issues };
}
return { ok: true as const, task: result.data };
}
export function taskLabel(task: ProposedTask): string {
return `${task.title} (${task.status})`;
}
const result = validateProposal({
title: "Review invoice",
status: "pending",
});
if (result.ok) {
console.log(taskLabel(result.task));
} else {
console.error(result.issues);
}
Here, ProposedTask supplies both runtime validation and the type consumed by taskLabel. The record remains a pending proposal; validation does not approve or execute it. Shared types do not automatically make external model output valid. Incoming data still needs to pass through the schema, and the application must handle validation failures.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
An expanding AI ecosystem
This is the practical meaning of a type checked end to end: the same definition can connect the model-facing boundary to backend logic and interface code. Stagi then broadens the argument from shared types to the growth of TypeScript’s AI tooling.
Stagi reports that Vercel AI SDK weekly downloads rose from 1.6 million to 15.1 million in one year, roughly nine to ten times. This is his download-growth example, not a count of unique users or production applications. It supports the picture of a growing ecosystem without measuring the quality of applications built with it.
The combined case joins five considerations: coding-agent preferences, one language throughout the codebase, a growing AI ecosystem, consistent types and npm’s existing application integrations. Their practical force comes from working together. A team can build agent behavior in the same environment that supplies its product dependencies and defines its application contracts.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Atwood’s law reaches agents
The closing analogy comes from Jeff Atwood’s JavaScript maxim: applications that can be written in JavaScript eventually will be. Stagi follows it with a TypeScript corollary: applications that could be written in JavaScript will eventually be written in TypeScript.
Agentic applications fall into that category too. This is a rhetorical extension of the application-layer argument, not a technical inevitability: as agents become ordinary application components, they become candidates for the same languages, dependencies and development tools as the rest of the product.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Models on pip, agents on npm
Stagi forecasts that TypeScript’s advantage at the application layer will widen. His packaging analogy separates the roles: a model can remain in the Python and pip ecosystem while the agent that calls it ships through npm. In that picture, Python continues to handle model and inference infrastructure, while TypeScript handles the surrounding application. The distinction describes ecosystem responsibilities, not a deployment procedure.
His recommendation follows that division: keep training in Python, but consider TypeScript for agents and applications. The warning about falling behind is directed at developers who overlook TypeScript entirely. The choice concerns how to build and maintain the product around the model—and whether its agent should share the language, packages and contracts already used by the application.
Suggest correction
This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.
Resources
From the talk
The December 2025 acquisition announcement explains Bun's role in Claude Code infrastructure.
Define schemas, validate runtime data and infer TypeScript types.
Open-source TypeScript toolkit for building AI-powered applications and agents.
Jeff Atwood's original essay introducing his maxim about applications eventually being written in JavaScript.
Further reading
An Italian-language interview covering Ratel, context management, open-source development and AI Socratic.
Full transcript
Loading transcript…