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
이 글은 Microsoft의 AI Agents for Beginners 강좌 Lesson 01을 기반으로 정리한 내용입니다.
What is an AI Agent?
한 줄로 요약하면 이렇습니다.
AI Agent는 LLM(Large Language Model)이 단순히 텍스트를 생성하는 것을 넘어, Tool과 지식을 사용해 실제 세계에서 Action할 수 있도록 만든 시스템입니다.
LLM 단독으로는 prompt에 대한 응답 텍스트만 생성합니다.
AI Agent는 여기에 Environment, Sensors, Actuators 를 결합해 실제 행동이 가능한 시스템으로 만들어 줍니다.
AI Agent는 여기에 Environment, Sensors, Actuators 를 결합해 실제 행동이 가능한 시스템으로 만들어 줍니다.
AI Agent Core ComponentsMermaidflowchart 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
각 구성 요소의 역할:
| Component | 설명 | 여행 예약 에이전트 예시 |
|---|---|---|
| Environment | 에이전트가 동작하는 공간 | 항공권·호텔 예약 플랫폼 |
| Sensors | 환경의 현재 상태를 읽는 방법 | 항공편 가격, 객실 가용 여부 조회 |
| Actuators | 에이전트가 취하는 행동 | 방 예약, 확인 메일 발송, 예약 취소 |
| LLM | 자연어 이해 및 계획 수립 | 모호한 요청 → 구체적 행동 계획으로 변환 |
| Memory | 단기(현재 대화) + 장기(고객 DB) 기억 | "창가 자리 선호" 기억 |
| Tools | 에이전트에게 주어진 실행 능력 | 항공편 검색 API, 결제 시스템 |
Types of AI Agents
모든 에이전트가 동일한 구조로 만들어지지는 않습니다. 복잡도와 능력에 따라 크게 7가지 유형으로 분류됩니다.
| Type | 동작 방식 | 여행 에이전트 예시 |
|---|---|---|
| Simple Reflex | 하드코딩된 규칙만 따름. 메모리·계획 없음 | 불만 이메일 → CS팀 전달 |
| Model-Based Reflex | 내부 세계 모델을 유지하며 변화 추적 | 항공권 가격 이력 모니터링 |
| Goal-Based | 목표를 향한 단계적 계획 수립 | 출발지→목적지 전체 여정 예약 |
| Utility-Based | 트레이드오프를 계산해 최선의 해결책 탐색 | 비용·편의성 균형 최적 여정 |
| Learning | 피드백으로 지속 개선 | 여행 후기 기반 추천 개선 |
| Hierarchical | 상위 에이전트가 서브태스크를 하위에 위임 | 항공·호텔·렌터카 각 서브에이전트 |
| Multi-Agent (MAS) | 독립 에이전트가 협력 또는 경쟁 | 호텔·항공·관광 전담 에이전트 협업 |
When to Use AI Agents
AI Agent가 강력하다고 해서 항상 사용해야 하는 것은 아닙니다.
아래 세 가지 조건에 해당할 때 에이전트가 진정한 가치를 발휘합니다.
아래 세 가지 조건에 해당할 때 에이전트가 진정한 가치를 발휘합니다.
When to Use AI AgentsMermaidflowchart 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
에이전트를 만들 때 가장 먼저 해야 할 일은 에이전트가 무엇을 할 수 있는지 정의하는 것입니다.
Tools, Actions, Behaviors를 명확히 설계해야 합니다.
Tools, Actions, Behaviors를 명확히 설계해야 합니다.
이 강좌에서는 Azure AI Agent Service를 메인 플랫폼으로 사용합니다:
- OpenAI, Mistral, Meta(Llama) 등 다양한 모델 지원
- Tripadvisor 등 licensed data provider 연동
- 표준화된 OpenAPI 3.0 tool definition
Agentic Patterns
LLM과의 소통은 prompt를 통해 이루어지지만, 에이전트는 수많은 단계에 걸쳐 자율적으로 동작해야 합니다.
매 단계마다 직접 prompt를 작성하는 것은 불가능합니다.
Agentic Patterns은 LLM을 더 확장 가능하고 안정적인 방식으로 orchestration하기 위한 재사용 가능한 전략입니다.
매 단계마다 직접 prompt를 작성하는 것은 불가능합니다.
Agentic Patterns은 LLM을 더 확장 가능하고 안정적인 방식으로 orchestration하기 위한 재사용 가능한 전략입니다.
Agentic Frameworks
Agent framework는 개발자가 에이전트를 더 쉽게 만들 수 있도록 template, tool, infrastructure를 제공합니다:
- Tool 및 기능 연결 (wiring up tools and capabilities)
- 에이전트의 동작 관찰 및 디버깅 (observability)
- 여러 에이전트 간 협업 (multi-agent collaboration)
이 강좌에서는 프로덕션급 에이전트 구축을 위한 Microsoft Agent Framework (MAF)에 집중합니다.
Code Example: First Travel Agent
실제 코드로 AI Agent가 어떻게 동작하는지 살펴보겠습니다.
1. Setup
setup.pypython
imports.pypython
Required environment variables:
AZURE_AI_PROJECT_ENDPOINT— Azure AI Foundry project endpointAZURE_AI_MODEL_DEPLOYMENT_NAME— deployed model name (e.g.gpt-4o-mini)
2. Defining a Tool
에이전트에게 제공할 tool을 @tool decorator로 정의합니다.
이 함수는 에이전트가 필요하다고 판단할 때 자동으로 호출됩니다.
이 함수는 에이전트가 필요하다고 판단할 때 자동으로 호출됩니다.
tool_definition.pypython
3. Creating & Running the Agent
create_and_run_agent.pypython
4. Streaming Response
실시간 chat interface처럼 token 단위로 응답을 streaming할 수 있습니다.
streaming.pypython
Agent Execution Flow
위 코드가 실제로 어떻게 동작하는지 sequence diagram으로 살펴보겠습니다.
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:
- LLM은 user request를 분석하고 스스로 어떤 tool을 호출할지 결정합니다
get_destinationstool은 단순히 목록을 반환할 뿐, filtering은 LLM이 처리합니다- 에이전트는 tool 결과를 LLM에게 다시 전달해 최종 응답을 생성합니다
Summary
이번 Lesson에서 배운 내용을 요약하면:
Lesson 01 SummaryMermaidflowchart 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"]
- AI Agent는 LLM이 텍스트 생성을 넘어 실제 행동을 할 수 있게 만드는 시스템입니다
- 에이전트의 핵심은 Environment + Sensors + LLM + Actuators + Memory 조합입니다
- 7가지 type 중 목적에 맞는 에이전트를 선택해야 합니다
- 모든 상황에 에이전트가 필요한 것은 아닙니다 — 단계 정의가 가능한 문제라면 단순 workflow로 충분합니다