hub.gazar.dev · course · 4 weeks

Production-Ready Systems with LLMs and Agents

The four-week cut of the intensive. Eight live sessions and three production-grade artifacts between Oct 5 and Nov 1, 2026. Every Tuesday teaches the decision and its trade-offs, every Thursday is a workshop on your own system. Six cheat sheets and six runnable labs ship with it. Companion code (TypeScript + OpenAI): github.com/ehsangazar/maven-llms-and-agents-4-weeks

Every lab ships as runnable code

TypeScript and OpenAI, behind one provider seam you can swap. The four-week repo carries all six labs, grouped into the four weeks below, so nothing is dropped for the shorter format.

github.com/ehsangazar/maven-llms-and-agents-4-weeks ↗

A field guide to the tools

Each week ends with the common tools for that stage of the stack. Every tool has a decision-first page: what it is, the one job it does, when to reach for it, when to skip it, and where it fits your labs. The tools are a means; the architecture is the lesson.

Week 1 · Foundations: workflows, agents & the code/model boundary

Oct 5 – 11

Week 2 · Context engineering & retrieval

Oct 12 – 18

Tue Oct 13

S3 · Why your agent gets worse the longer it runs

Context engineering as the real lever, not prompt wording. The window as a budget and lost-in-the-middle. RAG done properly: hybrid search, re-ranking, chunking, and agentic retrieval that decides for itself when and what to fetch. Memory, and exactly how multi-turn context degrades over a long session. 7:30 – 8:45 PM (GMT+1).

/llms-and-agents-4-weeks/s3-context-engineering
Thu Oct 15

S4 · Workshop: build a context pipeline that survives a long session

For your system: what to fetch, how to rank it, how to compact a growing history, and what to deliberately keep out of the window. You leave with the pipeline drawn end to end. 7:30 – 8:45 PM (GMT+1).

/llms-and-agents-4-weeks/s4-context-pipeline
artifact Project 1 · submit by Wed Oct 14

P1 · Context & Retrieval Design

A design for what your model sees on every request: sources, ranking, chunking, and the exclusions you can defend. The first of the three artifacts.

/llms-and-agents-4-weeks/p1-context-retrieval-design
cheat sheet Reference · cheat sheet

RAG & Context Engineering Cheat Sheet

The window as a budget, lost-in-the-middle, the pipeline, hybrid search, chunking, re-ranking, agentic retrieval, memory, and a params quick-reference.

/cheatsheets/rag-context
hands-on lab Lab 2 · build it

Build a Hybrid-Search RAG Pipeline

Chunk, retrieve with dense + BM25, fuse, re-rank to a few, assemble to a token budget, and refuse to answer when nothing is relevant. Starter code included.

/llms-and-agents-4-weeks/lab-hybrid-rag
Field guide · tools for this week

Week 3 · Agent architecture, cost & security

Oct 19 – 25 · the double week: architecture and cost decided together

Tue Oct 20

S5 · How each agent pattern breaks, and what each one costs

Tool use, planning loops, memory, and single versus multi-agent, with tools and outputs treated as contracts. Each pattern mapped to exactly how it breaks, and priced: per-request cost and latency ceilings, and the levers that hold them (caching, batching, streaming, model routing, right-sizing). You choose the pattern with both the failure mode and the bill in view. 7:30 – 8:45 PM (GMT+1).

/llms-and-agents-4-weeks/s5-agent-patterns-cost
Thu Oct 22

S6 · Workshop: threat-model your agent and cap its spend

Prompt injection (OWASP LLM01), tool poisoning, and indirect injection through retrieved content. Tool approvals, allow-lists, least-privilege tooling, and output guardrails. Then put numbers on it: a cost and latency budget, the retry and fallback ladder, and a first pass at how each part fails. 7:30 – 8:45 PM (GMT+1).

/llms-and-agents-4-weeks/s6-threat-model-budget
artifact Project 2 · submit by Wed Oct 21

P2 · Cost & Latency Budget

