AI and Machine Learning Microsoft Foundry premium

Agent run

Agent run is one execution of an agent against a thread, during which the agent reads messages, reasons, may call tools, and produces output. Teams use it to track what an agent attempted, what tools it used, whether it completed, and why a response was produced. The useful evidence is thread ID, run ID, agent ID, status, timestamps, tool calls, model choice, errors, usage, and final messages. Treat it as an operating handle: know who owns it, which boundary it affects, what could break, and which Azure output proves the current state before production.

Aliases
Foundry agent run, AI agent run, thread run
Difficulty
intermediate
CLI mappings
4
Last verified
2026-05-09

Microsoft Learn

An agent run is the execution of an agent against a thread in the classic Foundry Agent Service model. During a run, the agent reads thread messages, applies its model, instructions, and tools, may request tool outputs, and appends new messages or responses as it works toward completion.

Microsoft Learn: Threads, Runs, and Messages in Foundry Agent Service2026-05-09

Technical context

In Azure architecture, Agent run sits in the conversational AI runtime layer in Microsoft Foundry Agent Service, between persistent threads and model or tool execution. It works with agents, threads, messages, tools, model deployments, tracing, application code, content filters, and operational logs. The important distinction is whether the reader is inspecting configuration, runtime behavior, identity, billing, or observability evidence. A strong design records scope, owner, permissions, monitoring signal, and rollback path so the term can be checked consistently across development, test, and production environments.

Why it matters

Agent run matters because it turns an Azure label into a decision point that operators can inspect, govern, and improve. Used well, it keeps work tied to evidence such as thread ID, run ID, agent ID, status, timestamps, tool calls, model choice, errors, usage, and final messages. Used poorly, operators may be unable to explain an answer, replay a failure, or prove whether a tool call happened safely. The practical value is judgment: knowing which setting or record proves reality, which team owns the next action, and which failure mode to check first during a release, audit, incident, or cost review. Good entries make that decision path clear enough for production use.

Where you see it

Signals, screens, and Azure surfaces where this term usually becomes operational.

Signal 01

In the Azure portal or Microsoft Foundry/Azure service UI where Foundry project, agent, thread, run, message, tool call, and run status is configured.

Signal 02

In Azure CLI, SDK, REST, or ARM/Bicep evidence used to inspect the supporting resources.

Signal 03

In governance workbooks, incident reviews, architecture diagrams, and runbooks where ownership and state are documented.

When this becomes relevant

Specific situations where this term helps solve real Azure design, operations, migration, security, reliability, cost, or governance problems.

  • Execute an AI agent against a user conversation
  • Track tool-backed response generation
  • Debug waiting or failed agent work
  • Correlate agent behavior with application sessions

Real-world case studies

Different enterprise-style examples that show the term being used to hit measurable objectives.

Case study 01

Agent run in action

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

Contoso Wealth Advisory, a financial services firm, needed auditable AI assistant executions for advisor support while preventing untracked tool actions.

Business/Technical Objectives
  • Track each assistant response with run ID and thread ID
  • Capture tool-call evidence for compliance review
  • Reduce failed assistant interactions by 30 percent
  • Escalate incomplete or errored runs to human support
Solution Using Agent run

The engineering team used Agent run records as the operational evidence for every advisor-assistant interaction. Application code created a run against the client-service thread, polled status, and logged run IDs, timestamps, model configuration, and tool-call results. Runs that required tool output were tied to approved portfolio-data tools, while failed or expired runs opened a support ticket with sanitized context. Compliance reviewers received a dashboard that connected final messages to the run and thread that produced them.

The team also added owner tags, a rollback note, and a validation checklist so support, security, and finance reviewers could repeat the pattern without rebuilding the design from memory.

Results & Business Impact
  • Failed assistant interactions dropped 34 percent after retry rules were tuned
  • Compliance reviewers could trace responses in under 2 minutes
  • Tool-call errors were reduced by 41 percent
  • No untracked production tool action was found during audit
Key Takeaway for Glossary Readers

An Agent run is the unit of evidence that explains what an agent tried, what it called, and whether the interaction completed safely.

Case study 02

Agent run in action

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

Kinetic Field Services, a equipment-maintenance provider, wanted a technician assistant that could summarize manuals and create work-order notes without hiding execution failures.

