---
title: "Patric's Open-Source Repo Teaches AI Agents From Scratch Without Frameworks"
subtitle: "A framework-free, local-first tutorial repo teaching AI agent fundamentals from scratch — 4,300 stars and growing"
url: "https://alphasignal.ai/news/patric-s-open-source-repo-teaches-ai-agents-from-scratch-without-frameworks"
author: "AlphaSignal Newsroom"
author_url: "https://alphasignal.ai/editorial-team"
company: "AlphaSignal"
company_url: "https://alphasignal.ai/company/alphasignal"
published: "2026-05-31T08:52:06.000Z"
updated: "2026-06-27T13:09:19.259Z"
type: "Repo"
topics:
  - "Agents"
  - "Development"
subtopics:
  - "Agent Frameworks"
  - "Tool Use"
  - "Code Agents"
  - "Code Agents"
upvotes: 46
source_url: "https://github.com/pguso/ai-agents-from-scratch"
comments: 0
truncated: true
---

# Patric's Open-Source Repo Teaches AI Agents From Scratch Without Frameworks

> A framework-free, local-first tutorial repo teaching AI agent fundamentals from scratch — 4,300 stars and growing

Most agent tutorials start with LangChain. They hand you a high-level abstraction, show you a working demo, and call it a day. The problem: when something breaks, you have no idea why. [AI Agents From Scratch](https://github.com/pguso/ai-agents-from-scratch) takes the opposite approach , no frameworks, no API keys, no cloud costs, just local LLMs and raw JavaScript that exposes every moving part.

The repo has crossed 4,300 stars and 628 forks, with a companion website at [agentsfromscratch.com](https://agentsfromscratch.com) that adds visual explanations and a structured learning path on top of the code.

## The problem it actually solves

The author, Patric, describes the frustration clearly: he spent three hours debugging an agent that wouldn't call a tool correctly, never figured it out, and switched frameworks hoping for the best. Without the framework abstractions, he had to figure out everything , how the model actually receives function definitions, what format function calling really uses, how memory works at a fundamental level. That process of rebuilding from zero is exactly what the repo teaches.

The code isn't optimized for performance. It's optimized for understanding. Every example is the minimum viable implementation of one concept, heavily commented, with a paired `CODE.md` and `CONCEPT.md` explaining the why behind each decision.

## 14 lessons, one concept at a time

The material progresses from basic language model interaction to sophisticated multi-step reasoning agents. The learning path is deliberately linear , each example builds on the last, and skipping ahead will leave gaps.

![Architecture diagram showing agent system components: user input flows through a central Agent with Memory, LLM reasoning, and Tools modules](https://github.com/pguso/ai-agents-from-scratch/raw/main/diagrams/agent-architecture.png)

Here's the full sequence:

1. **Intro** , Load a local model, run a basic prompt, understand the inference pipeline
2. **OpenAI Intro** (optional) , Compare local vs. hosted models, understand cost/control tradeoffs

_Preview only. Full text requires an AlphaSignal Pro account._

## Sources

- [pguso/ai-agents-from-scratch — GitHub](https://github.com/pguso/ai-agents-from-scratch)
- [Every AI Agent Tutorial Skips the Fundamentals. So I Built Them. — Medium](https://pguso.medium.com/every-ai-agent-tutorial-skips-the-fundamentals-so-i-built-them-effe9befeb42)
- [AI Agents From Scratch — Companion Website](https://agentsfromscratch.com)
- [withcatai/node-llama-cpp — GitHub](https://github.com/withcatai/node-llama-cpp)
- [pguso/ai-agents-from-scratch — DeepWiki](https://deepwiki.com/pguso/ai-agents-from-scratch)
