Agentic AI
Agentic AI - from Agents, Design Patterns, RAG, Guardrails, Context, Memory, Hallucinations to Evals, Security, Observability, Analytics, MCP, System Design, and Economics of building an AI Agent.
Chapters
- 01
What Is an AI Agent?Agent = Model + Harness, and Agency ≠ Authority
16 min read - 02
Levels of AutomationAutonomy is a dial, not a switch: set a level per decision, and justify it
14 min read - 03
Workflow Design Patterns6 workflow patterns: sequential pipeline, parallel fan-out/fan-in, conditional branching, iterative loop, map-reduce and human-in-the-loop
10 min read - 04
Agentic Design Patterns6 Agentic patterns, Tool Call, ReAct, Reflect, Planning & Decomposition, Orchestrator-Subagent, Evaluator-Optimizer
10 min read - 05
Retrieval-Augmented GenerationSemantic Chunking, Sparse(BM25) & Dense retrieval, Reciprocal Rank Fusion, Cross Encoder (Reranking), and Hallucination Checks
14 min read - 06
Type Safety, Loop Control & StatePydantic, Outlines, LMQL, Loop Control, and State Management
12 min read - 07
Context Management6 Strategies: Offload, Reduce, Retrieve, Isolate, Cache, and Consolidate, 5 Failures: Poisoning, Clash, Confusion, Confusion, and Rot
14 min read - 08
Memory ManagementWorking memory, Long-term memory: Episodic, Semantic, and Procedural, and Dreams
13 min read - 09
Hallucination ChecksCheck each claim against what the agent saw, not how sure it sounded: NLI, token confidence, and repair-trim-withhold
11 min read - 10
LLM as a JudgeA judge is an instrument: biases, Cohen's kappa, psychometrics, and why A-vs-B beats a score
10 min read - 11
Agent Security PrinciplesOWASP Top 10, PII redaction, Prompt injection, Content noderation, RBAC, and the Gatekeeper
11 min read - 12
EvalsEvaluating an AI Agent: Deterministic Checks, DeepEval, Promptfoo and an Eval harness
11 min read - 13
Observability & AnalyticsAnalytics Dashboard(Rill), Langsmith trace, and Logging
10 min read - 14
Model Context ProtocolMCP Server, Client and Ops Agent
11 min read - 15
System Design PatternsTimeouts, Retries, Circuit Breakers, Bulkheads, Idempotency, Saga, Rate Limit, Dead Letter Queue, and Hedging
12 min read - 16
Build vs BuyYou can rent intelligence, you can't rent accountability: build, adopt, buy or partner, per component, with the arithmetic
11 min read
This course includes
16 articles
3h 10m reading time
16 videos • 11 hr 32 mins
What Is an AI Agent?
15 Topics, Read: 16 mins, 1 Video: 52 mins
Overview
Customer Support Agent
What Is an Agent?
Agent = Model + Harness
Agency Is Not Authority
The Agency Principle
Why Delegation Is Risky: Fiduciary Duty and Information Asymmetry
Four Standings of an Act
Where Authority Lives: The Gatekeeper
Delegation Has a Price: Agency Costs
The Agent as a Graph
Summary
Further Reading
Agentic AI E01 What Is an AI Agent? Agent = Model + Harness | Agency is Not Authority
Watch
52 mins Levels of Automation
14 Topics, Read: 14 mins, 1 Video: 48 mins
Overview
One Agent, Three Answers
Autonomy Is a Dial, Not a Switch
Sheridan's Ten Levels of Automation
Where the Human Sits
The Ironies of Automation
Function Allocation: Code, Model or Person?
Three Questions per Decision
Recording the Decision: The Autonomy Decision Record
Our Two Agents, and Where the Dial Lives
Summary
Further Reading
Agentic AI E02 | Levels of Automation: How Much Autonomy Should an Agent Get?
Watch
48 mins Workflow Design Patterns
17 Topics, Read: 10 mins, 1 Video: 33 mins
Overview
Who Decides the Next Step?
Sequential Pipeline
Conditional Branching
Parallel Fan-out / Fan-in
Map-Reduce
Iterative Loop with a Fixed Cap
Human-in-the-Loop
The Patterns in Real Agents
Summary
Further Reading
Agentic AI E03 Workflow Design Patterns for AI Systems
Watch
33 mins Agentic Design Patterns
18 Topics, Read: 10 mins, 1 Video: 44 mins
Overview
When the Model Holds the Pen
The Tool-Use Loop
ReAct: Reasoning and Acting
Reflection and Self-Critique
Evaluator–Optimizer
Planning and Decomposition
Orchestrator–Subagent
The Patterns in Real Agents
Every Loop Has a Fence
Summary
Further Reading
Agentic AI E04 Agentic Design Patterns: ReAct, Planning, Reflection, Orchestrator & Evaluator
Watch
44 mins Retrieval-Augmented Generation
17 Topics, Read: 14 mins, 1 Video: 47 mins
Overview
The Model Doesn't Know Your Business
Weights and Index
An Analogy: The Reference Library
The Anatomy of a RAG Pipeline
Chunking: Where Meaning Changes
Sparse and Dense Retrieval
Combining Results: Reciprocal Rank Fusion
Reranking: Bi-Encoders vs Cross-Encoders
Retrieved Is Not Prompted
Generate, Then Ground
RAG as Semantic Memory
What Stays Out of the Index
How RAG Fails, and the Guards
Summary
Further Reading
Agentic AI E05 Retrieval-Augmented Generation (RAG) for Agents
Watch
47 mins Type Safety, Loop Control & State
9 Topics, Read: 12 mins, 1 Video: 42 mins
Overview
Type Safety: Validate After, or Constrain During?
Pydantic: The Schema Is the Code
Loop Control: One Governor, One Verdict
Duplicate Detection and Convergence
State: A Guardrail That Forgets Isn't One
The Run Lifecycle: Stop, Resume, Abort
Summary
Further Reading
Agentic AI E06 Type Safety, Loop Control & State in AI Agents
Watch
42 mins Context Management
13 Topics, Read: 14 mins, 1 Video: 46 mins
Overview
Context
Why Manage It?
Position Matters: Lost in the Middle
Six Strategies, Six Prices
How the Strategies Compose
Five Ways a Window Fails
Protecting the Window
Our Implementation: One Window, Five Stages
The Context Score
Strategies and Detectors in Code
Summary
Further Reading
Agentic AI E07 Context Management: What Your Agent Sees & Why It Matters
Watch
46 mins Memory Management
17 Topics, Read: 13 mins, 1 Video: 44 mins
Overview
An Agent That Learns While It Sleeps
Two Kinds of Remembering
Four Memories
Working Memory
Episodic and Semantic Memory
Procedural Memory: Skills and AGENT.md
Reading Memory: Which Memory Comes Back?
Writing Memory: Every Write Is Governed
Dreams: Consolidating After the Work
A Dream, Step by Step
What a Turn Leaves Behind, and Why This Design
Summary
Further Reading
Agentic AI E08 Memory Management for AI Agents | Working Memory | Long Term Memory | Dreams
Watch
44 mins Hallucination Checks
14 Topics, Read: 11 mins, 1 Video: 34 mins
Overview
Shape vs Truth
Hallucination
Why It Costs
Where the Check Sits: After the Model, Before the User
NLI: Premise, Hypothesis, Verdict
Atomic Claims, Three Classes
Where NLI Falls Short
Records Are Read, Not Inferred
Token Confidence: The Model's Own Doubt
Hallucination Check Methods
Two Levels, One Card; Repair, Trim, Withhold
Summary
Further Reading
Agentic AI E09 Hallucination Checks: Catching Confident Wrong Answers
Watch
34 mins LLM as a Judge
12 Topics, Read: 10 mins, 1 Video: 36 mins
Overview
LLM as a Judge
Four Known Biases
Why Raw Agreement Lies
Cohen's Kappa
Psychometrics: Treat the Judge Like a Test Instrument
Why A vs B Beats a Score
Our Judges: One Skeleton for the Platform
Kappa in Every Eval Run, and the Independent Auditor
Summary
Further Reading
Agentic AI E10 LLM as a Judge: Using Models to Evaluate Models
Watch
36 mins Agent Security Principles
14 Topics, Read: 11 mins, 1 Video: 50 mins
Overview
The Forged Approval, Again
Why Agents Are Different
Six Principles
OWASP Top 10 for LLM Applications (2025)
Personal Data: Four Places PII Leaks
Prompt Injection: Direct and Indirect
Authority Comes From the Source
Content Moderation
RBAC: Roles Are What You Are, Permissions Are What You May Do
Beyond RBAC: The Gatekeeper
Where We're Thinner
Summary
Further Reading
Agentic AI E11 Agent Security Principles | Prompt Injection | Content Moderation | PII | OWASP
Watch
50 mins Evals
16 Topics, Read: 11 mins, 1 Video: 51 mins
Overview
Every Control Makes a Claim
Tests Are Not Evals
Eight Principles
Grade the Outcome, Not the Path
Balance the Set; Keep a Control
pass@k vs pass^k
Three Graders, Three Questions
DeepEval: Judged Quality, the pytest Way
Promptfoo: Red-Team the Agent with the Same Rules
Our Eval Harness: Run Once, Grade Twice
Summary
Further Reading
Agentic AI E12 Evals for AI Agents: DeepEval, Promptfoo & Deterministic Checks
Watch
51 mins Observability & Analytics
12 Topics, Read: 10 mins, 1 Video: 32 mins
Overview
One Id, Three Views
Observability
What a Trace Is
Our Trace Id, in Four Places
OpenTelemetry and the GenAI Conventions
Analytics Is a Platform Contract
Dashboards as Code: From a Turn to a Tile
LangSmith: One Run per Turn
Summary
Further Reading
Agentic AI E13 Observability & Analytics: Tracing | Rill Dashboard | Langsmith
Watch
32 mins Model Context Protocol
15 Topics, Read: 11 mins, 1 Video: 29 mins
Overview
One Server, Any Client
Model Context Protocol (MCP)
Host, Client, Server
Discover, List, Call
The Protocol Connects; It Doesn't Trust
The Ops Agent: Questions Answered From Data
Two Walls Around run_query
Our Server and a Governed Client
stdio vs Streamable HTTP
Moving Our Server to HTTP
Summary
Further Reading
Agentic AI E14 Model Context Protocol (MCP) Explained: Server, Client and Tools
Watch
29 mins System Design Patterns
18 Topics, Read: 12 mins, 1 Video: 1 hr 1 mins
Overview
It Does Not Pay Twice
Why Agents Need Resilience More
Failures Crack and Spread
Timeout, and Little's Law
Retry with Backoff and Jitter
Circuit Breaker
Bulkhead
Idempotency
Saga
Putting It Together: The Order Is the Design
Summary
Further Reading
Agentic AI E15 System Design Patterns for Resilient AI Agents | Circuit Breaker | Saga | Idempotency
Watch
1 hr 1 mins Build vs Buy
16 Topics, Read: 11 mins, 1 Video: 35 mins
Overview
Point of View
Four Options, Per Component
What the Data Says (and Doesn't)
ROI, Payback, NPV
Total Cost of Ownership
Break-Even Volume
Eight Factors Beyond Price
What to Build: The Control Plane and the Data
What to Buy or Adopt
The Recommendation
Summary
Further Reading
Agentic AI E16 Build vs Buy for AI Agents: ROI, TCO, Break Even & What to Build
Watch
35 mins