What is an AI agent, mechanically? Part 1: the forward pass, the loop, and tools

What is an AI agent, mechanically? Part 1: the forward pass, the loop, and tools