How AI agents actually work, explained from first principles.
Explaining Agents is a technical blog for developers, engineers and curious builders who want to understand what an AI agent really is underneath the hype. An AI agent is a large language model called in a loop, with ordinary software running its tools and feeding the results back. Each post here takes one piece of that system and builds it up from the basics, with diagrams, worked examples and short, runnable Python you can try yourself.
The series starts with the agent loop and moves on to the parts every real agent needs: tool use and function calling, the harness that decides when to stop, context windows and token costs, memory, multi-agent setups and evaluation. The goal is always the same: derive the idea, test it, and say plainly where it breaks.
New here? Start with What Is an Agent Loop? How an AI Agent Actually Runs, which builds a working loop in about 30 lines of code.
Written by Kauntey Acharya, an AI agent engineer and former astrophysics researcher who designs and builds AI agents and the automation systems around them.
A workflow lets code decide what happens next, and an agent lets the model decide. This post gives one test that separates a chatbot, a workflow, and an agent, then counts the paths to show why that decides how you test them, with one invoice task built both ways and code you can run.
AI agent vs LLM: the LLM is the policy inside the agent loop, picking each action by probability. See why 148 of 1,000 simulated runs skipped a check.
An agent loop is a language model called over and over, with ordinary software carrying out its actions and feeding back the results. This post builds the loop from first principles: the equation, the harness that must decide when to stop, why tokens read grow with the square of the steps, a traced run, and about 30 lines of Python you can run offline.