Why are AI agents mostly built in Python and TypeScript, and where do you start?
One language is named after a comedy series, the other adds types to JavaScript, and GitHub's data puts both at the top.
โถ Start the storyBecause, by GitHub's measures, that is where much of the activity is. Python is a high-level, general-purpose language that emphasizes readability and simplicity, and GitHub reported in 2024 that it had overtaken JavaScript as the most popular language there, which it linked to the surge in data science and machine learning. TypeScript is JavaScript with optional types added, usable on both the client side and the server side of web applications.
GitHub's 2025 report said that in August 2025, counted by contributors, TypeScript became the most used language on the platform for the first time, ahead of Python by about 42,000 contributors; it noted that other indices, using other methods, may still rank JavaScript and Python higher. Its own explanation was a shift toward typed languages that make agent-assisted coding more reliable in production. It also added that Python remains dominant for AI and data science workloads, while JavaScript and TypeScript together account for more overall activity than Python alone. So GitHub's own figures, as of its 2025 report, do not name a single winner.
Python
- Dominant for AI and data science workloads
- Widely taught as a first language
- Most popular language on GitHub in 2024
TypeScript
- JavaScript with optional static types
- Client side and server side
- Most used language on GitHub from August 2025
The tools for agents follow both. The Model Context Protocol, a standard for connecting agents to tools, was released with software development kits in languages including Python, TypeScript, C# and Java.
A reassuring point for a beginner: engineers at Anthropic suggested that developers start by using language-model APIs directly, because many agent patterns can be implemented in a few lines of code. Python is also widely taught as an introductory language, and Hugging Face describes its AI Agents Course as free.
Quiz me
0/3
Recap
Python for AI and data science, TypeScript for typed code, and an API call is the first step.
๐ก A trick to remember it ยท Python for the data lab, TypeScript for the typed web.
Surprising fact ยท Python is named after Monty Python, and in 2025 GitHub reported TypeScript had passed it as the most used language there.
Sources (7)
No source, no claim. Every fact in this lesson (16 claims) cites at least one of these.
- [1]Python (programming language) ยท Wikipedia
- [2]TypeScript ยท Wikipedia
- [3]Octoverse: A new developer joins GitHub every second as AI leads TypeScript to #1 ยท The GitHub Blog
- [4]Octoverse: AI leads Python to top language as the number of global developers surges ยท The GitHub Blog
- [5]Model Context Protocol ยท Wikipedia
- [6]Building effective agents ยท Anthropic Engineering
- [7]Welcome to the AI Agents Course ยท Hugging Face