Business/Technical Objectives
  • Show technicians whether an AI request was completed or still running
  • Log tool calls to maintenance-document search and work-order APIs
  • Reduce repeated prompts caused by unclear agent status
  • Keep failed runs from creating partial work-order updates
Solution Using Agent run

The mobile engineering team treated Agent run status as a first-class workflow signal. When a technician asked for a repair summary, the app created a run, displayed progress, and waited for completion before allowing work-order updates. Tool calls to Azure AI Search and the work-order API were recorded as run steps, and failed runs were retried only for read-only retrieval steps. Side-effecting work-order updates required a completed run plus user confirmation, preventing partial actions from confusing dispatchers.

The team also added owner tags, a rollback note, and a validation checklist so support, security, and finance reviewers could repeat the pattern without rebuilding the design from memory.

Results & Business Impact
  • Repeated technician prompts fell 47 percent
  • Partial work-order updates were eliminated during the pilot
  • Average assistant response time stabilized at 9 seconds
  • Dispatch escalations for AI workflow errors dropped by 32 percent
Key Takeaway for Glossary Readers

Agent run state protects users from guessing whether an AI workflow is still working, failed, or safe to continue.

Case study 03

Agent run in action

Scenario, objectives, solution, measured impact, and takeaway.

Scenario

Orchid Benefits Group, a employee-benefits administrator, needed to monitor HR policy assistant executions during open-enrollment season.

Business/Technical Objectives
  • Handle 25,000 weekly assistant questions with traceable runs
  • Identify slow tool calls before they affected employees
  • Separate policy-answer failures from application-session failures
  • Create sanitized evidence for support tickets
Solution Using Agent run

The platform team instrumented every assistant request with an Agent run ID and stored run metadata in Application Insights. Runs used a policy-search tool, a benefits-plan lookup API, and strict status handling so incomplete runs never returned unsupported answers. Support agents could search by user session, thread ID, or run ID and see whether the agent was waiting on retrieval, failed validation, or completed normally. The team reviewed slow runs daily and adjusted retrieval limits before open-enrollment traffic peaked.

The team also added owner tags, a rollback note, and a validation checklist so support, security, and finance reviewers could repeat the pattern without rebuilding the design from memory.

That evidence became part of the release packet and monthly service review, which made the operating model easier to defend during audits.

Results & Business Impact
  • Assistant support tickets were resolved 43 percent faster
  • Slow policy-search tool calls were reduced by 29 percent
  • Open-enrollment traffic peaked without run backlog alerts
  • Support evidence excluded employee personal data by design
Key Takeaway for Glossary Readers

Agent runs make AI support workflows observable enough for production support, not just demos.

Why use Azure CLI for this?

Azure CLI is useful for Agent run because it turns portal knowledge into repeatable evidence. Agent run work is usually SDK or REST driven; CLI helps inspect surrounding Azure resources, identities, and logs. Use CLI when you need inventory, comparison between environments, release notes, audit proof, or a safe pre-change check. Prefer read-only commands first, save structured output when possible, and treat mutating commands as change-controlled work with subscription, resource group, identity, and rollback details verified before execution.

CLI use cases

  • Inventory the Azure resources or records related to Agent run and confirm the expected scope.
  • Inspect thread ID, run ID, agent ID, status, timestamps, tool calls, model choice, errors, usage, and final messages before a release, audit, incident review, or cost discussion.
  • Compare development, test, and production settings so drift is visible before users are affected.
  • Export structured evidence for tickets, runbooks, compliance reviews, or post-incident timelines.

Before you run CLI

  • Confirm the signed-in tenant, subscription, resource group, and target resource name before trusting output.
  • Check whether the command is read-only, mutating, credential-revealing, or potentially destructive.
  • Use the least-privileged identity that can inspect the resource and avoid pasting secrets into shared channels.
  • Decide the output format first, usually table for humans and JSON for automation or saved evidence.
  • Know the rollback or revoke path before running any command that changes state or permissions.

What output tells you

  • The output should identify the current Azure scope and show whether Agent run is configured, active, enabled, or producing evidence.
  • Status, timestamps, IDs, names, and related resource references help connect Agent run to a real owner and workload.
  • Empty output is still evidence: it may mean the feature is disabled, the wrong scope was queried, or the caller lacks permission.
  • Differences between environments usually point to drift, incomplete deployment, stale configuration, or an undocumented exception.

