Description
AI Agents from Scratch is a free tutorial repository that teaches how AI agents work by building a single agent step by step on top of a local LLM, without frameworks or cloud APIs. Across 12 lessons the agent grows from plain text in and out to system prompts, structured JSON output, routing decisions, tool use, an observe-decide-act loop, short- and long-term memory, planning as data, atomic actions, Atom of Thought dependency graphs, evals for regression testing and runtime telemetry. The stated idea is that agents are loops, state and constraints, so all logic is kept visible in the files. It is aimed at developers who can already code and want to understand agent internals. The author also links companion projects on AI product basics and a JavaScript version.…
Highlights
- 12 lessons that grow one agent step by step
- Runs on a local LLM with no frameworks or cloud APIs
- Covers tools, agent loop, memory and planning
- Lessons on evals and runtime telemetry
- Companion JavaScript and AI product courses
Ratings & Reviews
No ratings yet
Be the first to rate Agents From Scratch.
People also visit
Agent Systems Handbook
A practical AI agents handbook covering agent systems, agentic workflows
Agents From Scratch FAQ
What will I learn from this repo?
How an AI agent is built from a single LLM call upward: system prompts, structured output, routing, tools, the agent loop, memory, planning, atomic actions, Atom of Thought, evals and telemetry.
Do I need an API key or cloud service?
No. The lessons use a local LLM and avoid cloud APIs and agent frameworks.
Who is it for?
Developers who can already write code and want to understand what happens inside an agent rather than relying on a framework.
Is there a version in another language?
The README links a related AI Agents from Scratch project in JavaScript and an AI Product from Scratch course.
What are the best Agents From Scratch alternatives?
Popular alternatives to Agents From Scratch include AI Agent Camp, AgentSwarms and Agent Systems Handbook. See all Agents From Scratch alternatives






