Develop an AI agent with the Microsoft Agent Framework | AI-103 | Episode 13
Microsoft Agent Framework provides a code-first abstraction for building agents across models, providers, tools, conversations, and workflows. It brings together concepts from Semantic Kernel and AutoGen behind a more consistent agent programming model.
Core model to remember: Provider → Agent → Tools → Run. A provider connects the agent to an underlying model; the agent combines instructions + tools; and run() executes the interaction. Built-in capabilities include file search, web search, conversation management, and workflow orchestration.
from agent_framework import Agent, tool
@tool
def submit_claim(subject: str, body: str):
print(subject, body)
agent = Agent(
client=model_client,
instructions="Create expense claims using the available tool.",
tools=[submit_claim]
)
result = await agent.run("Submit my expenses")
The important part is what is missing: no manual function-call dispatch loop. The framework can recognize the model's tool request, invoke the registered function, return its result, and continue execution automatically.
Key concepts
-
Agent abstraction → allows different model/chat providers behind a common interface.
-
@tool→ exposes Python functions as agent tools; metadata can be inferred instead of manually constructing tool schemas. -
Tool approval → controls whether execution requires approval.
-
Agent thread → manages conversation state and stored messages.
-
Authentication → prefer token-based authentication; local development may use Azure CLI credentials, while hosted applications typically require an appropriate workload identity such as managed identity.
Remember: the framework handles much of the plumbing between LLM → agent → tool → result, letting application code focus on agent behavior rather than dispatch infrastructure.
Comments