Generative AI and AI Agents
30-second answer
Generative AI creates new content (text, code, images, audio) in response to a prompt. An AI agent goes further: it's a model plus instructions plus tools that works towards a goal by planning, calling tools (search, code, APIs), observing the results and repeating until it can answer or finish the task. A copilot is an agent-style assistant built into an app to help a person, and multi-agent systems split a big job across several specialist agents.
Simulate it » No Azure account neededExam objective: 1.3.1 Identify scenarios for common AI workloads, including generative and agentic AI, text analysis, speech, computer vision, and information extraction. 1.2.1 Describe how generative AI models work. (Skills measured as of April 15, 2026)
Simulations
Feel it before you read it. No account needed, nothing leaves this page.
Go to <strong>Build ➜ Agents</strong> and create a new agent.
👆 Click the glowing item in the portal to continue
Read the steps as text
- Go to Build ➜ Agents and create a new agent.
- Name it, pick the model deployment and write clear instructions: role, rules and limits.
- Add knowledge (file search over your policy) and tools (code interpreter, a function that checks orders). Saving creates version 2.
- Test it in the agent playground with a question that needs two tools.
- Open the trace: the agent planned, called each tool, read the results and wrote one answer. That loop is what makes it agentic.
🧪 Simulation for learning. Screens are simplified versions of the Azure portal; names, prices and IDs are examples. Nothing here touches real Azure.
🖱️ Drag to rotate · scroll or pinch to zoom
An agent: model + instructions + tools
An agent is a model with instructions and tools that can decide what to do next. Foundry Agent Service keeps the conversation and runs the tools for you.
🤔 What happens if…
Read this tour as text
- Resource and project. A Foundry resource is the Azure resource that holds your models, tools, security and billing. Inside it, a project is the workspace where a team builds one app: its deployments, agents, files and evaluations.
- The model catalog. The model catalog lists thousands of models: OpenAI GPT models, Microsoft Phi, Meta Llama, Mistral, DeepSeek and more. Each has a model card, benchmarks and the deployment types it supports.
- Deploy a model. Before an app can call a model you deploy it and give the deployment a name. Global Standard (pay per token, the default), Data Zone (keeps processing in the US or EU), Provisioned (reserved throughput) and Batch (cheaper, within 24 hours) trade price, speed and data location.
- Test in the playground. The chat playground lets you try a deployment with no code. The system message sets the rules, the user message asks the question, and parameters such as temperature tune the answer.
- Call it from your app. Your Python app uses the Foundry SDK (
azure-ai-projects): connect to the project endpoint with Microsoft Entra ID, get an OpenAI-compatible client and call the deployment by its name. - An agent: model + instructions + tools. An agent is a model with instructions and tools that can decide what to do next. Foundry Agent Service keeps the conversation and runs the tools for you.
- Tools in action. Ask "What is our refund limit, and what is 15% of ₹4,200?" The agent uses file search for the policy and the code interpreter for the maths, then answers in one reply. That loop of plan, act and observe is what makes it agentic.
- Guardrails and monitoring. Every request passes guardrails (content filters) on the way in and out. Tracing and evaluations show what the agent did, how long it took and whether answers are grounded and safe.
Give a model instructions and tools and it becomes an agent. Build a support agent, then watch it pick the right tool for each question.
🎓 Education-only simulation. Your lab is saved in this browser, so you can leave and continue later.
😟 THE PROBLEM
Your chatbot explains the refund policy but can’t actually process a refund.
😊 THE SOLUTION
Give the model tools and it becomes an agent that acts.
- Can’t see your documents✓ File search tool
- Gets maths wrong✓ Code interpreter tool
- Can’t touch your systems✓ Function tools
Start with a question
What's the difference between a friend who gives travel tips and a travel agent?
Ask a well-travelled friend about a Goa trip and you’ll get great advice: which beach, which month, what to eat. But you still have to book everything yourself.
A travel agent hears the same question and does things. Checks flight prices, finds a hotel with rooms, books both, and sends you the tickets.
Generative AI is the friend: it writes great answers. An AI agent is the travel agent: it uses tools to get the job done.
Explain it like I’m 10
Visual: an agent in motion
Same customer question, two answers: a model on its own, then an agent with tools working through the loop.
Read the video script
- Generative AI aloneA customer asks where their order is, and to move the delivery if it's late. A model on its own only knows its training data and the prompt, so it can't check, and it can't change anything.
- An agent = model + instructions + toolsAn agent wraps the model with two more things. Instructions set its role and rules, and tools let it fetch data and take actions in real systems.
- Plan the next stepNow the loop starts. First it plans. To answer, it needs the order status, so the first step is to look it up.
- Act, then observeThen it acts. It calls the order lookup tool, and observes the result. The parcel is two days late.
- Loop again until it’s doneIt's late, so the agent loops again. It checks the delivery policy, then calls the reschedule tool for Saturday. Each result feeds the next decision.
- Then it answersNow the goal is met, so it answers, telling the customer what it actually did, not just what it knows.
- Bigger jobs, more agentsFor bigger jobs, an orchestrator can hand work to specialist agents for billing, shipping and returns. And a copilot is an agent built into an app to help a person. Exam tip: if it needs tools to finish a task, it is an agent.
The technical explanation
Generative AI models (such as GPT-4.1 or Phi) take a prompt and produce new content one token at a time, each token predicted from everything before it. On their own they only know what they learned in training plus what you put in the prompt. They can’t check today’s stock level or send an email.
An AI agent wraps a model with two more things:
| Part | What it does | Example |
|---|---|---|
| Model | Reads the request, reasons, decides what to do next | A gpt-4.1-mini deployment |
| Instructions | Sets the role, rules, tone and limits | “You’re Contoso’s support agent. Only discuss Contoso orders. Never promise a refund over the policy limit.” |
| Tools | Let it fetch data or act | File search over policy PDFs, code interpreter, web search, function calling, OpenAPI tools, MCP servers, Azure AI Search |
The agent loop
-
1 Plan
Read the goal and decide the next step.
-
2 Act
Call a tool: search, run code, call an API.
-
3 Observe
Read what the tool returned.
-
4 Repeat or answer
Take another step, or reply to the user.
The conversation keeps the history, so the agent remembers earlier turns. In Microsoft Foundry you build agents in Foundry Agent Service: Build, then Agents, then Create agent, pick a model, write instructions, add tools and test in the agent playground. Every save creates a new, immutable version, so you can roll back.
Generative AI
- Prompt in, content out
- Knows only its training data and the prompt
- One call, fast and cheap
- Great for drafting, summarising, rewriting
AI agent
- Goal in, actions and an answer out
- Uses tools for fresh data and actions
- Several model and tool calls
- Great for tasks with steps and real systems
Single agent, multi-agent and copilots
- Single agent: one agent with a focused job and a handful of tools. Start here.
- Multi-agent: several specialist agents (say, billing, shipping and returns), with an orchestrator agent or a workflow that routes each request and combines the results. Useful when one agent’s instructions or tool list gets too big.
- Copilot: an AI assistant built into an app to help a person, like Microsoft 365 Copilot drafting a document or GitHub Copilot suggesting code. The person stays in charge and approves the result.
Architect level Keeping agents safe
Give each agent only the tools and permissions it needs, and keep a human approval step for anything costly or hard to undo, like refunds or deleting records. Tool results are untrusted input: a web page or document can contain hidden instructions (indirect prompt injection), which is why Foundry guardrails include Prompt Shields. Use tracing and evaluations to see which tools an agent called and why.
Real-world business scenario
Tailspin Telecom, a mobile operator in Bengaluru
- The problem
- Its generative chatbot could explain plans but couldn't check a customer's usage or change their plan, so most chats still ended with 'please call us'.
- What they used
- Built a Foundry agent with instructions for tone and limits, a function tool to read usage, an OpenAPI tool to change plans, and file search over the plan brochure. Plan changes above a set value go to a human for approval.
- Why that choice
- The task needed live account data and an action, which is exactly what tools give an agent. The approval step keeps high-impact changes under human control.
- The result
- Most plan-change requests were finished inside the chat, and call-centre staff handled fewer routine calls.
When to use it and when not to
✓ Use it when…
- Use **generative AI** for drafting, summarising, rewriting and creative content.
- Use an **agent** when the task needs fresh data, calculations or actions in other systems.
- Use **multi-agent** designs when one agent has too many tools or conflicting instructions.
- Use a **copilot** pattern when a person should stay in charge and approve the output.
✕ Think twice when…
- Don't build an agent for a job a single prompt can do. It adds cost and latency.
- Don't give an agent tools that can make high-impact changes without a human approval step.
- Don't split into many agents before one agent has proved too limited.
↔ Alternatives to consider
- **Retrieval-augmented generation (RAG)** with a single model when the only need is answers grounded in your documents.
- **A fixed workflow** (for example Azure Logic Apps) when the steps never change and need no judgement.
Test yourself with exercises
5 original practice questions in the AI-901 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.
Interview preparation
Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.
Beginner What's the difference between a chatbot built on generative AI and an AI agent?
Model answer
A generative chatbot answers from what the model knows and what's in the prompt. An agent can also use tools: search your files, run code, call an API to check an order. It decides which tools to use and in what order to reach a goal. So a chatbot talks, an agent talks and does.
Interviewer follows up
Is an agent always more useful?
You
No. If all you need is a draft email or a summary, a single model call is cheaper, faster and easier to test. Agents earn their cost when the task needs fresh data or actions.
Intermediate What are the three building blocks of an agent in Microsoft Foundry?
Model answer
A model deployment to do the reasoning, instructions that set its role, rules and tone, and tools such as file search, code interpreter, web search, function calling, OpenAPI tools, MCP servers or Azure AI Search. Each time I save changes, Foundry creates a new version of the agent.
Experienced developer When would you split one agent into several?
Model answer
When one agent's instructions get long and contradictory, or it has so many tools that it picks the wrong one. I'd give each agent a narrow job, like billing or shipping, and let an orchestrator agent or a workflow route the request. It's easier to test and to give each agent only the permissions it needs.
Scenario A sales manager asks, "Compare last quarter's sales to this quarter and chart it." Would you use plain generative AI or an agent?
Model answer
An agent. The model alone doesn't know the sales figures and can't reliably do the maths in its head. An agent can retrieve the data with a tool, run the numbers and draw the chart with code interpreter, then explain the result.
Quick revision
Key points
- Generative AI creates new content from a prompt by predicting the next token.
- An agent = model + instructions + tools, working towards a goal.
- Agents loop through plan, act (call a tool), observe, until the task is done.
- Multi-agent systems split work across specialist agents with an orchestrator or workflow.
- A copilot is an AI assistant built into an app to help a person.
Important terminology
- Generative AI
- AI that produces new content such as text, code, images or audio from a prompt, usually by predicting the next token.
- AI agent
- A model combined with instructions and tools that plans and takes actions to complete a goal.
- Tool
- Something an agent can call to get information or act, such as file search, code interpreter, web search, a function or an API.
- Plan-act-observe loop
- The cycle an agent repeats. Decide the next step, call a tool, read the result, then decide again.
- Multi-agent system
- Several specialised agents that each handle part of a task, coordinated by an orchestrator agent or a workflow.
- Copilot
- An AI assistant built into an app that helps a person do their work, such as Microsoft 365 Copilot or GitHub Copilot.
- Foundry Agent Service
- The Microsoft Foundry service for building, testing, versioning and running agents.
Common mistakes
- Calling any chatbot an agent. Without tools and actions it's generative AI.
- Thinking agents remove the need for human review. High-impact actions still need a person in the loop.
- Assuming more agents is always better. Each extra agent adds cost, latency and things to test.
Exam tips
- "Uses tools to complete tasks on the user's behalf" = AI agent.
- "Creates a new product description from a prompt" = generative AI.
- The three parts of an agent = model, instructions, tools.
Five quick revision questions
-
1.What three things make up an AI agent?Show
A model, instructions and tools.
-
2.Name two tools a Foundry agent can use.Show
Any two of file search, code interpreter, web search, function calling, OpenAPI, MCP servers, Azure AI Search.
-
3.What does an agent do after calling a tool?Show
It observes the result and decides the next step.
-
4.What is a copilot?Show
An AI assistant built into an app that helps a person with their work.
-
5.What coordinates the agents in a multi-agent system?Show
An orchestrator agent or a workflow.
Official references
Finished this lesson? Tick it off. Your progress is saved in this browser.
Next up: Text Analysis: Key Phrases, Entities, Sentiment and Summaries
Lesson done? Make it stick with a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges.