Sr. Content Developer at Microsoft, working remotely in PA, TechBash conference organizer, former Microsoft MVP, Husband, Dad and Geek.
161736 stories
·
33 followers

Microsoft Foundry Prompt Agents vs. Hosted Agents: What Are You Actually Choosing?

1 Share

You open Microsoft Foundry, choose a model, write instructions, attach a few tools, and create an agent. Then you discover Hosted Agents: agent applications built in code and deployed to Foundry.

Why would you choose the second approach? What does it give you that the agent you already created cannot do?

The difference is how much of the agent’s execution you control. With a prompt agent, you configure behavior that Foundry’s managed runtime executes. With a Hosted Agent, you supply the program that implements the behavior, and Foundry runs it.

Both approaches have a place in production. The architectural decision is deciding where configuration is sufficient and where your application needs direct control.

First, separate “portal versus code” from “prompt versus hosted”

The agent you create by selecting a model, writing instructions, and attaching tools is called a prompt agent.

You can create that same kind of agent programmatically through an SDK or REST API. Writing Python or C# to create it does not make it a Hosted Agent.

A Hosted Agent contains your own executable agent logic. You package that application for deployment, and Foundry provides the managed environment where it runs. Microsoft’s agent overview

Architectural choicePrompt agentHosted Agent
What you provideInstructions, model selection, tools, and configurationAn application implementing the agent
Execution logicFoundry’s managed implementationYour code and chosen framework
Agent application maintenanceNo custom agent runtime to maintainYour application and dependencies
Hosting and scalingManaged by FoundryManaged by Foundry
Main cost componentsModel and tool usageModel and tool usage, plus container compute

The portal is an authoring surface. Hosted Agents are an execution model. Those are different decisions. Compare agent types

A prompt agent can already do useful work

Consider a customer-support agent with access to product documentation and an order-status tool.

A customer asks, “Where is my order?” The agent can call the tool, interpret the response, and explain the delivery status. If the customer asks a follow-up question, the conversation can preserve the earlier context.

Foundry combines the agent’s configuration, conversation history, model interactions, and tool results. Tools extend the agent beyond generating text: they let it retrieve information and interact with external systems. Foundry runtime components

For many applications, this is exactly the right level of abstraction. You concentrate on instructions, tool quality, and evaluation instead of maintaining a custom agent application.

The question becomes more interesting when the sequence of work matters as much as the final answer.

Where a Hosted Agent becomes valuable

Imagine a supplier-selection assistant.

Initially, it needs to find suppliers, compare prices, and explain a recommendation. A prompt agent with appropriate tools is a reasonable starting point.

Then the requirements grow:

  1. Retrieve information from three systems.

  2. Run independent lookups concurrently.

  3. Exclude suppliers that fail eligibility checks.

  4. Use one model for extraction and another for analysis.

  5. Validate that every recommendation has supporting evidence.

  6. Save progress while waiting for purchasing approval.

  7. Submit an order only after that approval is recorded.

This example describes an application you would design; deploying a Hosted Agent does not automatically implement these steps.

What hosting gives you is a place to run the code that controls them. You can choose a framework such as Microsoft Agent Framework or LangGraph, implement branches and validation, and coordinate model and tool calls.

Hosted Agents also support custom dependencies, supported CPU and memory allocations, persistent session files, and protocols for interactions beyond conventional chat. Foundry supplies the surrounding endpoint, identity, scaling, and hosting infrastructure. Hosted-agent capabilities

The practical benefit is being able to express a requirement such as “validate eligibility before requesting approval” as an explicit execution path.

Custom business rules do not automatically require a Hosted Agent

There is a useful middle option: put strict rules inside the tools a prompt agent calls.

Suppose an agent can request a purchase. The purchasing API can reject every request that lacks a valid approval record. That rule remains enforceable regardless of what the model says.

This leads to a useful design question:

Does the logic belong inside one business operation, or does it coordinate the entire process?

If it belongs inside an operation, a prompt agent calling a well-designed tool may be sufficient. If it coordinates branching, retries, checkpoints, and multiple participants across the process, a Hosted Agent becomes more attractive.

For the supplier example, I would keep purchase authorization in the purchasing service even if a Hosted Agent coordinates the broader workflow.

Conversation history and workflow state are different

Remembering what a user said is different from remembering which parts of a business process have completed.

A supplier-selection workflow might need to preserve:

  • The suppliers already checked.

  • Evidence supporting each recommendation.

  • The current approval status.

  • A reference to an order already submitted.

Hosted-agent code can explicitly save this information. Microsoft’s durable state store provides storage for application data and framework checkpoints that survive container restarts. Your application decides what to write and when. An application-owned database or storage service is another option.

The durable state store is currently documented as preview. It does not automatically discover or preserve your application’s meaningful progress. Durable state store documentation

Long-running work still requires careful application design

Two requirements often get mixed together:

  • Continuing work after the initiating request disconnects.

  • Recovering work after the hosting process stops.

Background execution addresses the first. Resilient execution addresses the second.

Foundry’s hosted-agent resilience capabilities can preserve execution information and allow a handler to run again after an interruption. Your application still needs checkpoints or a safe way to repeat the work.

