Making an LLM chat client agentic

Say you have a minimal LLM chat client that does the following: Wait for the user to input a prompt Add a message to chat history containing the user input Send any system prompt (or none) + full chat history to the model (via API) Add the completion from the model to chat history Repeat Here's mine in a gist. To transform that into an agent: Write a schema for each tool, to tell the model what…