Mapped Azure CLI commands

Agent run operator commands

direct
az cognitiveservices account list --resource-group <resource-group>
az cognitiveservices accountdiscoverAI and Machine Learning
az cognitiveservices account deployment list --name <account> --resource-group <resource-group>
az cognitiveservices account deploymentdiscoverAI and Machine Learning
az search service show --name <search-service> --resource-group <resource-group>
az search servicediscoverAI and Machine Learning
az storage account show --name <storage-account> --resource-group <resource-group>
az storage accountdiscoverStorage

Architecture context

In Azure architecture, Agent run sits in the conversational AI runtime layer in Microsoft Foundry Agent Service, between persistent threads and model or tool execution. It works with agents, threads, messages, tools, model deployments, tracing, application code, content filters, and operational logs. The important distinction is whether the reader is inspecting configuration, runtime behavior, identity, billing, or observability evidence. A strong design records scope, owner, permissions, monitoring signal, and rollback path so the term can be checked consistently across development, test, and production environments.

Security

Security for Agent run starts with knowing the access boundary it creates or exposes. Review prompt and message data, tool permissions, identity context, audit logging, and controls around actions the run can trigger before trusting the configuration in production. Least privilege, source verification, and clear ownership matter because a small Azure setting can change who can read data, trigger actions, approve permissions, or serve user traffic. Security teams should capture evidence in tickets or runbooks without leaking secrets, tokens, sensitive payloads, or customer data. When possible, pair the term with Microsoft Entra roles, managed identities, policy, logging, and alerting so changes are visible, reviewable, and reversible.

Cost

Cost impact for Agent run may be direct or indirect, but it should still be explicit. The main cost consideration is that each run can consume model tokens, tool execution, search, code execution, and downstream service calls. Even when the term is not a billing meter, it can influence the services, retries, alerts, storage, model tokens, compute, or operations effort consumed around it. FinOps review should ask whether the setting is needed, who pays for it, how long evidence is retained, and whether tags, budgets, exports, or Advisor data make the spend explainable. Review the pattern whenever environments are cloned, scaled, or retired.

Reliability

Reliability depends on how Agent run behaves during failure, scale, retries, and change windows. The main reliability concern is run status and error details determine whether the user interaction completed, stalled, required tool output, or should be retried. Operators should know whether the term affects runtime traffic, orchestration state, alert delivery, recovery evidence, or only management-plane reporting. Before changing it, confirm the rollback path, expected health signal, blast radius, and dependency map. During incidents, use the term to narrow the question: what changed, what is active, what failed, and what evidence proves that the system can safely continue or recover? Keep that evidence close to the change record.

Performance

Performance impact for Agent run depends on where it sits in the workload path. The main performance factor is run latency depends on model reasoning, tool round trips, retrieval, code execution, queueing, and response size. Some terms do not speed the application directly, but they improve operational performance by reducing investigation time, noisy processing, or manual triage. Review latency, throughput, queue depth, query shape, token usage, retry behavior, and data volume where they apply. The best test is practical: can the team prove the term improves user experience, deployment speed, incident response, or processing efficiency without hiding a new bottleneck? Measure before and after; assumptions are not evidence.

Operations

Operationally, Agent run should be part of a repeatable runbook, not a portal-only memory. Teams need a standard way of creating runs, polling status, inspecting steps, reviewing tool calls, and connecting application traces to agent behavior. The runbook should name the Azure scope, owner, required role, normal state, change procedure, evidence to collect, and escalation path. Good operators also record why a value exists, not just what it is. That context prevents accidental cleanup, noisy alerts, unsafe reruns, stale dashboards, and confusing handoffs between platform, application, data, security, and finance teams. It also makes later reviews faster and less political.

Common mistakes

  • Treating Agent run as a label instead of checking the Azure output that proves its current state.
  • Using the wrong tenant, subscription, project, database, or resource group and then trusting misleading results.
  • Saving sensitive keys, payloads, user data, or permission details in screenshots instead of sanitized evidence.
  • Changing production configuration without documenting the owner, rollback path, alert impact, and expected verification signal.