AI Agents for Beginners - 1. Intro to AI Agents and Agent Use Cases

A breakdown of AI Agent core components (Environment, Sensors, LLM, Tools, Memory), 7 agent types, when to use agents, and a hands-on Python example with Azure AI Foundry.
June 8, 2026

AI Agents for Beginners - 1. Intro to AI Agents and Agent Use Cases

This article is a summary based on Lesson 01 of Microsoft's AI Agents for Beginners course.

What is an AI Agent?

To summarize in one line:
An AI Agent is a system that enables a Large Language Model (LLM) to go beyond simply generating text and take actions in the real world using tools and knowledge.
An LLM on its own only generates response text to a prompt.
An AI Agent combines it with an Environment, Sensors, and Actuators to turn it into a system capable of taking real action.
AI Agent Core Components
Mermaid
flowchart TD User(["👤 User"]) User -->|"Natural language request"| Agent subgraph Agent["🤖 AI Agent"] direction TB LLM["🧠 LLM\nReasoning Engine"] Memory["💾 Memory\nShort-term / Long-term"] LLM <-->|"Context reference"| Memory end ENV["🌐 Environment\n(e.g. booking platform)"] Tools["🔧 Tools\n(API / DB / Code Runner)"] Agent -->|"Sensors: read state"| ENV ENV -->|"Current state"| Agent Agent -->|"Actuators: take action"| Tools Tools -->|"Result"| Agent Agent -->|"Response"| User
Role of each component:
ComponentDescriptionTravel Booking Agent Example
EnvironmentThe space in which the agent operatesFlight and hotel booking platform
SensorsMethods to read the current state of the environmentQuerying flight prices, room availability
ActuatorsActions taken by the agentBooking a room, sending confirmation email, canceling reservation
LLMNatural language understanding and planningConverting ambiguous requests → concrete action plans
MemoryShort-term (current conversation) + long-term (customer DB) memoryRemembering "prefers window seat"
ToolsExecution capabilities provided to the agentFlight search API, payment system

Types of AI Agents

Not all agents are built with the same architecture. They are broadly categorized into 7 types based on complexity and capability.
TypeHow It WorksTravel Agent Example
Simple ReflexFollows hardcoded rules only. No memory or planningForwarding complaint emails → CS team
Model-Based ReflexMaintains an internal world model and tracks changesMonitoring flight price history
Goal-BasedCreates step-by-step plans toward a goalBooking an entire itinerary from origin → destination
Utility-BasedCalculates trade-offs to find the best solutionFinding the optimal itinerary balancing cost and convenience
LearningContinuously improves through feedbackImproving recommendations based on travel reviews
HierarchicalA higher-level agent delegates subtasks to lower levelsSubagents dedicated to flights, hotels, and car rentals
Multi-Agent (MAS)Independent agents collaborate or competeCollaboration among dedicated hotel, flight, and tour agents

When to Use AI Agents

Just because AI Agents are powerful does not mean they should always be used.
Agents deliver true value when the following three conditions are met:
When to Use AI Agents
Mermaid
flowchart LR A["Problem Type"] --> B{Can the steps be\npre-defined?} B -->|Yes| C["Simple LLM call\nor workflow is enough"] B -->|No| D["✅ Open-Ended Problem\nLLM decides the path dynamically"] E["Task Scope"] --> F{Can a single tool\ncall handle it?} F -->|Yes| G["Simple API call is enough"] F -->|No| H["✅ Multi-Step Process\nUse tools across multiple turns"] I["Improvement Need"] --> J{Should it get\nsmarter over time?} J -->|No| K["Static solution is enough"] J -->|Yes| L["✅ Improvement Over Time\nFeedback-driven learning"]

Basics of Agentic Solutions

Agent Development

When building an agent, the first thing to do is define what the agent can do.
Tools, Actions, and Behaviors must be clearly designed.
In this course, Azure AI Agent Service is used as the primary platform:
  • Support for diverse models including OpenAI, Mistral, and Meta (Llama)
  • Integration with licensed data providers such as Tripadvisor
  • Standardized OpenAPI 3.0 tool definitions

Agentic Patterns

Communication with an LLM takes place through prompts, but an agent must operate autonomously across numerous steps.
Writing prompts manually at every step is impossible.
Agentic Patterns are reusable strategies for orchestrating LLMs in a more scalable and reliable manner.

Agentic Frameworks

An agent framework provides templates, tools, and infrastructure to make it easier for developers to create agents:
  • Wiring up tools and capabilities
  • Observability (monitoring and debugging agent behavior)
  • Multi-agent collaboration
In this course, we focus on the Microsoft Agent Framework (MAF) for building production-grade agents.

Code Example: First Travel Agent

Let's see how an AI Agent works in practice with real code.

1. Setup

setup.py
python
imports.py
python
Required environment variables:
  • AZURE_AI_PROJECT_ENDPOINT — Azure AI Foundry project endpoint
  • AZURE_AI_MODEL_DEPLOYMENT_NAME — deployed model name (e.g. gpt-4o-mini)

2. Defining a Tool

Define the tool to provide to the agent using the @tool decorator.
This function will be called automatically when the agent determines it is necessary.
tool_definition.py
python

3. Creating & Running the Agent

create_and_run_agent.py
python

4. Streaming Response

You can stream responses token by token, just like a real-time chat interface.
streaming.py
python

Agent Execution Flow

Let's look at how the code above actually works using a sequence diagram.
Travel Agent Tool Calling Flow
Mermaid
zenuml title Travel Agent Tool Calling Flow User->TravelAgent: recommend a warm beach destination TravelAgent->LLM: analyze request and decide tool call LLM->TravelAgent: call get_destinations TravelAgent->Tool: get_destinations() Tool->TravelAgent: return destinations list TravelAgent->LLM: filter by warm beach preference LLM->TravelAgent: recommend Bali and Sydney TravelAgent->User: final recommendation
Key points:
  • The LLM analyzes the user request and decides on its own which tool to call.
  • The get_destinations tool simply returns the list; filtering is handled by the LLM.
  • The agent passes the tool result back to the LLM to generate the final response.

Summary

To summarize what we learned in this lesson:
Lesson 01 Summary
Mermaid
flowchart LR Root["AI Agent"] Root --> Types["7 Types"] Root --> Cases["Use Cases"] Root --> Concepts["Core Concepts"] Types --> T1["Simple Reflex"] Types --> T2["Model-Based"] Types --> T3["Goal-Based"] Types --> T4["Utility-Based"] Types --> T5["Learning"] Types --> T6["Hierarchical"] Types --> T7["Multi-Agent"] Cases --> U1["Open-Ended Problems"] Cases --> U2["Multi-Step Processes"] Cases --> U3["Improvement Over Time"] Concepts --> C1["Agentic Patterns"] Concepts --> C2["Agentic Frameworks"] Concepts --> C3["Tool Calling"]
  • An AI Agent is a system that enables an LLM to go beyond text generation and take real action.
  • The core of an agent is the combination of Environment + Sensors + LLM + Actuators + Memory.
  • You should choose an agent that fits your goal from among the 7 types.
  • An agent is not necessary in every situation — if the steps of a problem can be pre-defined, a simple workflow is sufficient.

Jooojub
System S/W engineer
Explore Tags
Series
    Recent Post
    © 2026. jooojub. All right reserved.