{"id":2695,"date":"2026-10-08T15:11:12","date_gmt":"2026-10-08T15:11:12","guid":{"rendered":"https:\/\/www.exam-topics.info\/blog\/microsoft-ai-103-building-agents-in-foundry\/"},"modified":"2026-10-20T09:47:54","modified_gmt":"2026-10-20T09:47:54","slug":"microsoft-ai-103-building-agents-in-foundry","status":"publish","type":"post","link":"https:\/\/www.exam-topics.info\/blog\/microsoft-ai-103-building-agents-in-foundry\/","title":{"rendered":"Microsoft AI-103: Building Agents in Foundry"},"content":{"rendered":"<div class=\"et-b01-editorial-v2\">\n<p>A claims assistant may read a policy, compare records and draft a decision, but it must not approve its own payment. The distinction between a useful agent and an overprivileged chatbot is not the sophistication of its prompt; it is the boundary between model-selected work and actions controlled by the application. Microsoft Foundry provides managed agent capabilities, but <a href=\"https:\/\/www.exam-topics.info\/blog\/microsoft-foundry-agent-architecture-from-prototype-to-production\/\">production agent architecture<\/a> still requires deliberate decisions about business identity, tool authorization and proof of completion.<\/p>\n<p>Begin with a narrow role. Define the information an agent may inspect, the tools it may propose, the state it must preserve and the situations that require an approval or handoff. A knowledge connection can supply evidence while a function tool performs a permitted operation. Those are different responsibilities. Giving an agent too many broadly described tools makes routing less reliable and increases the cost of testing every consequential path.<\/p>\n<p>In <a href=\"https:\/\/www.exam-topics.info\/ai-103\">Microsoft AI-103<\/a>, designing an agent means specifying both what the model should attempt and what trusted code must enforce. A proposed refund tool call needs validated arguments, a caller permission check, an idempotency key and a way to distinguish a rejected action from an uncertain write. The <a href=\"https:\/\/www.exam-topics.info\/blog\/microsoft-ai-103-foundry-sdk-development\/\">Foundry SDK integration<\/a> layer should expose those decisions as explicit contracts, rather than granting the agent whatever the service credential can do.<\/p>\n<h2>Start with a role and a bounded responsibility<\/h2>\n<p>A useful agent begins with a clear job. \u201cHelp with everything\u201d is not a production requirement. A support agent may be responsible for diagnosing product issues, searching documentation and preparing a response. An operations agent may investigate an alert, collect evidence and recommend a remediation without being allowed to execute the change.<\/p>\n<p>The narrower role makes instructions, tools and evaluation much easier to design. It also limits blast radius. If an agent&#8217;s purpose is read-only analysis, it does not need write access simply because a downstream API supports it.<\/p>\n<p>Good instructions define objectives, decision rules, escalation conditions and what the agent should do when it lacks enough information. They should not attempt to encode every possible path. Deterministic rules belong in application logic where possible; the agent should be used for the decisions that genuinely require interpretation.<\/p>\n<h2>Tool schemas are part of the agent&#8217;s reasoning environment<\/h2>\n<p>Tools make an agent capable of taking action, which makes the surrounding contract more important than the natural-language instruction. A refund tool should accept a typed order identifier and maximum amount, reject malformed values, bind authorization to the actual caller, and record an idempotency key before the payment workflow is attempted. If the tool times out after dispatch, the agent must query the transaction state or return an explicit unknown outcome; it must not assume failure and send a duplicate refund.<\/p>\n<p>A strong tool has a clear name, a narrow purpose and a schema that makes invalid actions difficult. If two tools overlap heavily, the model has a harder selection problem. If one tool exposes dozens of unrelated operations, permissions and error handling become more difficult to reason about.<\/p>\n<p>Descriptions matter because the model uses them when deciding whether and how to call a tool. The application should also validate arguments deterministically. A model-generated tool call is a proposal; normal software validation still applies before an external system is changed.<\/p>\n<h2>Knowledge and tools solve different problems<\/h2>\n<p>Knowledge sources help the agent answer questions from private or changing information. Tools let the agent perform an action or fetch structured runtime data. These capabilities can overlap, but they are not interchangeable.<\/p>\n<p>A policy handbook may belong in retrieval so the agent can cite the applicable rule. A current account balance should normally come from an authorized system call rather than a document index. Product documentation can be retrieved, while a ticket update should go through a tool with explicit permissions.<\/p>\n<p>The architecture becomes clearer when every connection is classified as evidence or action. Evidence informs reasoning. Actions change or query the environment. The security controls around actions usually need to be stricter.<\/p>\n<h2>Conversation state needs a deliberate design<\/h2>\n<p>Agents often operate across multiple turns, which means state accumulates. The system may need conversation history, task progress, tool results, user preferences or external state. Simply replaying an unlimited conversation into every request is expensive and can make important details harder to identify.<\/p>\n<p>State can be summarized, stored externally or separated into durable and temporary components. A long-running task may keep a concise plan and retrieve details as needed rather than carrying every previous token. The right approach depends on whether exact past wording matters and how long the task is expected to run.<\/p>\n<p>State is also a privacy boundary. Applications should retain only what is needed, apply the correct access controls and avoid mixing one user&#8217;s context into another user&#8217;s session.<\/p>\n<h2>Identity should be designed before the agent is given power<\/h2>\n<p>Foundry agents can operate with Microsoft Entra identity and Azure RBAC. This allows a system to access Azure resources without embedding reusable secrets in prompts or application configuration. The principle is straightforward: the agent should receive only the permissions required for its role.<\/p>\n<p>Read and write capabilities should be separated where possible. An investigation agent may need to read logs but not delete resources. A deployment agent may be able to modify a narrow resource group but not the entire subscription. If a tool can act on behalf of a user, the application must understand the difference between the agent&#8217;s service identity and delegated user authority.<\/p>\n<p>This is the same least-privilege discipline used elsewhere in Azure, and it is one reason AI engineering increasingly overlaps with cloud security and platform engineering.<\/p>\n<h2>Approval flows are part of agent architecture<\/h2>\n<p>Not every action should be autonomous. A well-designed agent can gather evidence, prepare a plan and then pause before an irreversible step. Approval boundaries work best when they are tied to consequence rather than inserted after every tool call.<\/p>\n<p>The approval request should include context: what action is planned, which resource or record will change, why the agent wants to perform it and what the expected result is. This makes the human checkpoint meaningful.<\/p>\n<p>Consequential tools need explicit approval and an authoritative commit boundary. If an agent drafts a payment or changes an access request, persist the proposed operation separately from execution, record who approved it and reject replayed or modified requests. A sentence in a system prompt cannot stand in for the state transition enforced by the payment or identity service.<\/p>\n<h2>Agent reliability depends on explicit failure behavior<\/h2>\n<p>Tools fail. APIs return rate limits. Search results can be empty. A model may choose a poor tool or produce malformed arguments. The agent needs a recovery strategy instead of assuming every step works on the first attempt.<\/p>\n<p>A refund agent illustrates why a correct-looking answer is insufficient. Suppose a tool request times out after the payment service may have accepted a refund. The agent must not promise success or blindly repeat the write. Trusted application code checks an idempotency key, queries the permitted transaction state and returns a typed outcome such as completed, rejected or needs-review. Test this ambiguous-result path with an injected timeout and verify that no duplicate refund is created. Tool authorization and recovery are application duties, not expectations assigned solely to a prompt.<\/p>\n<p>Some failures justify a retry with backoff. Others require a different tool, a revised query or human escalation. The architecture should distinguish transient failures from semantic failures. Repeating the same wrong action three times is not resilience.<\/p>\n<p>Stopping conditions matter too. An agent that can keep calling tools indefinitely can consume cost and create cascading side effects. Limits on turns, tool calls or elapsed time provide a deterministic safety net around probabilistic behavior.<\/p>\n<h2>Testing must cover the trajectory, not just the response<\/h2>\n<p>An agent can reach the correct final answer through an unacceptable path. It may call a restricted tool, expose sensitive context or require far more steps than necessary. Evaluations should therefore capture the sequence of actions as well as the final state.<\/p>\n<p>Useful test cases include successful paths, missing information, conflicting evidence, tool errors, denied permissions and malicious content returned by tools. Tracing can reveal which model calls and tool decisions caused a failure, while evaluation metrics can track task completion, safety and efficiency over time.<\/p>\n<p>Production monitoring then extends those tests to real traffic. Latency, token use, tool error rate, approval frequency and evaluation outcomes help teams understand whether an agent is behaving as designed.<\/p>\n<h2>Single-agent simplicity should be the default<\/h2>\n<p>It is easy to assume that a sophisticated workload needs several specialized agents. Often one well-designed agent with a focused tool set is easier to operate. Multi-agent systems become useful when tasks can genuinely be decomposed, parallelism creates value or different workers need distinct permissions and instructions.<\/p>\n<p>An agent that begins as a single-worker assistant should not be split into specialists merely because a framework makes delegation easy. <a href=\"https:\/\/www.exam-topics.info\/blog\/microsoft-ai-103-multi-agent-orchestration\/\">Multi-agent orchestration<\/a> becomes useful when separate responsibilities, evidence sources or permission levels justify handoffs. Before granting either worker access to an external system, examine the risks of retrieved instructions and tool outputs; The <a href=\"https:\/\/www.exam-topics.info\/blog\/microsoft-ai-103-securing-ai-workloads\/\">AI workload security<\/a> threat model treats instructions from retrieved pages and tool outputs as untrusted data even when the resulting response sounds plausible. A strong design proves what the agent cannot do as carefully as it proves what it can.<\/p>\n<p>That distinction is important for AI-103. Foundry provides rich agent capabilities, but the exam skill is not maximizing the number of components. It is matching the architecture to the requirement.<\/p>\n<p>The test of a production agent is not how fluently it explains its plan but whether the application can account for every sensitive tool action. Keep the record of the caller identity, allowed tool scope, submitted arguments, application validation result and resulting transaction ID. That evidence lets operators distinguish a rejected request from an uncertain or completed external write and revise the workflow without relying on the model\u2019s recollection.<\/p>\n<p>Instructions often become difficult to maintain when hard policy, workflow hints and writing preferences are mixed into one long prompt. A better design separates rules the agent must never violate from strategy it can adapt as the task changes. Deterministic application checks should enforce non-negotiable constraints whenever possible.<\/p>\n<p>This separation improves testing. Policy failures can be evaluated independently from task-planning quality. Developers can refine how the agent searches or summarizes without accidentally weakening permission or approval behavior.<\/p>\n<p>It also makes versioning meaningful. When the agent changes, the team can identify whether the change affected instructions, tools, knowledge or runtime configuration. That traceability matters when a production regression appears after a deployment.<\/p>\n<h2>Production agents need lifecycle management<\/h2>\n<p>An agent evolves after release. Tool APIs change, data sources move, prompts improve and models are updated. Versioning makes it possible to compare behavior and roll back when a change creates a regression.<\/p>\n<p>Publishing should therefore be treated like application deployment. Stable endpoints, controlled versions, test environments and release gates reduce the risk of editing a production agent directly. The operational owner should know which agent version handled a request and which configuration was active at the time.<\/p>\n<p>That lifecycle discipline is part of what turns Foundry Agent Service from a prototyping environment into a production platform.<\/p>\n<p>Large enterprise agents can accumulate dozens of integrations. Exposing every tool to every request increases context and creates more ambiguous choices. Toolboxes, routing or staged discovery can keep the active capability set focused.<\/p>\n<p>The design goal is not maximum tool count. It is giving the agent the right capabilities at the point they are needed, with descriptions and permissions precise enough that tool selection remains reliable.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>A claims assistant may read a policy, compare records and draft a decision, but it must not approve its own payment. The distinction between a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38],"tags":[],"class_list":["post-2695","post","type-post","status-publish","format-standard","hentry","category-microsoft"],"_links":{"self":[{"href":"https:\/\/www.exam-topics.info\/blog\/wp-json\/wp\/v2\/posts\/2695","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.exam-topics.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.exam-topics.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.exam-topics.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.exam-topics.info\/blog\/wp-json\/wp\/v2\/comments?post=2695"}],"version-history":[{"count":6,"href":"https:\/\/www.exam-topics.info\/blog\/wp-json\/wp\/v2\/posts\/2695\/revisions"}],"predecessor-version":[{"id":1001428,"href":"https:\/\/www.exam-topics.info\/blog\/wp-json\/wp\/v2\/posts\/2695\/revisions\/1001428"}],"wp:attachment":[{"href":"https:\/\/www.exam-topics.info\/blog\/wp-json\/wp\/v2\/media?parent=2695"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.exam-topics.info\/blog\/wp-json\/wp\/v2\/categories?post=2695"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.exam-topics.info\/blog\/wp-json\/wp\/v2\/tags?post=2695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}