Phase 2 outline

Module 02 of 08 · Outline

LangChain Agents & Tool Use

Build ReAct agents, typed tools, SQL integrations, retry logic, and streamed agent steps.

Learning outcome: An agent demo with tool contracts and safety tests.

Lesson outline

Lesson 2.1

Agent control loops

  • ReAct reasoning and tool observations
  • Stopping conditions and step budgets
  • Streaming agent events

Lesson 2.2

Typed tools

  • Schemas and argument validation
  • Read-only SQL tools and scoped access
  • Tool errors, timeouts, and retries

Lesson 2.3

Safe execution

  • Allowlisted actions and least privilege
  • Approval before side effects
  • Tests with deterministic tool fixtures

Practice assignment

Create a read-only data assistant

  1. Expose a typed search tool over synthetic data.
  2. Set step limits and handle tool failures.
  3. Reject write requests and invalid tool arguments.

Deliverable: An agent demo with tool contracts and safety tests.

Independent practice · no submission or grading

Reference reading