GitHub Repository
View Source Code

AI Agents From Scratch

Learn to build AI agents locally without frameworks

Understand what happens under the hood before using production frameworks. Build real understanding of function calling, memory, and ReAct patterns.

Local LLMs Function Calling ReAct Patterns No Black Boxes

What You'll Learn

Master the fundamentals of AI agents through hands-on examples

Core Concepts

  • • How LLMs work at a fundamental level
  • • What agents really are (LLM + tools + patterns)
  • • How different agent architectures function
  • • Why frameworks make certain design choices

Practical Skills

  • • Building agents with local LLMs
  • • Implementing function calling and tools
  • • Managing memory and state
  • • Creating ReAct and AoT agents

Philosophy: Learn by Building

This tutorial teaches you to build AI agents from first principles using local LLMs and node-llama-cpp. By working through these examples, you'll understand deeply, then use frameworks wisely.

Learning Path

Follow these tutorials in order. Each example builds on the previous one, taking you from basic LLM interaction to advanced agent patterns.

Key Concepts You'll Master

Essential building blocks for understanding and building AI agents

LLM Fundamentals

Stateless processing, tokens, context windows, system prompts

Function Calling

Tools, tool definitions, agent decision-making, action-taking

Agent Patterns

ReAct, AoT, memory management, reasoning loops

Prerequisites

Before you begin, make sure you have the following knowledge and resources ready

Knowledge Required

  • ✓ Basic JavaScript/Node.js
  • ✓ Understanding of async/await
  • ✓ Command line basics
  • ✓ File system operations

System Requirements

  • ✓ Node.js 18+ installed
  • ✓ 8GB+ RAM (16GB recommended)
  • ✓ A downloaded model file (.gguf)
  • ✓ About 2-4GB disk space per model

Don't worry if you're new to some concepts - we'll explain everything step by step!

Ready to Start Learning?

Begin with Lesson 1 to understand basic LLM interaction, then progress through each tutorial to build your understanding step by step.

Start with Lesson 1