A JavaScript-based tutorial repository that builds AI agents from scratch using local LLMs and node-llama-cpp. It provides step-by-step examples and code for understanding agent architectures and patterns, with a companion website for concepts.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
AI Agents From Scratch is a JavaScript-focused tutorial repository that teaches how to build AI agents locally without frameworks, using local LLMs and node-llama-cpp. It aims to help users understand what agents are (LLM + tools + patterns) and how different architectures function, with a progressive learning path and accompanying explanations.
How it works
The project presents a sequence of example folders (01_intro, 02_openai-intro, 03_translation, 04_think, 05_batch, 06_coding, 07_simple-agent, 08_simple-agent-with-memory, 09_react-agent, 10_aot-agent, 11_error-handling, 12_tree-of-thought, 13_graph-of-thought, 14_chain-of-thought, 15_tool-routing-embeddings). Each contains a main JS file, CODE.md, and CONCEPT.md that together explain code, concepts, and reasoning patterns. It emphasizes local model loading, system prompts, tool usage, and various agent patterns (including memory, ReAct, AoT, ToT, GoT, and more).
Getting started
Installation: "bash\npm install\n". Run examples: "bash\nnode intro/intro.js\nnode simple-agent/simple-agent.js\nnode react-agent/react-agent.js\n". Prerequisites include Node.js 18+ and placing models in the ./models/ folder per DOWNLOAD.md guidance.
Recent releases
There are no releases listed in this repository metadata; the latest release section shows "- none".
Traction
This repository reports: stars: 4465, forks: 651, open_issues: 10. Language: JavaScript. License: MIT. Created: 2025-10-23. Last_push: 2026-07-24.
Caveats
License is listed as MIT. The README emphasizes educational use and learning resources; no production-ready guidance is provided. There is a companion website, but README notes that it is not a replacement for the repo. Models are loaded locally, with details in DOWNLOAD.md, implying local inference requirements and hardware considerations (e.g., Node.js and RAM).






