pguso/ai-agents-from-scratch

Demystify AI agents by building them yourself. Local LLMs, no black boxes, real understanding of function calling, memory, and ReAct patterns.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 50 minutes ago
Added to GitGenius on September 14th, 2026
Created on October 23rd, 2025
Open Issues & Pull Requests: 11 (+0)
GitHub issues: Enabled
Number of forks: 696
Total Stargazers: 4,761 (+1)
Total Subscribers: 28 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 45.6 hours
Mean response time: 7.1 days
90th percentile: 10.8 days
Tracked items: 15

Most active contributors

Sign in to see contributor activity.

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 9% of issues opened in the past year have been closed. Three people close 100% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 11
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 274 days
Stale 30+ days: 9
Stale 90+ days: 9

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • enhancement (10)
  • bug (5)
  • documentation (1)

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

AI Agents From Scratch is an educational tutorial that teaches you to build AI agents locally from first principles using local LLMs and node-llama-cpp.

The project addresses the challenge of understanding how AI agents actually work by having you build them yourself rather than treating frameworks as black boxes. It demonstrates that agents are fundamentally LLMs combined with tools and patterns, and walks through progressively complex examples starting from basic LLM interaction, moving through system prompts and specialization, and advancing to reasoning and problem-solving patterns. By implementing each layer yourself, you gain concrete understanding of function calling, memory management, and ReAct patterns before relying on production frameworks.

This tool suits developers who want to understand agent architecture deeply before adopting a framework, or who prefer to build agents with local models for privacy and control. The learning path is structured to build progressively, starting with loading and running a local LLM, then covering system prompts for agent specialization, and reasoning patterns. The project includes both code examples and conceptual explanations, with a companion website that provides mental models and visualizations of the learning progression. The repository is designed for Node.js environments with at least 8GB of RAM, and requires downloading models locally.

The project maintains parallel implementations across languages to serve different developer communities. Development activity shows consistent engagement with the codebase through refinement of examples and explanations. The project provides structured learning materials including code explanations and concept documents alongside working examples, indicating a focus on pedagogical clarity alongside functional code.