Session 3: Agents - from pipeline to system that decides

14 lessons · Back to full syllabus

What you keep

What an agent really is, how to build the loop by hand, and how to ship one on Google ADK (with LangGraph as an accepted alternative for explicit graph control).

You ship

Your assistant turned into an agent that plans and uses tools, plus a Streamlit UI that demos the loop.

Recommended reading (async)

Multi-agent foundations - watch & read (async)

Before or after the live Session 3 deck, these videos and docs give you production multi-agent patterns and the Claude Agent SDK as a programmable harness - complementary to ADK / LangGraph hands-on work in the lessons below.

Videos

The Multi-Agent Architecture That Actually Ships

Luke Alvoeiro (Factory) at AI Engineer - orchestrators, workers, validators, and validation contracts that hold up in production.

Multi Agent Systems Explained: How AI Agents & LLMs Work Together

IBM Technology - plain-English intro to multi-agent cooperation, structures, and how LLMs + tools fit together.

Live session resources

Week 3 session: Agents with ADK

Agent loop, MCP, multi-agent, and A2A. Live session deck for Engineering Week 3.

Open resource

Week 3 session: Agents with ADK — extended cut

Same live session deck, plus a bonus "New Kids on the Block" section on graph, loop, harness, and context engineering.

Open resource

Week 3 assignment build guide

Step-by-step Path A / Path B guide - Google ADK preferred, LangGraph accepted - with Streamlit UI required and copy-paste prompts.

Open resource

Claude Agent SDK overview

Build production agents with Claude Code as a library - same tools, agent loop, and context management in Python and TypeScript.

Open resource

ADK sample code (preferred)

Routing, MCP, and full-system demos with Google ADK. Clone, run Demo 1, then adapt to your capstone.

Open resource

LangGraph sample code (accepted alternative)

Same three demos as the ADK repo, re-implemented in LangGraph. Use if ADK is blocked or you prefer graphs.

Open resource

Google ADK docs

ADK agents, tools, MCP, multi-agent, and A2A (default assignment stack).

Open resource

LangGraph docs + Academy

Accepted alternative stack: overview, quickstart, persistence, and free Intro to LangGraph course.

Open resource

Tool call orchestration

Parallel vs sequential tool calls, defensive result parsing, and turning tool failures into self-healing retries. The part frameworks hide from you.

Open resource

Prompt chain vs pipeline vs graph vs agent

The cost-benefit of an agent loop in tokens and latency - and when a single prompt, a fixed chain, or a deterministic graph beats building an agent at all. Real examples of over-engineered agents.

Open resource

Long context engineering

Why agents rot: context rot across 18 frontier LLMs, the n² attention budget, the U-shaped recall curve - and the four pillars (Write, Select, Compress, Isolate) that keep decision-relevant context in the window.

Open resource

Lessons

Live

The agent loop, by hand with the raw SDK

Think, pick a tool, call it, observe, decide again - no framework mystification.

Read lesson
Live

Orchestration with LangGraph

Nodes, edges, shared state - durable execution and human-in-the-loop checkpoints.

Read lesson
Live

Tools and MCP

MCP is how modern agents get tools - connect to servers instead of hand-wiring every integration.

Read lesson
Live

Multi-agent and A2A

Several specialists when roles are genuinely separable - most problems do not need multiple agents.

Read lesson
Live

Prompt injection, where guardrails get dangerous

Malicious instructions in retrieved content can hijack tool-using agents.

Read lesson
Deep dive

Long context engineering: why agents rot, and the four pillars that keep them sharp

Context rot, the U-shaped recall curve, and the Write · Select · Compress · Isolate moves that keep an agent sharp from turn 10 to turn 500.

Read lesson
Deep dive

Build your own MCP server

Tools, resources, and prompts, then a real Python FastMCP server you can wire into Claude Code today.

Read lesson
Deep dive

Build your own A2A integration

Agent Card, skills, and tasks - a minimal A2A server and the client call that reaches it.

Read lesson
Deep dive

LangGraph in depth

Reducers, Command routing, subgraphs, checkpointers, time travel - what the live session does not have time for.

Read lesson
Deep dive

Agent security mitigations

Least privilege, human-in-the-loop, structural separation of instructions from content, sandboxing, and an audit trail.

Read lesson
Deep dive

Tool call orchestration: parallel calls, result parsing, and error recovery

Parallel vs sequential tool calls, defensive result parsing, and teaching the model to recover from failures instead of crashing.

Read lesson
Deep dive

Prompt chain, pipeline, graph, or agent? Knowing when a loop is worth it

The cost-benefit of an agent loop in tokens and latency - and when a single prompt, a chain, or a deterministic graph beats building an agent at all.

Read lesson
Async

Session 3 assignment support: Turn your capstone into an agent

Step-by-step: pick the job, build a Google ADK agent with one real tool and a Streamlit UI, prove Think → Act → Observe, then optional stretch (LangGraph accepted as alt).

Read lesson
Assignment

Turn your capstone into an agent

Google ADK agent with at least one real tool and a Streamlit UI - trace each step of the decision loop. LangGraph accepted as alternative. Stretch: HITL, MCP, A2A.

Read lesson