Agent Engineering

Design, build, and deploy AI-powered software agents

This course covers the design, implementation, and deployment of AI-powered software agents. Starting from raw API calls, you'll progress through prompt engineering, context management, RAG, memory systems, skills, multi-agent architectures, guardrails, and MCP — building each component from scratch.

This course is completely free. Each lesson (lecture) contains video, slides, a lecture narrative (which altogether starts to approximate a textbook), and supplemental resources. There are labs to work on as well. It's an adaptation of a course I teach at Ramapo College.

If you are looking for more help, either for yourself or your team - please feel free to contact me at [email protected]

Module 1: Course Overview and The Agent Paradigm

Lecture 1.1: What is an Agent?
Definition: Software that perceives, reasons, and acts autonomously
Lecture 1.2: Human-Agent Engineering
"Human-agent engineering, not vibe coding"
Lecture 1.3: Course Philosophy and Roadmap
Core principle: Build it yourself first, then reach for frameworks

Module 2: Foundations - How LLMs Work

Lecture 2.1: How LLMs Actually Work
Neural networks and transformers (5-min flyover, refer to Course Resources for depth)
Lecture 2.2: How LLMs Are Trained
Three-stage pipeline: pre-training, instruction tuning, RLHF
Lecture 2.3: From Language Models to Agents
What LLMs can't do: no current info, no world interaction, unreliable math, no self-verification, no memory

Module 3: The LLM API and Generation

Lecture 3.1: Working with the API
Anatomy of an API call: messages, model, parameters, response
Lecture 3.2: The Model Landscape
Providers, brands, and models: the three-layer hierarchy (Anthropic → Claude → Sonnet)
Lecture 3.3: Controlling Generation
Temperature: controlling randomness (0.0 = deterministic, 1.0 = creative)
Lecture 3.4: In-Context Learning and the Limits of Prompting
In-context learning: the model "learns" from examples in the prompt without weight updates

Lab 1: Environment, API, and Context Experiments

Module 4: Context Management in Practice

Lecture 4.1: Measuring and Managing Context
Token counting in practice: tracking usage per API call
Lecture 4.2: Context Management Strategies
Strategy 1: Sliding window — keep last N messages, drop oldest
Lecture 4.3: Token-Efficient Tool Design
Every tool result enters the context — design tools with this in mind

Module 5: Agent Prompting

Lecture 5.1: Prompting Principles and Techniques
Clarity and specificity: say exactly what you want — vague prompts produce vague results
Lecture 5.2: System Prompt Architecture
What system prompts do: identity, tools, behavior, constraints (from Lecture 2.3) — going deeper
Lecture 5.3: Building the Coding Agent System Prompt
Defining the agent's identity and role

Lab 2: The Booking Agent

Module 6: Building the Coding Agent

Lecture 6.1: The Agent Loop
Deep dive into the two-loop architecture introduced in Lecture 5.3
Lecture 6.2: Implementing Tools and Safety
Replacing stubs with real filesystem tools: list_files, read_file, edit_file
Lecture 6.3: Tool Registry and Schema Generation
The if/elif dispatch problem: doesn't scale, duplicates information
Lecture 6.4: Multi-Step Behavior and Instrumentation
Demo: multi-step tasks the agent chains autonomously (read → edit → verify)

Module 7: Implementing Context Management

Lecture 7.1: Implementing Sliding Window
Taking the sliding window strategy from Module 4 and writing real code
Lecture 7.2: Implementing Selective Preservation
When sliding window is too lossy: keep messages that matter regardless of age
Lecture 7.3: Implementing Compaction
Detecting the threshold: when to trigger compaction (e.g., 80% of context budget)

Lab 3: Context Management Strategies

Module 8: Retrieval-Augmented Generation (RAG)

Lecture 8.1: RAG as Context Engineering
The problem: context windows are finite, knowledge isn't
Lecture 8.2: Embeddings, Similarity, and Vector Storage
The most common RAG implementation, treated as one specific approach
Lecture 8.3: Retrieval Beyond Vectors
RAG = Retrieval-Augmented Generation; vector search is one retrieval mechanism among many

Module 9: Memory Systems

Lecture 9.1: The Memory Problem and Conversation Memory
Agents have no memory between sessions (stateless)
Lecture 9.2: Episodic Memory
Episodic: what happened, when, in what context
Lecture 9.3: Memory Consolidation
The accumulation problem: memory quality degrades over time without curation (contradictions, stale references, duplicate entries, relative timestamps that lose meaning)

Module 10: Agent Skills

Lecture 10.1: Skills and Progressive Disclosure
Agents need domain expertise, but context is limited
Lecture 10.2: Building a Skills System
Skill discovery: scan skill directories at startup

Module 11: Multi-Agent Architectures

Lecture 11.1: Multi-Agent Architectures
When to use multiple agents: parallel work, specialization, context isolation

Module 12: Guardrails and Safety

Lecture 12.1: Why Guardrails Matter and Input Guardrails
Agents take real actions with real consequences
Lecture 12.2: Output and Action Guardrails, Safety Checklist
Output filtering and code safety: detecting dangerous operations (rm -rf, etc.)

Module 13: Model Context Protocol (MCP)

Lecture 13.1: MCP: The Tool Standard and How It Compares
What is MCP? A standardized tool integration protocol

Assignments