Build a Basic AI Agent in TypeScript, Part 1: The Core Loop

A comprehensive guide to the minimal agent architecture, conversation state, and deterministic control loop in TypeScript