You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
AI agents represent a paradigm shift from simple chatbots to autonomous systems that can perceive their environment, reason about what to do, take actions using tools, and iterate until a task is complete.
graph TD
A["Observe Environment"] --> B["Reason & Plan"]
B --> C["Act (Use Tools)"]
C --> D["Evaluate Result"]
D -- "Goal met?" --> E["DONE"]
D -- "No (iterate)" --> B
Key insight: An agent takes multiple steps autonomously rather than generating a single response.
| Tool Category | Examples | What It Enables |
|---|---|---|
| Code execution | Python interpreter, shell | Run calculations, process data |
| File operations | Read, write, edit files | Manage documents and code |
| Web browsing | Search, web scraping | Access current information |
| API calls | REST APIs, databases | Interact with services |
| Communication | Email, Slack | Collaborate with humans |
User: "What's the weather in London right now?"
LLM outputs:
{
"tool": "get_weather",
"arguments": {"location": "London, UK", "units": "metric"}
}
System executes: get_weather("London, UK", "metric")
Returns: {"temp": 12, "condition": "cloudy", "humidity": 78}
LLM: "It is currently 12 degrees C and cloudy in London, with 78% humidity."
The model does not execute functions directly — it outputs structured requests, and application code handles execution. This keeps the system secure and controllable.
Multi-step agent example
Goal: "Analyse Q3 sales data and create a summary report"
ReAct (Reasoning + Acting) interleaves thinking and acting:
Thought: I need the population of Tokyo.
Action: web_search("population of Tokyo 2025")
Observation: Approximately 13.96 million (city) or 37.4 million (metro).
Thought: The user probably wants the metro figure.
Answer: Tokyo has about 14 million in the city proper and 37.4 million in the Greater Tokyo Area.
One LLM handles all reasoning and tool use. Simple but limited for complex tasks.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.