Ceilings you can defend, the levers you would pull first, and the failure-mode runbook you start here and finish in Week 4.

/llms-and-agents-4-weeks/p2-cost-latency-budget
cheat sheet Reference · cheat sheet

Cost, Latency & Reliability Cheat Sheet

The cost formula and pricing math, the five levers, caching, routing, the fallback ladder, the retry-idempotency trap, and a request-budget template.

/cheatsheets/cost-latency
cheat sheet Reference · cheat sheet

Agent Patterns & Prompt-Injection Cheat Sheet

Agent anatomy, tools as contracts, the ReAct loop, single vs multi-agent, prompt injection (OWASP LLM01), defense-in-depth, the trust boundary, and real cases.

/cheatsheets/agent-security
hands-on lab Lab 3 · build it

Add a Budget, Cache & Fallback Ladder

Wrap a model call with a cost/latency budget, a semantic cache, a retry-and-fallback ladder, and an idempotency key so a retry can't double-charge. Starter code included.

/llms-and-agents-4-weeks/lab-budget-cache-fallback
hands-on lab Lab 4 · build it

Build a Tool-Using Agent with Guardrails

A ReAct agent with least-privilege tools, a step cap, an approval gate before writes, and an injected document it must refuse. Starter code plus a threat model.

/llms-and-agents-4-weeks/lab-guardrailed-agent

Week 4 · Prove it, then defend it

Oct 26 – Nov 1 · evals, observability and the capstone

Tue Oct 27

S7 · Prove it works before someone senior asks you to

Why grading the final answer isn't enough for agents: tool-calling, task-completion and trajectory evals. Offline eval sets plus online evals on sampled traffic, and the loop where failed production traces become new eval cases. Then the observability half: tracing, cost / latency / quality dashboards, prompt versioning, and finishing the failure-mode runbook. 7:30 – 8:45 PM (GMT).

/llms-and-agents-4-weeks/s7-prove-it
Thu Oct 29

S8 · Capstone: defend your design to the room

Present the end-to-end design that pulls every decision from the four weeks together, and defend it the way you would to a staff panel: the boundary, the context pipeline, the pattern, the budget, the threats, the evals. Live feedback in the room, then what to practise next. 7:30 – 8:45 PM (GMT).

/llms-and-agents-4-weeks/s8-capstone-defence-part2
artifact Project 3 · submit by Wed Oct 28

P3 · Agent Architecture Decision + Threat Model

The pattern you chose, why you chose it, the threats it exposes, and the mitigations you'll rely on. The last of the three artifacts, and the spine of your capstone.

/llms-and-agents-4-weeks/p3-agent-architecture-threat-model
cheat sheet Reference · cheat sheet

Evals & Observability Cheat Sheet

Output vs trajectory evals, the three graders, the four metrics, offline vs online, the flywheel, an eval-case and a trace in JSON, and the three dashboards.

/cheatsheets/evals-observability
cheat sheet Reference · cheat sheet

Production LLM System Design Checklist

The seven-section design document, the whole system on one page, the reviewer's hard questions, the common gaps, and a pre-ship checklist. Bring it to the Thursday defence.

/cheatsheets/production-checklist
hands-on lab Lab 5 · build it

Build an Eval Harness

A golden set, a runner, rule + LLM-judge graders, a trajectory check, and a pass-rate report that catches a regression you deliberately introduce. Starter code included.

/llms-and-agents-4-weeks/lab-eval-harness
hands-on lab Lab 6 · bring it together

Capstone: Integrate & Defend

Combine Labs 1-5 into one system behind a single entry point, write the seven-section design doc, run your eval harness on it, and prepare the five-minute walkthrough for Thursday.

/llms-and-agents-4-weeks/lab-capstone-integration

Small-group intensive. Each Tuesday teaches the concept and its trade-offs; each Thursday is a workshop where you apply it to your own system and build that week's slice of a production-grade artifact. Taught by Ehsan Gazar, Principal Engineer, 16 years in production systems, 500+ mentees.