Session 10 Slides: Introduction to AI Agents

--:-- --
↓ Scroll for more

Session 10

Introduction to AI Agents

AI Product Engineering

Block 3: Agents, Evaluation & Deployment

Today’s Agenda

  • Chatbot vs. Agent
  • The Agent Loop
  • Types of Agent Actions
  • ⚠️ Safeguards Are Non-Negotiable
  • Interactive: Chatbot or Agent? (3–4 min)
  • Interactive: Safeguards Check (3 min)
  • Lab: Multi-Step Agent Task (Core)

Chatbot vs. Agent

Chatbot (Reactive)

Responds to one message → waits

You direct every step

Agent (Autonomous)

Pursues a goal across multiple steps

Decides what to do next based on results

The difference is autonomy: the agent sequences its own actions.

Interactive: Chatbot or Agent? (3–4 min)

The Agent Loop

PERCEIVE — current state, goal, previous results
PLAN — what action to take next
ACT — execute (call function, write code, search)
OBSERVE — what happened? New state?
REPEAT until goal achieved

Types of Agent Actions

  • Code execution — write and run code, observe output
  • Tool calling — call external APIs, search, query databases
  • File operations — read, write, manage files
  • Sub-agent delegation — create and direct other AI agents

⚠️ Safeguards Are Non-Negotiable

  • Human-in-the-loop — require approval for irreversible actions
  • Artifact verification — always check code runs and output is correct
  • Scope limits — constrain what the agent can access
  • Logging — every action logged with enough detail to diagnose failures

Interactive: Safeguards Check (1/3)

True or false — cold-call, then tap.

Interactive: Safeguards Check (2/3)

True or false — cold-call, then tap.

Interactive: Safeguards Check (3/3)

True or false — cold-call, then tap.

Lab: Multi-Step Agent Task (1/2)

  1. 10.1: Pick a 3–6 step web goal — write the plan on paper first
  2. 10.2: npm run agent-task -- "your goal" (or paste runAgentTask)

Lab: Multi-Step Agent Task (2/2)

  1. Loop always runs 4 executes — teaching simplification, not ReAct
  2. 10.3: Verify artifacts — fact-check one claim → Agent-Notes.md

Not tool calling yet — that is Session 11.

Session 10 Summary

  • Agents = autonomous multi-step goal pursuit
  • Loop: perceive → plan → act → observe → repeat
  • Safeguards: human checkpoints, scope limits, logging
  • Always verify agent artifacts

Next Session: Tool Calling & Actions