The agent loop
An agent is a model in a loop: goal in, then repeated think → call tool → observe until done. What separates toy demos from production agents — planning depth, error recovery, memory, and knowing when a plain workflow beats an autonomous loop.