TypeScriptCoreApplied AI EngineerForward Deployed EngineerApplied AI Architect
Tool-using agent (TypeScript)
The tool-using agent in TypeScript with @anthropic-ai/sdk: zod-validated config and tools, a bounded streaming loop with is_error results, an SSE route and a CLI.
Locked
The code is part of the full course
The file map and notes are open to everyone. Get lifetime access to every template's source, the .zip download and all four tracks for a one-time $249.
Run it
shell
npm install
cp .env.example .env # add ANTHROPIC_API_KEY
npm run dev -- "Where is my order QF-1002?"
npm run build && npm run serve # optional SSE route on http://127.0.0.1:3000/chatTest it
shell
npm test && npm run typecheckOffline: no API key or network needed.
Taught in
- E11 TypeScript With Claude: Setup, Types and Your First Call
- E11 Streaming Claude to a Next.js Route Handler
- E11 Tool Loops, Structured Outputs and Prompt Caching in TypeScript
- E11 Write It: Port a Python Tool Loop to TypeScript
- E2 The Tool Loop in Depth
- Module 7 The Agent Loop
- C10 Exercise: A Bounded Agent Loop with Loop Detection