What Programming Languages Are Used in the AI Engineering From Scratch Repository?
The AI Engineering From Scratch curriculum employs four primary programming languages—Python, TypeScript, Rust, and Julia—across 435 lessons designed to teach artificial intelligence concepts from first principles without high-level abstractions.
The ai-engineering-from-scratch repository by rohitg00 is a comprehensive, multi-language educational resource that builds AI systems from the ground up. This deliberately polyglot codebase demonstrates how different programming languages solve distinct challenges in the machine learning pipeline, from numerical computation to edge deployment, while maintaining a strict dependency-light philosophy enforced by the AGENTS.md allowlist.
The Four Primary Programming Languages
Python for Deep Learning Foundations
Python serves as the backbone for core numerical work and deep-learning fundamentals throughout the curriculum. The repository uses Python for PyTorch and JAX demonstrations in early-phase lessons focused on computer vision and neural network basics. You can find representative implementations in phases/04-computer-vision/01-image-fundamentals/code/main.py, which handles image processing primitives using standard scientific computing stacks.
TypeScript for Agent Engineering and Server-Side Runtimes
TypeScript powers modern agent-engineering and full-stack integrations, specifically targeting Node.js 20+ environments. The curriculum uses TypeScript for tool-use implementations and terminal-native coding agents, as evidenced in phases/19-capstone-projects/01-terminal-native-coding-agent/code/ts/src/server.ts. This language handles server-side runtime requirements and API integrations primarily in later capstone project phases.
Rust for Performance-Critical Components
When addressing edge inference and real-time processing, the curriculum turns to Rust for memory-safe, high-performance implementations. Vision pipelines and low-level demos appear in files like phases/04-computer-vision/15-real-time-edge/code/main.rs, demonstrating how to deploy efficient inference engines on resource-constrained devices where Python would introduce unacceptable latency.
Julia for Numerical Experiments
Julia appears in academic-style numerical experiments and algorithmic prototypes, particularly in the deep learning core phases. Files such as phases/03-deep-learning-core/05-loss-functions/code/main.jl showcase how Julia's mathematical syntax facilitates rapid experimentation with loss functions and optimization algorithms before implementation in production languages.
Code Examples From the Repository
Below are the actual implementation patterns found in the repository, demonstrating the from-scratch philosophy using minimal dependencies.
Python Example
# phases/04-computer-vision/01-image-fundamentals/code/main.py
def main():
print("👋 Hello, AI engineering from scratch (Python)!")
if __name__ == "__main__":
main()
TypeScript Example
// phases/19-capstone-projects/01-terminal-native-coding-agent/code/ts/src/server.ts
import http from "node:http";
const server = http.createServer((_req, res) => {
res.writeHead(200, { "Content-Type": "text/plain" });
res.end("👋 Hello, AI engineering from scratch (TypeScript)!");
});
server.listen(3000);
Rust Example
// phases/04-computer-vision/15-real-time-edge/code/main.rs
fn main() {
println!("👋 Hello, AI engineering from scratch (Rust)!");
}
Julia Example
# phases/03-deep-learning-core/05-loss-functions/code/main.jl
println("👋 Hello, AI engineering from scratch (Julia)!")
Repository Structure and Language Organization
The repository organizes content across multiple phases, with each lesson's docs/en.md front-matter explicitly documenting which programming languages are used. According to the source code analysis, the language distribution follows a clear pedagogical progression:
- Python dominates early phases covering fundamentals and computer vision
- TypeScript appears prominently in capstone projects involving agent systems and server architectures
- Rust and Julia appear selectively where performance or mathematical clarity is prioritized
The AGENTS.md file enforces a strict dependency allowlist that permits only these four languages for executable curriculum artifacts. While auxiliary files use .json, .yaml, and .md formats for configuration and quizzes, all executable content lives within Python, TypeScript, Rust, or Julia.
Summary
- The AI Engineering From Scratch curriculum employs Python, TypeScript, Rust, and Julia as its four primary programming languages across 435 lessons.
- Python handles the majority of deep learning and computer vision fundamentals in files like
phases/04-computer-vision/01-image-fundamentals/code/main.py. - TypeScript powers modern agent-engineering and server components, particularly in
phases/19-capstone-projects/01-terminal-native-coding-agent/code/ts/src/server.ts. - Rust delivers performance-critical edge inference capabilities in paths such as
phases/04-computer-vision/15-real-time-edge/code/main.rs. - Julia supports numerical prototyping and loss function experiments in
phases/03-deep-learning-core/05-loss-functions/code/main.jl. - The
AGENTS.mddependency allowlist ensures the curriculum remains pedagogically focused and free from unnecessary abstractions.
Frequently Asked Questions
Does the AI Engineering From Scratch repository use only Python?
No. While Python serves as the primary language for deep learning fundamentals, the curriculum deliberately incorporates TypeScript for agent systems, Rust for performance-critical components, and Julia for numerical experiments. This multi-language approach ensures learners understand how different programming languages solve distinct AI engineering challenges, from high-level model training to low-level edge deployment.
Why does the curriculum include Rust alongside Python?
The repository uses Rust for memory-safe, high-performance implementations where Python would introduce latency or excessive resource consumption. Specifically, files like phases/04-computer-vision/15-real-time-edge/code/main.rs demonstrate real-time edge inference and vision pipelines that require systems-level efficiency, teaching students when to reach beyond Python's standard toolset.
Where can I find TypeScript implementations in the repository?
TypeScript code resides primarily in the capstone project phases, specifically within phases/19-capstone-projects/01-terminal-native-coding-agent/code/ts/src/server.ts and similar subdirectories. These implementations focus on modern agent-engineering patterns, server-side runtimes, and tool-use architectures requiring Node.js 20+ compatibility.
How does the repository enforce language standards across 435 lessons?
The AGENTS.md file maintains a strict dependency allowlist that permits only Python, TypeScript, Rust, and Julia for executable artifacts. Each lesson's docs/en.md front-matter explicitly documents which programming languages are used, ensuring pedagogical consistency while allowing language-specific solutions where technically appropriate for the AI engineering concepts being taught.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →