LLM Tool Calling: Build a Raw Agent Loop From Scratch
LLM tool calling is what turns a chatbot into something that does real work: the model reads a request, decides it needs one of your functions, and hands that decision back as JSON for your code to run. Frameworks like LangGraph and CrewAI wrap this in nice classes, but underneath they all run one small loop. Here we build that loop by hand, about sixty lines of plain Python. “An agent is a model calling tools in a loop. Everything ... Read More
