Implement generative AI and agentic solutions 2.2 Build agents by using Foundry

Your team already has a multi-agent system written with LangGraph and wants Foundry to…

Study guide skill: Implement orchestrated multi-agent solutions

Question B1-028

Your team already has a multi-agent system written with LangGraph and wants Foundry to run it with a managed endpoint, automatic scaling and a dedicated Microsoft Entra identity, while keeping full control over the agent logic. Which agent type should you use?

Select one answer.

  • A A model deployment with the Assistants API
  • B Voice-based prompt agent
  • C Prompt agent
  • D Hosted agent ✓ Correct answer

Answer: D

Hosted agents let you bring your own code and framework (for example LangGraph or Agent Framework) as a container or a .zip of source code. Foundry runs it with a managed endpoint, scaling and identity, and the docs list it as suited to custom orchestration and multi-agent systems. Prompt agents are configuration-only.

Deep dive

How it works

Foundry offers several ways to build, from a single model call to a fully containerized agent. A hosted agent gives you the most control. Hosted agents are code-based agents built with Agent Framework, LangGraph, the OpenAI Agents SDK or your own code. You ship the agent as a container image or a .zip file of your source code (Foundry builds the image for you from a .zip). Foundry then runs it with a managed endpoint, automatic scaling, a dedicated Microsoft Entra identity, session-level state persistence and end-to-end observability.

Your code calls the Foundry project endpoint for model inference and tool orchestration, so the agent still gets Foundry models and platform tools. The docs say hosted agents are best for agents that call into your own custom code, and secondarily for custom orchestration logic, multi-agent systems and custom protocols where you want full control over the agent logic. That's an existing LangGraph multi-agent system. The trade-off is that you maintain that agent logic yourself.

The other options, and when you'd use them

  • A model deployment with the Assistants API: A model deployment is the single-model-call end of the range. If you already run agent code elsewhere, the docs point to calling the Responses API directly. The managed endpoint, scaling and identity in the question come with a hosted agent.
  • Voice-based prompt agent: These are managed real-time voice agents, connected through Voice Live. Voice-based agents are in preview.
  • Prompt agent: Prompt agents are defined entirely through configuration (instructions, model and tools), with no application code. They're best for getting started fast and for production agents that don't need custom orchestration logic, so they can't run your own LangGraph code.

Exam tip

"Bring our own framework code" with a managed endpoint, scaling and identity means a hosted agent. "Just instructions, a model and tools" means a prompt agent.

References

Microsoft Learn references

Last reviewed:

Ready to test yourself? The quiz asks this and every other AI-103 question, with instant feedback. Practice this in a quiz →

All Generative AI & agents questions · AI-103 study guide

Thanks for your feedback!