Introduction
Day 1 of the “Building AI Agents for Production” crash course is the day that
decides whether the rest of the series sticks or not. There’s no code review, no shiny
deployment yet — just the conceptual ground that every agentic system stands on. By the
end of the session, the project skeleton is live on GitHub, a virtual environment is
wired up with uv, and a first
OpenAI call is going through a notebook.
This article rebuilds Day 1 as a clean reading experience — the concentric AI → ML
→ DL → GenAI → Agentic AI map, the precise difference between an agent and
agentic AI, the building blocks every agent shares, the framework landscape in 2026, and the
exact uv + LangChain setup that
the rest of the course runs on.
📌 Part of a 4-day crash course. Day 1 (this article) frames the mental model and the dev environment. Day 2 builds out tool calling. Day 3 turns the notebook into a production-shaped Python project. Day 4 ships the agent with FastAPI, subgraphs, and cloud deployment.
📚 Table of contents
- Where agentic AI fits in the AI map
- Generative AI, fine-tuning, and the rise of SLMs
- AI assistant vs RAG vs agentic AI
- What an AI agent actually is
- Deep agents and multi-agent systems
- The core building blocks every agent shares
- The 2026 framework landscape
- The dev environment: uv, venv, ipykernel, GitHub
- Your first LLM call from a notebook
- Best practices for Day-1 setup
- Common mistakes to avoid
- Conclusion
- Frequently asked questions
🗺️ Where agentic AI fits in the AI map
The cleanest mental model is a set of concentric circles. The outer ring is AI. Inside it sits machine learning. Inside ML sits deep learning. Inside DL sits generative AI — the LLM-era we’ve been living in since GPT broke through. And the newest ring, the innermost one, is agentic AI.
🧠 Generative AI
The era of LLMs — models that generate text, images, and code. Three training stages: pre-training on internet-scale data, supervised fine-tuning, and preference alignment. The result is a general-purpose model that talks like a human.
🤖 Agentic AI
A design philosophy where an AI system shows autonomy, decision-making, and adaptive behaviour — built on top of an LLM. Not a new model architecture, a new way to wire LLMs into workflows that can act.
The key sentence to keep in your head: agentic AI uses the intelligence of an LLM to build an autonomous system. Everything else — tools, memory, planning, state — is just the engineering you wrap around that idea.
🧬 Generative AI, fine-tuning, and the rise of SLMs
Every LLM is sized along two axes: parameter count (the weights and biases, often in the billions) and training tokens (the size of the corpus it learned from, often in the trillions). The backbone is the transformer — self-attention plus a feed-forward neural network — fed by token embeddings.
Fine-tuning is the process of taking a pre-trained model and adapting it to a specific task, domain, or behaviour using custom data. You can start from a full-fledged LLM (an OpenAI/Gemini model with SFT + preference alignment already done) or a raw pre-trained model from Hugging Face. Either path works.
📦 SLMs are the future of agentic AI
A Small Language Model is loosely any LLM under ~10B parameters. The case for SLMs in agentic systems is cost: an agentic workflow burns through tokens fast, and renting a frontier model for every node call gets expensive. An SLM you host yourself, tuned for one job, can be 10–100× cheaper at scale. NVIDIA + Georgia Tech published a paper titled exactly that — SLMs are the future of agentic AI — and it’s worth reading before you commit to a model strategy.
🪜 AI assistant vs RAG vs agentic AI
Three terms get used interchangeably and shouldn’t be. They’re a ladder, not synonyms.
💬 AI Assistant
A chat surface on top of an LLM. You ask, it answers from its training data. Simple FAQ bots and helpdesk assistants live here. No external knowledge, no decision-making.
📚 RAG
Retrieval-Augmented Generation. The assistant pulls fresh context from an external store — vector DB, docs, internal wiki — and grounds its answer on that. Still a one-shot question/answer flow, just smarter.
🤖 Agentic AI
The system decides what to do next. It plans, calls tools, reads state, loops, reflects, and acts. RAG can be a tool inside an agent. An assistant cannot.
🧩 What an AI agent actually is
An AI agent is the fundamental unit of agentic AI. The shortest working definition: an agent takes input, decides what to do next, and executes an action. It does this by combining a few primitives:
🔁 The Think → Act → Observe loop
- Think. The LLM reasons about the goal given the current state and the available tools.
- Act. It calls a tool, asks another agent, or produces a final answer.
- Observe. It reads the tool result and decides whether to loop back to thinking or finish.
The canonical implementation is the ReAct agent (Reasoning + Acting). Memory, prompts, planning, and tool access all hang off this loop. Strip those away and you’re back to a one-shot LLM call.
🧠 Deep agents and multi-agent systems
Two terms come up constantly and they’re worth pinning down on Day 1, so you don’t treat them as interchangeable later. For the full taxonomy, see types of AI agents explained.
🌊 Deep agent
A single agent extended with heavier cognitive scaffolding: long-horizon planning, chain-of-thought, tree-of-thought, persistent memory, reflection (self-critique + improvement), iterative looping, and human-in-the-loop checkpoints. A normal agent can be a deep agent — it’s a depth dial, not a separate species.
🤝 Multi-agent system
Two or more agents collaborating. One agent delegates to another, a supervisor agent orchestrates specialists, or a swarm of agents tackles parts of a problem in parallel. The unit of analysis shifts from one LLM loop to the coordination protocol between agents.
🧱 The core building blocks every agent shares
Different frameworks name these differently, but the underlying parts are the same. If a framework is missing one, you’ll end up writing it yourself.
🧠 Brain & reasoning
- LLM (or SLM) as the backbone
- Prompt engineering — templates, config-driven prompts, conditional prompts
- Chain-of-thought and tree-of-thought reasoning
🎮 Decision & control
- Task planning — break the goal into ordered steps
- Output evaluation and quality checks
- Reflection — self-critique and improvement
- Iteration and looping until a stop condition
🛠️ Action layer
- Tool calling — APIs, DBs, custom functions
- Inter-agent calls in a multi-agent system
- Producing the final output for the user
💾 State & memory
- State — what the agent knows right now, passed between nodes
- Short-term memory (the current conversation)
- Long-term, persistent memory (vector DB, files, logs)
🛡️ Safety & reliability
- Human-in-the-loop for approvals and feedback
- Guardrails — content filters, allow/deny lists, output validation
- Checkpointing — pause and resume a long workflow
🧮 Context engineering
- Most agents fail because the context blows up — too many tokens, too little signal
- Summarize aggressively between nodes
- Trim state to the minimum each node actually needs
- Parallelize independent steps to cut wall-clock latency
🧰 The 2026 framework landscape
Pick the wrong framework and you’ll fight it for the rest of the project. Here’s the working classification used in this course.
🔧 Foundational primitives
- LangChain. The de facto standard for plumbing — load an LLM, wire a vector DB, define a tool, manage state, cache results. Almost every production stack uses it for at least some of this.
- LlamaIndex. Its main rival, stronger on RAG-heavy use cases.
- Haystack. Another solid open-source option, popular in enterprise.
🕸️ Agent orchestration
- LangGraph. The course’s primary pick. In production teams running real agentic systems, this is the framework about 70–80% of the time. Explicit state machine, easy to debug, plays cleanly with LangChain.
- CrewAI. Role-based multi-agent orchestration. Good for crew-of-specialists patterns.
- AutoGen. Microsoft’s framework, good for POCs — less battle-tested in long-running production deployments.
- Google ADK. Google’s Agent Development Kit. Newer, more abstracted, worth a look but documentation is still thin.
🪄 No-code / low-code
- n8n. Open-source automation with first-class agentic nodes. Huge non-technical adoption.
- Langflow. Visual builder inside the LangChain ecosystem, useful for prototyping flows you’ll later harden in code.
The LangChain ecosystem also includes LangSmith (tracing + evals) and LangFuse (observability) which you’ll wire in once you’re past the prototype stage.
⚙️ The dev environment: uv, venv, ipykernel, GitHub
The setup is deliberately boring and reproducible. The course uses uv —
a Rust-based Python package manager that’s a drop-in replacement for
pip, only an order of magnitude
faster.
# 1. Create the project folder and open VS Code there
mkdir youtube-live-crash-course && cd youtube-live-crash-course
code .
# 2. Bootstrap the project with uv
uv init
# 3. Check available Python versions and create a venv on Python 3.12
uv python list
uv venv env --python python3.12
# 4. Activate the venv
source env/bin/activate # macOS / Linux
.\env\Scripts\activate # Windows PowerShell
# 5. Add env folder and secrets to .gitignore
echo "env/" >> .gitignore
echo ".env" >> .gitignore
# 6. Create the secrets file
touch .env
# Inside .env put: OPENAI_API_KEY=sk-...
# 7. Pin requirements
cat > requirements.txt <<'EOF'
python-dotenv
langchain
langchain-openai
langchain-community
langchain-google-genai
langchain-groq
langchain-ollama
langgraph
ipykernel
wikipedia
youtube-search
EOF
# 8. Install everything (this is where uv shines — usually under a second)
uv pip install -r requirements.txt
Initial commit the scaffold to GitHub so the rest of the course pulls from a single source of truth:
git init
git add .
git commit -m "Project folder initialized"
# Then create a repo with gh or via the GitHub UI and push.
🚀 Your first LLM call from a notebook
Create test.ipynb, select the
env kernel, and run a single
cell that proves the keys, the package install, and the network path are all healthy.
import os
from dotenv import load_dotenv
load_dotenv()
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY")
if not os.environ["OPENAI_API_KEY"]:
raise RuntimeError("OPENAI_API_KEY missing — check your .env file")
from langchain_openai import ChatOpenAI
chat_llm = ChatOpenAI(model="gpt-4o-mini")
response = chat_llm.invoke("Hello, how are you?")
print(response.content)
🔑 Don’t have an OpenAI key?
Swap in a free provider. Google AI Studio gives you a free Gemini key. Groq gives you a free GROQ key. OpenRouter aggregates several free models. The course uses OpenAI for consistency but the rest of the code is provider-agnostic via LangChain’s chat-model interface.
For production, secrets never live in .env
— they live in AWS Secrets Manager, Azure Key Vault, or GCP Secret Manager. Get
comfortable with at least one cloud’s secrets service before Day 4.
🏗️ Best practices for your Day-1 setup
✅ Do this
- Use
uv— the speed difference compounds across the course - Pin
requirements.txtfrom day one so teammates rebuild the same env - Keep secrets in
.envlocally and a cloud secrets store in prod - Add
env/and.envto.gitignorebefore the first commit - Test the LLM call in a notebook before writing any agent code
❌ Avoid this
- Hard-coding API keys in code or notebooks
- Mixing global and project-level packages by skipping the venv
- Starting with LangGraph code before you can call an LLM via LangChain
- Pushing the
env/folder to GitHub — it bloats the repo and leaks paths - Picking a framework because it’s trendy on Twitter — pick what your tech lead can debug at 2am
🚫 Common mistakes to avoid
- Treating “agent” and “agentic AI” as synonyms. Agentic AI is the umbrella term; AI agents, deep agents, and multi-agent systems are subtypes. Sloppy vocabulary leads to sloppy design decisions.
- Skipping the LLM fundamentals. You don’t need to train a model from scratch, but you do need to know what tokens cost, what context windows are, and why temperature matters. Otherwise your agent burns money and hallucinates and you can’t tell why.
- Ignoring SLMs. Defaulting to GPT-class models for every node is the most expensive mistake teams make. For routing, classification, and simple tool selection, a smaller model is usually fine and an order of magnitude cheaper.
- Building before reading. Spending one day on the mental model saves a week of confused refactors later. Day 1 isn’t a warm-up — it’s the foundation.
Conclusion
Day 1 ends with three things on the table: a clean mental model of where agentic AI sits in
the AI stack, a working dev environment built on uv
and LangChain, and a single LLM round-trip going through a notebook. That’s the right
stopping point. From here, Day 2 layers in tool calling — the moment your LLM stops
being a chatbot and starts being an agent. Before shipping, read through AI agent limitations and production best practices to understand where agents break and how to guard against it.
Related reading: Day 2: tool calling with LangChain — how AI actually works (tokens & context) — LangChain review
Explore More on DevShelf
-
LangChain — Tool Profile
Full review of LangChain — the framework you set up on Day 1, with its full feature surface, community, and 2026 ecosystem.
-
Learn Agentic AI in 7 Steps
The sequenced path that picks up from Day 1 — orchestration, RAG, design patterns, guardrails, and production ops.