An agent is just a loop
An agent is a language model in a loop: it asks for a tool, your code runs it, the result goes back, and the loop repeats until it can answer. You build one in about 60 lines of plain Python with the OpenAI SDK and see the exact messages that every framework produces underneath.