That distinction matters when actions have consequences. Recovering a purchasing workflow must not accidentally submit the same order twice.

Microsoft currently documents these resilience capabilities as preview. Hosting alone does not make an arbitrary workflow recoverable or guarantee that an external action happens exactly once. Long-running agent resilience

What changes for your development team?

A prompt agent can be edited and tested through the portal. Its configuration can also participate in a development pipeline.

For a Hosted Agent, changes to agent logic happen in the application code and are deployed as new versions. The portal still supports invoking, evaluating, monitoring, and publishing the agent, but it does not replace your development environment.

Versioning, evaluation, monitoring, and publishing are available across the agent lifecycle. You do not need to choose Hosted Agents merely to adopt disciplined production practices. Agent development lifecycle

Choose based on the control you need

My recommended starting points are:

Your requirementStart with
Answer questions using documents and toolsA prompt agent
Call business APIs with enforced rulesA prompt agent with custom tools
Automate agent creation and configurationA prompt agent defined through an SDK or API
Control a branching process across models and toolsA Hosted Agent
Run an existing custom agent applicationA Hosted Agent
Manage specialized execution state or input protocolsA Hosted Agent, after checking feature support

A useful test is to finish this sentence:

“I need my program to control ______ during the agent’s execution.”

A specific answer, such as model routing, checkpoint recovery, or coordination between specialist agents, gives you a concrete reason to evaluate Hosted Agents.

If your requirements are met by instructions, knowledge, and tools, a prompt agent can remain the right production architecture.

Need help choosing an approach or building the skills to implement it? Connect with The Training Boss for enterprise AI architecture and hands-on training.

The post Microsoft Foundry Prompt Agents vs. Hosted Agents: What Are You Actually Choosing? appeared first on The Training Boss.

Read the whole story
alvinashcraft
just a second ago
reply
Pennsylvania, USA
Share this story
Delete

Muse sure looks a lot like OpenClaw

1 Share

We seem to be entering into an AI agent renaissance. Meta's new consumer-facing AI agent, Muse, topped the App Store charts soon after its release and has 600,000 daily active users in the US, by an Apptopia estimate. And AI agent platform Instinct, whose eponymous creator is fundraising at a $2.5 billion valuation, has been making the rounds in the tech industry. Under the hood, though, there are some obvious similarities to the platform that started it all: OpenClaw.

For the past week or so, some social media users have alleged that Muse is directly built on OpenClaw. The two platforms use the same names for core files (SOUL.md, memory, …

Read the full story at The Verge.

Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete

The Xbox reset gets ugly

1 Share
Vector collage of the Xbox logo.

It feels like Xbox has been in a permanent state of turmoil for at least two years now, and this week is no different. Microsoft cut 268 jobs across its gaming division this week, shuffled major studios and franchises around, and continued its Xbox "reset."

Layoffs have become a way of life for Xbox employees, after Microsoft started cutting thousands in early 2024 and hasn't slowed down. The turmoil was particularly apparent when Microsoft started shutting down game studios, and the painful layoffs have had a lasting impact on morale, according to current and former Xbox employees I've been speaking to this week.

At the same time, Xbox h …

Read the full story at The Verge.

Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Introducing Gemini 3.8 Live with Live Avatar

1 Share
Introducing Gemini 3.8 Live with Live Avatar, which brings near real-time visual presence to Gemini’s conversational AI.
Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete

Agentic RAG and chat completion in the Microsoft SQL engine | Data Exposed

1 Share
From: Microsoft Developer
Duration: 7:35
Views: 662

Learn how you can use various capabilities within Microsoft SQL (SQL Server, Azure SQL, SQL DB in Fabric) to do things like chat completion, and integrate with Microsoft Foundry, Gateway, and Teams.

✅ Chapters:
0:22 SQL has vectors! But there's more
0:56 Making REST calls from Microsoft SQL
1:15 Make REST calls to models and return / process results with SQL
2:08 Demo
2:35 Building the prompt
3:08 Using ledger to have an immutable log
3:40 Tips and tricks for building this
4:08 The content safety and moderation with the gateway
4:45 Using Foundry SDK with SQL
5:20 Using the gateway to prevent prompt injection
6:00 Expose Foundry application from Microsoft Teams
6:50 More secure, less data movement

📌 Let's connect:
Twitter - Bob Ward, https://twitter.com/bobwardms
Twitter - Anna Hoffman, https://twitter.com/AnalyticAnna
Twitter - AzureSQL, https://aka.ms/azuresqltw

🔴 Watch even more Data Exposed episodes: https://aka.ms/dataexposedyt

🔔 Subscribe to our channels for even more SQL tips:
Microsoft Azure SQL: https://aka.ms/msazuresqlyt
Microsoft SQL Server: https://aka.ms/mssqlserveryt
Microsoft Developer: https://aka.ms/microsoftdeveloperyt

#AzureSQL #SQL #LearnSQL

Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete

New DayFrame version is live!

1 Share
From: Fritz's Tech Tips and Chatter
Duration: 2:32:05
Views: 31

Feedback for DayFrame is HERE! Let's catch up...

Read the whole story
alvinashcraft
2 hours ago
reply
Pennsylvania, USA
Share this story
Delete
Next Page of Stories