Who this is for and what you will be able to do
This guide is for readers who know the basics of AI agents and now need to pick a framework to build one. By the end you should understand what an agent framework does, how the Microsoft Agent Framework differs from Foundry Agent Service, what a short tool-calling agent looks like in code, and which one to start with [1].
What an agent framework does
An AI agent framework is a software platform that simplifies creating, deploying and managing AI agents. It provides pre-built components, abstractions and tools, so developers can focus on what is unique to their application instead of solving common problems from scratch. Frameworks of this kind improve scalability, accessibility and efficiency [1].
Agent frameworks also go beyond traditional AI frameworks. They enable intelligent agents that interact with users, other agents and the environment to reach specific goals, and that can act autonomously, make decisions and adapt to changing conditions [1]. Three capabilities stand out:
- Collaboration and coordination: several agents work together, communicate and coordinate on complex tasks [1].
- Task automation and management: multi-step workflows are automated, tasks are delegated, and work is managed dynamically among agents [1].
- Contextual understanding and adaptation: agents understand context, adapt to changing environments and decide based on real-time information [1].
Three features that speed up prototyping
Most agent frameworks share three features that help a team prototype and iterate quickly [1].
- Modular components. SDKs provide pre-built pieces such as AI and memory connectors, function calling through natural language or code plugins, and prompt templates [1].
- Collaborative tools. You design agents with specific roles and tasks, then test and refine how they work together [1].
- Real-time learning. You build feedback loops so that agents learn from interactions and adjust their behaviour [1].
Microsoft Agent Framework (MAF)
The Microsoft Agent Framework is a streamlined SDK for building AI agents. It has built-in tool calling and conversation management, and it authenticates through Azure identity, so you do not manage API keys directly [1]. It is aimed at production-ready agents that use tools, run multi-step workflows and fit into enterprise integration [1].
In this framework, an agent is created through FoundryChatClient and configured with a name, instructions and tools. The agent processes user messages, calls tools automatically based on the conversation, and keeps conversation state across interactions [1]. Tools are plain Python functions, registered when the agent is created [1].
A first agent looks like this [1]:
import os
from agent_framework.foundry import FoundryChatClient
from azure.identity import AzureCliCredential
provider = FoundryChatClient(
project_endpoint=os.environ["AZURE_AI_PROJECT_ENDPOINT"],
model=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"],
credential=AzureCliCredential(),
)
agent = provider.as_agent(
name="my_agent",
instructions="You are a helpful assistant.",
)
response = await agent.run("Hello, World!")
print(response)The project endpoint and the model deployment name are read from the environment variables AZURE_AI_PROJECT_ENDPOINT and AZURE_AI_MODEL_DEPLOYMENT_NAME [1]. The await call must run inside an async function. For multi-agent work, the examples build a planner agent and an executor agent with different instructions, then pass the planner's output to the executor [1].
Microsoft Foundry Agent Service
Foundry Agent Service is the newer of the two, introduced at Microsoft Ignite 2024 [1]. Its main points are these:
- Model choice: it supports more flexible models, including direct calls to open-source LLMs such as Llama 3, Mistral and Cohere [1].
- Enterprise security: it provides stronger security mechanisms and data storage methods, which suits enterprise applications [1].
- Status: it was in Public Preview and supported Python and C# for building agents [1].
- Compatibility: it works out of the box with the Microsoft Agent Framework [1].
In Foundry, an agent works like a smart microservice. It can answer questions (RAG), take actions or automate a whole workflow, by combining generative AI models with tools that reach real-world data [1]. Creating one with the Python SDK looks like this [1]:
agent = project_client.agents.create_agent(
model="gpt-5-mini",
name="my-agent",
instructions="You are helpful agent",
tools=code_interpreter.definitions,
tool_resources=code_interpreter.resources,
)A thread is a conversation between an agent and a user. It tracks progress, stores context and manages the state of the interaction. Messages in a thread can be text, images or files [1]. The service also has built-in connections to Azure OpenAI, Azure AI Search, Bing Search and code execution [1].
Which one to choose
The recommended path is short. Start with the Microsoft Agent Framework to build agents, then use Foundry Agent Service when you need to deploy and scale them in production [1].
For a production AI agent application where speed matters, the Microsoft Agent Framework is the recommendation. Its simple, Pythonic API lets you define agents with tools and instructions in a few lines of code [1]. If you need enterprise deployment with Azure integrations such as search and code execution, Foundry Agent Service is the better fit. It is a platform service where you build agents in the Foundry Portal and deploy them at scale [1].
The two are not either-or. Foundry Agent Service works out of the box with the Microsoft Agent Framework, so an agent built in the framework can be run on the service [1]. On the Azure side, Foundry can connect to Bing, Azure AI Search and Azure Functions, and the framework calls Azure services from tools through FoundryChatClient and Azure identity [1].
Sample code
Sample code sits in the code_samples folder of the repository. There is a Python notebook for Microsoft Foundry, a Python notebook for the Azure OpenAI Responses API, and a .NET file for the Agent Framework [1]. Open the one that matches the platform you chose.
Adapted from lesson 2 of Microsoft's open-source course *AI Agents for Beginners*[1], released under the MIT License.
Sources
- 1Explore AI Agent FrameworksMicrosoft ai-agents-for-beginners (MIT)
Cite this page: Choosing an agent framework: Microsoft Agent Framework vs Foundry Agent Service. TellWorld, https://www.tellworld.net/practice/practice-agentic-frameworks. Updated 2026-11-14