What is an AI agent?
Lecture notes
A large language model (LLM) receives text and produces text. On its own it cannot check today's exchange rate, read your school's database or send an e-mail. An AI agent is a system in which an LLM pursues a goal by deciding which actions to take, using tools, observing the results and continuing until the task is done.
Chatbot, workflow, agent
- A chatbot replies to each message; the conversation is the product.
- An LLM workflow chains model calls along a path fixed by the developer: e.g. (1) classify the e-mail, (2) extract the order number, (3) draft a reply. Predictable and easy to test.
- An agent lets the model choose the next step at run time: "I need the order status → call
get_order→ the order is late → callnotify_courier→ write the answer".
Autonomy is a spectrum. Good engineers start with the simplest design that solves the problem — often a single well-prompted call or a fixed workflow — and add autonomy only when it brings real value, because more autonomy means more cost, latency and risk.
The building blocks
- Model — the LLM that reasons and decides (Claude, GPT, Gemini, Llama, Mistral…).
- Instructions — the system prompt: role, goal, rules, tone.
- Tools — functions the agent can call: search, calculators, databases, APIs, sending messages.
- Memory / state — the conversation so far, notes, user preferences, documents.
- Orchestration — the loop that sends the context to the model, runs the tools it requests and feeds back the results.
- Guardrails — limits, validations and human approval for risky actions.
Realistic use cases
A support assistant for a Mobile Money merchant that checks a transaction status before answering; a research assistant that searches, reads and summarises sources with citations; a school assistant answering questions from the official regulations; a data assistant that writes and runs code to analyse a spreadsheet.