← all repositories
pguso/agents-from-scratch

One Agent, Twelve Lessons, Zero Frameworks

A local-first curriculum that builds one AI agent from first principles, with no frameworks, cloud APIs, or hidden reasoning.

909 stars Python LearningAgentsLLMOps · Eval
agents-from-scratch
Not currently ranked — collecting fresh signals.
star history

What it does

This repository is a 12-lesson curriculum that constructs a single agent from the ground up using plain Python and a local GGUF model. Each lesson adds one capability—structured output, tool use, memory, planning, regression testing, telemetry—to the same evolving agent.py file. The goal is mechanical understanding rather than a drop-in library.

The interesting bit

The project treats agent construction as systems engineering rather than mysticism: no cloud APIs, no hidden chain-of-thought, and no personality theater. It explicitly rejects abstraction-heavy shortcuts in favor of constraints, state management, and observable loops.

Key highlights

  • Runs fully offline against local GGUF models with no API keys or rate limits
  • One continuously evolving Agent class that accumulates capabilities across all 12 lessons
  • Covers the full lifecycle from basic prompting to regression testing (evals.py) and structured telemetry
  • Philosophy doc defines agents as “loops, state, and constraints,” not thinking entities
  • Isolated examples in complete_example.py let you inspect each lesson before combining them

Caveats

  • The README warns this is for learning fundamentals, not production best practices
  • The curriculum is strictly sequential; the authors tell you not to skip ahead
  • Requires bringing your own GGUF model; the repository expects it in the models/ folder

Verdict

Worth bookmarking if you understand Python but feel lost inside abstraction-heavy agent frameworks, or if you want to see how state and constraints replace clever prompting. Skip it if you need a SaaS starter kit or expect hidden reasoning.

Frequently asked

What is pguso/agents-from-scratch?
A local-first curriculum that builds one AI agent from first principles, with no frameworks, cloud APIs, or hidden reasoning.
Is agents-from-scratch open source?
Yes — pguso/agents-from-scratch is open source, released under the MIT license.
What language is agents-from-scratch written in?
pguso/agents-from-scratch is primarily written in Python.
How popular is agents-from-scratch?
pguso/agents-from-scratch has 909 stars on GitHub.
Where can I find agents-from-scratch?
pguso/agents-from-scratch is on GitHub at https://github.com/pguso/agents-from-scratch.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.