Hands-on tutorials for building AI agents from scratch. Learn LLM APIs, prompt engineering, tool calling, and the agent loop through practical examples.
See the codeBuilding AI agents is engineering, not magic. Stop reading about agents. Start building them.
This is the repo for engineers who want to understand what's behind popular agents like Claude Code, Claude Cowork, Codex, and GitHub Copilot — and how to build one yourself.
💡 Build one this weekend. You'll understand agents better than reading 100 blog posts.
If you find this useful, a ⭐️ star helps us know we're on the right track. Join the 💬 discussion or report an 🐛 issue — your input directly shapes what we build next.
uv run --directory <tutorial> python <script>.py. No conda dance. No Jupyter kernel hunt.Agent fluency is the new data-structures interview. We teach it from first principles - you build the loop, the tool calls, the memory, and the evals yourself before we ever introduce a framework. No magic. No black boxes. Just the primitives, in the order they were invented.
|
Geoffrey Huntley creator of Ralph Wiggum |
How many of you actually can pull out a whiteboard and build me an agent? Can you show me the inferencing loop?
If you don't know this, your career is in jeopardy. What is a tool call? If you don't know what that is, you need to learn what it is and all these basic fundamentals. I preference candidates if they know what a tool call is, how the inferencing loop works, pull out a whiteboard — the same way we used to say, show me a linked list, reverse me this data structure. This is now baseline knowledge because we're getting candidates in that can answer this stuff. ▶️ Fundamental skills and knowledge you must have in 2026 for SWE |
All the answers are in this repo. What a tool call is, how the inferencing loop works, what lives in the context — you won't just read the answers, you'll build them with your own hands, starting in 01 - Foundations. Next interview, you're the one at the whiteboard drawing the loop.
brew install uv # or: pipx install uv
git clone https://github.com/agenticloops-ai/agentic-ai-engineering.git
cd agentic-ai-engineering
cp .env.example .env # add your Anthropic and/or OpenAI keys
uv run --directory 01-foundations/01-simple-llm-call python 01_llm_call_anthropic.py
That's it. Every tutorial is self-contained and idempotent — you can jump in anywhere. Full setup details in SETUP.md. Or open in Codespaces and skip local setup entirely.
Your first steps — from a single API call to a fully autonomous agent loop. Build everything from scratch to understand what's really happening under the hood.
Architectural patterns that separate toy demos from real agents. Based on Anthropic's "Building Effective Agents" — learn when to chain, route, parallelize, or delegate.
Practical engineering problems you'll hit the moment agents leave the prototype stage. Context, cost, memory, multimodality, safety — solved one tutorial at a time.
Agents are non-deterministic — testing them requires different thinking. Measure quality, catch regressions, and build confidence before shipping.
Take the bare agent loop and harness it. Skills, hooks, sandboxing, MCP, subagents, and compaction — one control surface at a time — turn a naive loop into a real, extensible agent.
One agent, nine implementations. Build the same system with each framework and compare trade-offs with your own hands.
The gap between "works on my laptop" and "runs reliably at scale." Principles, deployment, monitoring, cost control, and security.
The tutorials are organized into modules (01-foundations, 02-effective-agents) that progress from basics to advanced concepts. Each module contains numbered tutorials that build on previous lessons. Inside each tutorial folder, you'll find:
You can explore individual scripts independently or follow the complete learning path from start to finish. Each module ends with a project that combines all concepts from the module into a single, production-style agent.
The tutorials teach you to build. Our Substack gives you the mental model first - a foundational primer on how agents actually work, followed by teardowns of real production agents you use every day. Read the post. Open the tutorial. Rebuild the pattern.
How Agents Work: The Patterns Behind the Magic - the core agentic loop from first principles. The four pattern levels (one-shot → single-tool → ReAct → planning), the role of the system prompt as behavioral design, and Ralph Mode as the outer loop. If you read one thing before opening the repo, read this. Pairs with → 01-foundations.
If you find this project useful, consider supporting us:
Module not found? Run uv sync in the lesson directory.
API errors or authentication failures? You need API keys from Anthropic, OpenAI, or both, depending on which examples you run. See SETUP.md for details.
This project is licensed under the MIT License - see the LICENSE file for details.
Python
99.8%
Hands-on tutorials for building AI agents from scratch. Learn LLM APIs, prompt engineering, tool calling, and the agent loop through practical examples.
See the codeBuilding AI agents is engineering, not magic. Stop reading about agents. Start building them.
This is the repo for engineers who want to understand what's behind popular agents like Claude Code, Claude Cowork, Codex, and GitHub Copilot — and how to build one yourself.
💡 Build one this weekend. You'll understand agents better than reading 100 blog posts.
If you find this useful, a ⭐️ star helps us know we're on the right track. Join the 💬 discussion or report an 🐛 issue — your input directly shapes what we build next.
uv run --directory <tutorial> python <script>.py. No conda dance. No Jupyter kernel hunt.Agent fluency is the new data-structures interview. We teach it from first principles - you build the loop, the tool calls, the memory, and the evals yourself before we ever introduce a framework. No magic. No black boxes. Just the primitives, in the order they were invented.
|
Geoffrey Huntley creator of Ralph Wiggum |
How many of you actually can pull out a whiteboard and build me an agent? Can you show me the inferencing loop?
If you don't know this, your career is in jeopardy. What is a tool call? If you don't know what that is, you need to learn what it is and all these basic fundamentals. I preference candidates if they know what a tool call is, how the inferencing loop works, pull out a whiteboard — the same way we used to say, show me a linked list, reverse me this data structure. This is now baseline knowledge because we're getting candidates in that can answer this stuff. ▶️ Fundamental skills and knowledge you must have in 2026 for SWE |
All the answers are in this repo. What a tool call is, how the inferencing loop works, what lives in the context — you won't just read the answers, you'll build them with your own hands, starting in 01 - Foundations. Next interview, you're the one at the whiteboard drawing the loop.
brew install uv # or: pipx install uv
git clone https://github.com/agenticloops-ai/agentic-ai-engineering.git
cd agentic-ai-engineering
cp .env.example .env # add your Anthropic and/or OpenAI keys
uv run --directory 01-foundations/01-simple-llm-call python 01_llm_call_anthropic.py
That's it. Every tutorial is self-contained and idempotent — you can jump in anywhere. Full setup details in SETUP.md. Or open in Codespaces and skip local setup entirely.
Your first steps — from a single API call to a fully autonomous agent loop. Build everything from scratch to understand what's really happening under the hood.
Architectural patterns that separate toy demos from real agents. Based on Anthropic's "Building Effective Agents" — learn when to chain, route, parallelize, or delegate.
Practical engineering problems you'll hit the moment agents leave the prototype stage. Context, cost, memory, multimodality, safety — solved one tutorial at a time.
Agents are non-deterministic — testing them requires different thinking. Measure quality, catch regressions, and build confidence before shipping.
Take the bare agent loop and harness it. Skills, hooks, sandboxing, MCP, subagents, and compaction — one control surface at a time — turn a naive loop into a real, extensible agent.
One agent, nine implementations. Build the same system with each framework and compare trade-offs with your own hands.
The gap between "works on my laptop" and "runs reliably at scale." Principles, deployment, monitoring, cost control, and security.
The tutorials are organized into modules (01-foundations, 02-effective-agents) that progress from basics to advanced concepts. Each module contains numbered tutorials that build on previous lessons. Inside each tutorial folder, you'll find:
You can explore individual scripts independently or follow the complete learning path from start to finish. Each module ends with a project that combines all concepts from the module into a single, production-style agent.
The tutorials teach you to build. Our Substack gives you the mental model first - a foundational primer on how agents actually work, followed by teardowns of real production agents you use every day. Read the post. Open the tutorial. Rebuild the pattern.
How Agents Work: The Patterns Behind the Magic - the core agentic loop from first principles. The four pattern levels (one-shot → single-tool → ReAct → planning), the role of the system prompt as behavioral design, and Ralph Mode as the outer loop. If you read one thing before opening the repo, read this. Pairs with → 01-foundations.
If you find this project useful, consider supporting us:
Module not found? Run uv sync in the lesson directory.
API errors or authentication failures? You need API keys from Anthropic, OpenAI, or both, depending on which examples you run. See SETUP.md for details.
This project is licensed under the MIT License - see the LICENSE file for details.
Python
99.8%