What Are AI Agents?
Ask a chatbot "Is there a sleeper train from Pune to Jaipur on Friday?" and it can only guess from what it learned in training. Ask Tripmate, and it searches today's timetable, reads the result, and answers from real data. The difference is not a smarter model. It is that Tripmate is an agent.
The rule
An agent is a model in a loop, choosing actions toward a goal.
Three parts make that sentence work:
- A model — the language model that reads the situation and decides what to do next.
- Actions — usually tools: functions the program lets the model request, such as
search_trainsorsend_email. The model only asks for a tool; your code runs it and hands back the result. - A loop — the program keeps calling the model, running what it asks for, and feeding results back until the goal is met or a limit is hit.
goal → model decides → tool runs → result goes back → model decides → … → answerA plain chatbot does one pass: text in, text out. A fixed script runs the same steps every time. An agent sits between them: the steps are chosen at run time by the model, based on what it has seen so far.
Agents show up wherever the path to an answer is not known in advance:
- Personal assistants — reading a calendar, drafting emails, booking things.
- Code generation — writing code, running tests, reading errors, fixing, repeating.
- Data analysis — querying a database, charting the result, noticing an odd number, querying again.
- Web research and scraping — searching, opening pages, following links, extracting facts.
- Game characters — a non-player character that decides what to say and do from the game state.
The shortcut
To decide whether something is really an agent, ask one question: "Who picks the next step — the code or the model?" If the code always picks, it is a script or a pipeline. If the model picks from a set of actions, and the results feed back in, it is an agent.
A summariser
Code sends an article, the model returns a summary, done. The code picked every step: not an agent.
The trap is calling every product with a model inside an "agent". Agents are more flexible, but also slower, costlier and harder to test. If a fixed pipeline does the job, it is often the better design.
Drills
Answer fast — trust the rule.
What turns a language model into an agent?
When Tripmate "uses" search_trains, who actually runs the search?
A program always calls a model to translate a message, then always posts it to Slack. What is it?
Which task most needs an agent rather than a fixed script?
Remember
- An agent is a model in a loop, choosing actions toward a goal.
- Shortcut: "Who picks the next step — the code or the model?"
- Trap: using an agent where a simple fixed pipeline would be cheaper and more reliable.
