In AI-102, an agentic solution is a way of building an AI application where the model does more than “chat.” The model can work toward a goal by:
Planning steps (for example: “First I will look up the policy, then I will check the user’s account status, then I will create a ticket.”)
Calling tools (APIs / functions) to get reliable information or perform actions
Keeping state so it can continue multi-step work (remember what it already did, what it still needs, and what the result was)
Iterating when needed (retrying a tool call, using another tool, or asking the user for missing details)
In the Microsoft Azure ecosystem, the study guide explicitly references creating agents with Microsoft Foundry Agent Service and building more complex agents with Microsoft Agent Framework, plus orchestrating complex workflows such as multi-agent solutions.
Think of a simple chatbot as a person who only talks.
Think of an agent as a person who can talk and also do work by using “helpers” (tools), like:
searching a company knowledge base,
checking a database,
filing a support ticket,
scheduling an appointment,
sending an email draft for approval (depending on your system design).
An agentic solution is goal-driven and action-capable, not just conversational.
AI-102 typically tests agentic solutions in a practical, engineering-focused way. The exam expects you to understand and implement the following themes.
You should be able to decide:
When a single response is enough (simple chat)
When you need retrieval grounding (RAG)
When you need tool use + multi-step execution (agent)
A beginner-friendly guideline:
Use chat when the user wants explanations, summaries, or creative content.
Use RAG when the user needs answers grounded in your documents (“What does our handbook say?”).
Use an agent when the user’s request requires steps and actions (“Open a ticket, check my status, then recommend the next step.”).
You should be able to design:
A tool that retrieves authoritative info (search, database query)
A tool that performs an action (create a ticket, update a record)
A workflow that chains tools in the correct order
Agents can fail in more ways than chatbots because they:
call external systems that may be unavailable,
can make incorrect tool choices,
can repeat actions unless controlled.
So reliability includes:
Guardrails to keep behavior safe and predictable
Monitoring to detect errors and quality issues
Evaluation to measure success and catch regressions
Safe execution patterns (validation, retries, approval gates for high-impact actions)
You should understand how to:
Keep track of what happened so far (state)
Retry safely when a tool fails (retries)
Avoid performing the same action twice (idempotency)
Communicate clearly to the user when something cannot be completed (error handling)
The model is the “brain” that decides:
what the user wants,
whether it needs a tool,
which tool to call,
how to use the tool results,
how to respond.
A beginner-friendly mental model:
The model is like a smart coordinator.
Tools are like specialized employees.
The orchestrator is the manager who ensures work happens in the right order.
When selecting an LLM for agentic work, you care about more than “is it smart?”
Agents often need to produce structured tool calls, not just text.
Example: calling a CreateTicket tool with fields like title, priority, category, description.
A model suited for tool use will reliably produce valid structured inputs.
Why this matters:
If the tool call structure is wrong, your API call fails.
If fields are missing, the agent may do the wrong action.
Context length is “how much information the model can consider at once,” including:
user conversation history,
retrieved documents,
tool results,
system instructions.
Beginner rule:
Longer context can help, but it also increases cost and can add noise.
Good systems avoid dumping everything into context.
Agentic solutions can become expensive if they:
take many turns (plan → tool → plan → tool → answer),
retrieve too much text,
call tools repeatedly.
So you should learn to:
keep tool outputs concise,
limit retries,
terminate loops safely,
cache stable results when appropriate.
In an agentic solution, prompts are not just “write nicely.” They are behavior contracts.
Your system instructions should clearly state:
what the agent is allowed to do,
what tools it can use,
what it must never do (for example: “Never execute payments without user approval.”),
how to treat sensitive information.
Beginner tip:
A tool-use policy answers questions like:
When should the agent call a tool vs. answer directly?
When should the agent ask the user for missing information?
When should the agent stop and return a partial result?
A simple tool-use policy pattern:
If the user asks for a fact that must be accurate and current → call a retrieval tool.
If the user asks for an action with real-world impact → confirm required fields and use approval gates for high-risk actions.
If a tool fails repeatedly → stop, explain the failure, and provide next steps.
A tool is any function/API the agent can call to:
fetch reliable information, or
perform an external action.
Tools are the difference between:
“I think your order shipped yesterday” (guessing)
and
“Your order shipped on Jan 10, tracking number X…” (verified via system API).
Purpose: get authoritative information.
Examples:
Search a policy knowledge base (Azure AI Search)
Query a product catalog database
Fetch a document by ID
Beginner example:
User: “What is the password reset policy?”
Agent: calls SearchPolicyDocuments(query="password reset policy")
Purpose: do something in an external system.
Examples:
Create a support ticket
Update a CRM record
Schedule a meeting
Beginner example:
User: “Create a high priority ticket for my VPN problem.”
Agent: calls CreateTicket(title="VPN not connecting", priority="High", ...)
Purpose: perform calculations or validations reliably.
Examples:
Compute totals, tax, discounts
Validate a form input (dates, IDs)
Transform data formats
Beginner example:
User: “What’s the total cost if I buy 17 units with 8.25% tax?”
Agent: calls CalculateTotal(quantity=17, price=..., taxRate=0.0825)
Purpose: trigger multi-step processes that your system runs.
Examples:
Start an Azure Logic Apps workflow
Invoke an Azure Function
Trigger a durable workflow for long-running tasks
Beginner example:
User: “Onboard a new employee.”
Agent: calls StartOnboardingWorkflow(employeeId=...)
Give each tool only the permissions it needs.
A “read policy” tool should not be able to modify payroll.
An “update CRM” tool should not access HR files.
Why it matters:
Define clear input/output structure:
required fields,
allowed values,
versioning if you change it over time.
Beginner tip:
Idempotency means: repeating the same request does not cause duplicate side effects.
Common patterns:
Use a client-generated requestId
Have the server reject duplicates for the same requestId
Your system should log:
which tool was called,
when it was called,
whether it succeeded,
key error codes,
timing.
But also:
avoid logging sensitive content (PII, secrets),
sanitize/redact where necessary.
In real systems, “memory” is often not magic inside the model. It is usually stored outside the model and retrieved when needed.
AI-102 coverage commonly includes agent concepts like continuity across workflows and sessions, and Microsoft documentation describes long-term memory capabilities in Foundry Agent Service as a managed solution.
What the agent needs right now to finish the current task:
conversation history (recent turns),
the current plan,
intermediate tool results.
Example:
“We already verified the user’s identity.”
“We already fetched the policy document.”
What the system may keep across sessions:
user preferences (“prefers email updates”),
stable profile information (role, department) if allowed,
recurring choices (“always use my SF office address”).
Important:
Structured records of “what happened” for:
debugging,
audits,
evaluation,
incident response.
Example trace:
Tool called: SearchPolicyDocuments
Input: query string
Output: document IDs
Next action: summarize and cite
Vector store: helps semantic recall (embeddings) to retrieve “similar” content.
Document store: stores transcripts, documents, or artifacts.
Key-value store: fast storage of simple session/user attributes.
Do not store secrets (passwords, tokens).
Be cautious with personal data (addresses, IDs).
Follow your organization’s retention and consent rules.
Short-term session state might expire quickly (minutes/hours).
Long-term memory might have explicit retention windows (days/months).
Logs often require retention policies and access controls.
Users may need to opt in to personalization.
Only authorized systems/users should access stored memory.
Orchestration is the “control loop” that turns a model + tools into a working agent.
The AI-102 study guide explicitly mentions implementing complex workflows, including orchestration for multi-agent solutions, multiple users, and autonomous capabilities.
Interpret goal
Plan
Act
Observe
Reflect/iterate
Respond
Hosted in an agent runtime (Microsoft Foundry Agent Service) which can provide server-side orchestration and retry of tool calls with structured logging.
Implemented via an agent framework (Microsoft Agent Framework is referenced in the AI-102 study guide as the path to implement complex agents).
Built custom in your application (you write the orchestration logic yourself using SDKs and your own state machine)
A hosted agent service means Azure runs and manages the agent runtime for you. In the context of AI-102, this is commonly described as Azure AI Foundry Agent Service (also referred to as Foundry Agents in Microsoft learning materials).
At a high level, the service provides:
A managed execution environment for agents
Built-in support for tool calling and multi-step reasoning
Infrastructure features such as scaling, reliability, and logging
For a beginner, the key idea is:
You focus on what the agent should do, not on building and maintaining the execution engine.
You do not need to:
Host your own orchestration server
Manually manage retries for every tool call
Build logging pipelines from scratch
Handle concurrency and scaling logic yourself
Instead, you:
Define the agent configuration
Define tools and policies
Call the agent from your application
The exam does not test UI details or portal screenshots.
It tests whether you understand:
What the service is responsible for
What your application is responsible for
When a hosted agent service is the correct architectural choice
Below is a conceptual step-by-step flow. This is exactly the level of understanding AI-102 expects.
You begin by selecting an agent-capable Azure AI resource that:
Supports your chosen LLM
Supports tool invocation
Meets your region, compliance, and cost requirements
Beginner mindset:
Defining an agent means configuring behavior, not writing application code.
You select:
A model that supports tool calling
A model with enough context length
A model whose latency and cost fit your use case
Exam tip:
System instructions define:
The role of the agent (for example: “You are an IT support assistant.”)
Behavioral boundaries (“Do not perform destructive actions without confirmation.”)
Safety expectations (“If unsure, ask for clarification.”)
These instructions guide all decisions the agent makes.
You define:
Tool name
Input schema (required fields, data types)
Output schema (what the tool returns)
Key beginner concept:
The model does not “guess” how to call your API.
It follows the schema you provide.
If your agent uses retrieval:
You connect it to a search index or data source
You define how and when retrieval is used
This is common when combining agents + RAG.
Your application:
Sends the user message
Optionally sends context (user ID, session data)
Receives:
the final response,
and often a trace of tool calls (for debugging and monitoring)
Important:
The agent runtime handles the internal loop.
Your app simply consumes the result.
This is where many beginners forget exam-relevant details.
You should consider:
Logging and telemetry: what actions did the agent take?
Rate limits: how often can users invoke the agent?
Cost controls: token limits, tool usage limits
Environment separation:
Development
Testing
Production
Exam pattern:
Function calling is one of the most tested concepts in agentic solutions.
A tool schema is a contract between the model and your system.
A good schema:
Clearly defines required vs optional fields
Uses precise data types (string, number, enum)
Restricts allowed values when possible
Beginner example:
Instead of priority: string
Use priority: enum { Low, Medium, High }
This reduces errors and improves reliability.
Even if the model usually behaves well:
Never trust inputs blindly
Validate inputs before executing real-world actions
Why this matters:
Protects against malformed requests
Protects against prompt injection
Prevents accidental destructive actions
Tool outputs should also be structured:
Clear success/failure indicators
Error codes and messages
Minimal but sufficient data
The model can then:
Reason about what happened
Decide the next step correctly
Tool routing is how the agent decides which tool to call and in what order.
The agent:
Example:
Tool: SearchKnowledgeBase
If confidence is low → call tool
If question is general → answer directly
This is the simplest agent pattern.
The agent:
Example:
Search tool
Ticket creation tool
User profile tool
The agent must:
Identify intent
Select the correct tool
Populate the correct schema
The output of one tool becomes input to another.
Example chain:
Search documents
Summarize results
Create a support ticket with the summary
Beginner caution:
Chaining increases power, but also increases failure points.
Always include clear stopping conditions.
Agents must expect failure as a normal condition.
Tool timeouts
Partial or empty results
External systems returning inconsistent data
Schema mismatches
Permission or authorization errors
Retries with backoff: retry a few times for transient failures
Fallback tools: try another data source if the primary one fails
Ask the user: request missing or ambiguous information
Safe partial completion:
Explain what succeeded
Explain what failed
Provide next steps
Exam insight:
A “good” agent does not hide failures.
It communicates clearly and safely.
Multi-agent solutions are advanced, but the exam expects you to understand when they are appropriate.
Use multiple agents when:
The task is complex and naturally decomposed
Different steps require different permissions
Different expertise is needed
Beginner example:
One agent plans the solution
Another agent executes actions
A third agent validates compliance
A manager agent:
Breaks down the task
Assigns work to worker agents
Worker agents:
Execute specialized tasks
Return results
This pattern improves clarity and control.
Agents work in sequence:
Draft
Verify
Execute
This is common in:
Content generation with compliance checks
Data extraction followed by validation
Multiple agents propose solutions
A final agent evaluates and selects the best one
Exam note:
This pattern is powerful but expensive.
Cost and latency must be justified.
Multi-agent systems introduce new risks.
You must consider:
Shared vs isolated state: what do agents see?
Cost explosion: many agents × many turns
Conflict resolution: agents disagree
Deterministic termination: avoid infinite loops
AI-102 scenarios often ask:
“How do you prevent uncontrolled execution?”
Agentic RAG extends traditional RAG by allowing the agent to:
Retrieve information multiple times
Refine queries
Validate answers
Compared to classic RAG:
Classic RAG: retrieve once, answer once
Agentic RAG: retrieve → reason → retrieve again → answer
This is useful when:
Data is complex
Precision matters
Permissions vary by user
Common choices:
Azure AI Search index
Internal APIs
Databases
Keyword search for exact matches
Semantic search for meaning
Vector search for similarity
Hybrid for best coverage
How documents are split:
By headings
By semantic boundaries
With overlap to preserve context
Poor chunking leads to poor answers.
Agents should:
Track document IDs
Reference sources in the final response
Avoid inventing citations
This is especially important in enterprise scenarios.
Beginner principle:
Treat all retrieved content as untrusted.
Defenses include:
Strict tool schemas
Server-side validation
Approval steps for sensitive actions
Allowlists for tool usage
Agents must respect:
User identity
User permissions
Data-level security
Examples:
Row-level security in databases
Document-level ACLs in search
Identity-based authentication for APIs
Never:
Embed secrets in prompts
Hardcode credentials in tool definitions
You may need to:
Filter harmful content
Redact sensitive information
Refuse disallowed requests politely
Exam insight:
Safety is not optional.
It is part of the system design.
You should measure:
Task success
Correct tool usage
Grounding accuracy
Safety compliance
Latency and cost
Testing should include:
Unit tests for tools
Integration tests with mocked systems
Scenario tests (normal and adversarial)
Regression tests to catch behavior drift
A production-ready agent:
Logs tool calls
Tracks errors
Correlates sessions
Alerts on unusual behavior
This ensures:
Faster debugging
Better reliability
Safer deployments
This section explains how to correctly define an agent before it ever runs. In AI-102, many mistakes come from poorly defined agents rather than weak models. Think of this as “agent design hygiene”.
An agent must have a clear identity, just like a human employee in an organization.
You should explicitly define:
Who the agent is (for example: IT support assistant, HR policy assistant)
What domain it operates in
What type of help it provides
A clear role prevents the model from attempting tasks outside its expertise.
Example:
Role: “Internal IT support assistant”
Domain: “Company IT systems and policies”
Audience: “Authenticated employees only”
Primary tasks are what the agent is expected to do regularly.
Examples:
Answer IT policy questions
Check system status using tools
Create support tickets when appropriate
These tasks guide tool selection and workflow design.
Out-of-scope tasks are equally important.
Examples:
Legal advice
Financial decision-making
Actions affecting payroll or contracts
Explicitly stating what the agent must not do reduces unsafe behavior.
You should define constraints on outputs, such as:
Informational guidance only
No professional or legal advice
No commitments or guarantees
This is critical for compliance and risk management.
Termination rules define when the agent should stop.
Examples:
Stop after providing a final answer
Ask a follow-up question if required data is missing
Stop and escalate if the request is disallowed
Without termination rules, agents may loop or overreach.
Agents follow instructions from different sources. Understanding priority is essential.
A standard hierarchy is:
System instructions – highest priority, non-negotiable
Developer instructions – workflow and behavior rules
User instructions – goals and requests
System instructions always override everything else.
These define:
Safety rules
Compliance constraints
Absolute prohibitions
Example:
These define:
How the agent should work
Preferred workflows
Tool usage patterns
Example:
User requests express intent, but:
They can be incomplete
They can be unsafe
They can conflict with policies
The agent must interpret them within system and developer constraints.
You should clearly define policies for:
When to use tools (for accuracy, freshness, authority)
When to ask for missing details (IDs, dates, permissions)
When to refuse or escalate (disallowed or risky requests)
This reduces ambiguity and improves predictable behavior.
Tools are powerful and dangerous if misconfigured.
An agent should only know about explicitly approved tools.
No dynamic or implicit tool access
Each tool has a clear purpose
This limits accidental or malicious actions.
Each tool should have:
Only the permissions it absolutely needs
No access to unrelated systems or data
Example:
For each tool, define:
Allowed parameter ranges (for example, date limits)
Restricted tenants, subscriptions, or resources
Rate limits to prevent abuse or runaway loops
Constraints protect systems even if the agent makes mistakes.
Memory is a system design decision, not a model feature.
Used for:
Current conversation
Current plan
Recent tool outputs
This state is usually temporary and session-scoped.
Used for:
User preferences
Stable facts that persist across sessions
Long-term memory must be:
Explicitly justified
Carefully governed
Often optional
These are structured logs of:
Tool calls
Decisions
Errors
They support debugging, audits, and evaluations.
You must define:
How long data is stored
When it is deleted
Who can access it
This is important for compliance and trust.
You must decide:
What personal data is allowed
How it is redacted
Whether consent is required
How data is encrypted and protected
Agents should never freely store sensitive personal data.
Agents must know what data they are allowed to use.
Examples:
Search indexes
Knowledge bases
Databases
Each agent should have an explicit list of allowed sources.
Define:
Which indexes or collections are accessible
Whether cross-domain access is allowed
This prevents data leakage.
If data is unavailable:
The agent should say so
It should not guess or hallucinate
When retrieved data is weak:
The agent should express uncertainty
It may ask follow-up questions
It may provide partial answers
If citations are required:
The agent must track source IDs
The agent must not invent sources
This is critical in enterprise and compliance contexts.
Frameworks exist to manage complexity.
A framework becomes necessary when:
Workflows have many steps
Tool usage branches based on conditions
Retry and fallback logic is complex
Tools evolve over time
Multiple agents must coordinate
Simple agents do not require frameworks. Complex ones usually do.
You are expected to understand concepts, not APIs.
Reusable capabilities that:
Encapsulate business logic
Can be added or removed independently
Components that:
Break a goal into steps
Decide execution order
Mechanisms to:
Store session data
Store memory
Track progress
Standardized ways to connect to:
Search services
Storage
Databases
Enterprise systems
Combines:
Deterministic steps (fixed order)
Model-driven decisions (conditional logic)
Frameworks improve:
Separation of concerns
Testability
Maintainability
Observability
From an exam perspective, frameworks are justified when manual orchestration becomes error-prone.
Enterprise agents must safely support many users.
Each user must have:
Separate session state
Separate memory
Separate permissions
Session identifiers and per-user storage prevent data leakage.
Tools must authenticate using:
Delegated user identity, or
Application identity
Regardless of method:
Tools must enforce row-level and document-level security
Search results must reflect user permissions
Some actions are too risky to automate.
High-risk actions include:
Financial transactions
Deletions
Permission changes
External communications
A common pattern is:
Suggest the action
Ask for confirmation
Execute only after approval
Agents can operate at different autonomy levels:
Advisory only
Action with confirmation
Fully autonomous (low-risk only)
Choosing the right level is a design decision.
Production readiness is a core AI-102 theme.
You should version:
Prompts
Tool schemas
Agent configuration
Retrieval settings
Changes should move through:
Development
Testing
Production
Tests should cover:
Normal scenarios
Edge cases
Adversarial inputs
Tool failures
You must verify that the agent:
Chooses correct tools
Uses correct parameters
Stops appropriately
Refuses unsafe requests
Consistently measure:
Task success
Tool accuracy
Grounding accuracy
Safety outcomes
Latency and cost
Metrics turn subjective behavior into measurable quality.
Safeguards include:
Token and tool limits
Circuit breakers
Rollback strategies
Monitoring alerts
These prevent runaway failures.
You should define responses for:
Tool outages
Retrieval degradation
Model behavior drift
Security incidents
Operational readiness is part of system design, not an afterthought.
In an agent-based architecture using Azure OpenAI, what determines when the model calls a tool or function?
The model decides to call a tool based on the prompt instructions and tool definitions provided in the request.
When tools or functions are defined in an Azure OpenAI request, the model evaluates the user query and determines whether invoking a tool would help complete the task. This decision is guided by the tool descriptions, parameters, and system instructions included in the prompt. If the model determines that external information or actions are required—such as retrieving data or executing a calculation—it can generate a function call containing the relevant parameters. The application then executes the function and returns the result to the model for further reasoning. Clear tool descriptions and well-structured prompts improve the reliability of agent tool selection.
Demand Score: 62
Exam Relevance Score: 76
Why might an AI agent repeatedly call the same tool without producing a final response?
The agent lacks termination conditions or proper prompt instructions to end the tool loop.
Agent frameworks typically follow a loop in which the model decides whether to call a tool or produce a final answer. If the prompt does not specify when to stop calling tools, the model may repeatedly generate tool calls while attempting to refine the result. This creates a tool execution loop. Developers often prevent this by adding explicit stopping criteria in the system prompt or by limiting the number of tool iterations allowed in the orchestration logic. Clear instructions about when to return a final answer help the agent transition from tool usage to response generation.
Demand Score: 58
Exam Relevance Score: 71
Why might a multi-step AI agent fail when attempting to chain multiple tool calls?
The orchestration layer may not correctly pass tool outputs back to the model for subsequent reasoning.
Agent architectures rely on a feedback loop in which the model generates a tool call, the application executes the tool, and the result is returned to the model as additional context. If the orchestration logic fails to include the tool output in the next prompt or message sequence, the model cannot use the result for further reasoning. This prevents the agent from completing multi-step tasks that depend on previous tool outputs. Developers designing agent systems must ensure that tool responses are correctly appended to the conversation context so the model can incorporate them in the next reasoning step.
Demand Score: 56
Exam Relevance Score: 70