AI / A CONCEPT NOTE
Agents & Tool Use
LLMs that take actions — not just talk
Overview · mechanism
pitfall · examples
01 / THE SHORT VERSION
The idea in a few sentences.
An agent is an LLM looped into a cycle: it receives a task, calls tools (APIs, databases, shell commands) based on its reasoning, gets the results, and decides the next action. The model orchestrates the process, but the tools execute the actions. This turns an LLM from a chatbot into an autonomous operator.
02 / FOLLOW THE MECHANISM
How an agent cycle runs
Task input
the user asks: 'Find the slowest API endpoint and suggest a fix.'
LLM reasoning
the model outputs a thought and selects a tool:
call_tool: query_prometheus, args: { query: 'http_request_duration_seconds_p99' }.Runtime executor
calls the tool function with the provided arguments and returns the result to the LLM.
LLM observation
reads the tool output and decides: either call another tool or produce the final answer.
Final output
once the LLM determines the task is complete, it outputs the response to the user.
04 / COMMAND NOTES
Read the command, then the result.
Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.
SDK call with tool definitions
python -c "from openai import OpenAI; client = OpenAI(); response = client.chat.completions.create(model='gpt-4', tools=[...])"The ellipsis omits required code or values. This sketch is not runnable as written.
05 / CHECK YOURSELF
Could you explain Agents & Tool Use to a teammate?
Try it out loud in two sentences: what it is, and the one detail that changes the picture. If you stall, the gap is the part to reread.
Up next in AI engineeringModel Evaluationmeasuring LLM output quality systematically