AI Agents From Scratch
A hands-on tutorial repository that teaches how AI agents work by building them from first principles with local LLMs, covering prompt and response cycles, tool use, memory and ReAct-style reasoning.
AI Agents From Scratch is a learning repository that walks through building AI agents locally, without frameworks, using local LLMs run through node-llama-cpp. Its examples progress from a basic prompt and response cycle to system prompts and specialization, and on to agent architectures such as ReAct.
Each example is paired with an explanation of the underlying concepts, such as model loading, context, inference, temperature control and vendor dependence, so learners understand what a framework is doing before adopting one. A companion website explains why each example exists and visualizes the learning path, while the repository itself holds the runnable code.