What are AI Agents
Beyond Single API Calls
Everything you have learned so far -- prompts, API calls, workflows -- involves a human (or a trigger) deciding what the AI should do at each step. You write the prompt, call the API, get a response, and decide what to do next.
AI agents change this paradigm. An AI agent is a system that can perceive its environment, make decisions, take actions, and iterate toward a goal -- with minimal or no human intervention at each step.
Instead of a single API call, an agent runs in a loop: observe, think, act, observe the result of the action, think again, act again -- until the goal is achieved.
What Makes Something an Agent?
A Large Language Model (LLM) on its own is not an agent. It is a powerful reasoning engine, but it has no ability to take actions in the world. An AI agent combines an LLM with tools -- capabilities that let the model interact with external systems.
An AI agent has:
1. A goal or objective What is the agent trying to accomplish? "Research all competitors in the fintech space and produce a structured report" is a goal.
2. Access to tools Tools let the agent act: search the web, read files, write code, call APIs, send emails, query databases, interact with a browser.
3. A reasoning loop The agent thinks about its current state, decides which tool to use next, uses that tool, observes the result, and repeats until the goal is met.
4. Memory The agent maintains context about what it has already done and discovered, so it does not repeat steps or lose track of its progress.
The Agent Reasoning Loop (ReAct Pattern)
The most common agent architecture is called ReAct (Reasoning and Acting). It works like this:
Thought: What do I know? What do I need to find out? What action should I take next?
Action: [Tool name] with [Tool input]
Observation: [Result from the tool]
Thought: What does this result tell me? What should I do next?
Action: [Next tool]
Observation: [Result]
... (repeat until goal is achieved)
Final Answer: [The completed result]
This loop continues until the agent determines it has achieved the goal or reaches a maximum iteration limit.
Example: Research Agent
Goal: "Find the current pricing for three competing project management tools and summarise their differences."
Reasoning loop:
- Thought: I need to find pricing for three competing tools. I will start with tool number one.
- Action: Search("Asana pricing 2025")
- Observation: Asana has Basic (free), Premium ($10.99/user/month), Business ($24.99/user/month)...
- Thought: Good. Now I need the second tool's pricing.
- Action: Search("Monday.com pricing 2025")
- Observation: Monday.com Basic ($0), Standard ($9/user/month), Pro ($19/user/month)...
- Thought: Now I need one more competitor.
- Action: Search("Notion pricing 2025")
- Observation: Notion Free, Plus ($8/user/month), Business ($15/user/month)...
- Thought: I have all the data I need. I can now write the summary.
- Final Answer: [Structured comparison of the three tools]
The agent autonomously decided which tools to search, in what order, and when it had enough information to produce the final answer -- all without human intervention at each step.
Types of AI Agents
Reactive Agents
Simple agents that respond to inputs based on predefined rules or patterns. Limited autonomy -- no long-term planning.
Example: A chatbot that classifies user intent and routes to a predefined response.
Deliberative Agents
Agents that plan ahead before acting. They reason about multiple possible paths and choose the best one.
Example: An agent that breaks a complex research task into sub-tasks, plans the order in which to complete them, then executes the plan.
Multi-Agent Systems
Multiple specialised agents working together, each handling a different part of a complex task and passing results between each other.
Example: A content production pipeline with a research agent, a writing agent, a fact-checking agent, and an editing agent -- each specialised for their role.
What AI Agents Can Do Today
Current AI agents can:
- Browse the internet and extract information from websites
- Write, test, and execute code
- Read and write files (documents, spreadsheets, PDFs)
- Send emails and messages
- Interact with web applications (fill forms, click buttons, navigate pages)
- Query and update databases
- Call any API with appropriate credentials
- Interact with other AI systems
This means a single agent can complete tasks that previously required a human working for hours: researching a topic, writing a report, sending follow-up emails, updating a database, and generating a summary -- all from a single instruction.
The Limitations of Current AI Agents
Despite their power, current AI agents have real limitations:
Reliability: Agents can get stuck in loops, make poor decisions, or take wrong actions -- especially on tasks they have not been designed for. They are not yet reliable enough for fully autonomous operation on high-stakes tasks.
Cost: Agents run many API calls per task. A complex research task might use 50 to 200 API calls. At gpt-4o pricing, this can be expensive.
Speed: Each reasoning step requires an API call. Complex tasks can take minutes to complete.
Hallucination risk: Agents can confidently take wrong actions based on hallucinated information. Verification steps and human review are important for high-stakes tasks.
Context limits: Very long tasks can exceed the context window, causing the agent to forget earlier steps.
Real-World Agent Applications
Sales intelligence agent: Given a list of prospects, research each company online, extract relevant information, and draft personalised outreach emails.
Code review agent: Given a pull request, read the changed files, understand the context, identify potential bugs, and write a detailed review.
Data analysis agent: Given a natural language question and access to a database, write the appropriate query, execute it, interpret the results, and produce a human-readable answer.
Customer support agent: Handle tier-1 support tickets autonomously -- look up account details, apply standard fixes, draft responses, and escalate complex cases to humans.
Key Takeaways
- An AI agent combines an LLM with tools and a reasoning loop, enabling it to autonomously take actions toward a goal.
- The ReAct (Reasoning and Acting) pattern is the most common agent architecture: Thought, Action, Observation -- repeated until the goal is achieved.
- Unlike single API calls, agents make multiple decisions sequentially, choosing which tools to use and when to stop.
- Current agents are powerful but have real limitations in reliability, cost, speed, and context length.
- The most valuable agents today automate research, code review, data analysis, and tier-1 support tasks.
Try it yourself
Key Takeaways
- An AI agent combines an LLM with tools and a reasoning loop, enabling autonomous multi-step task completion toward a defined goal.
- The ReAct (Reasoning and Acting) pattern -- Thought, Action, Observation -- is the most common agent architecture.
- Agents differ from single API calls because they make sequential decisions, choose which tools to use, and iterate until the goal is met.
- Current agents are powerful but limited by reliability, cost per complex task, speed, and context window constraints.
- The most valuable agent applications today include research tasks, code review, data analysis, and tier-1 customer support automation.
Quick Quiz
1.What is the key difference between a single AI API call and an AI agent?
2.What does ReAct stand for in the context of AI agent architectures?
3.Which of the following is a real limitation of current AI agents?
4.What is a multi-agent system?
Ready to go further?
CareerEx gives you structured 12-week training, live classes every Saturday and Sunday, real tutor feedback, and a certificate. Join the next cohort.
Join CareerEx