Every Azure Functions tutorial that adds AI eventually hits the same wall: your function becomes the agent’s waiting room. The trigger fires, you hand off to the model, and your validation logic, error handling, and HTTP response are somewhere in the footnotes. Microsoft’s new agent bindings for Python, released in preview on October 6, flip this dynamic. The agent is a parameter. Your function stays in charge.
What Agent Bindings Actually Do
An agent binding is an input binding that injects a fully constructed Agent object into your Python function handler. You use the @app.markdown_agent decorator, give the binding a name and an instructions file, and the extension handles the rest — constructing the agent, opening resources, tearing them down after execution.
The instructions live in a separate .agent.md file. The extension reads it as raw UTF-8 and passes it to the Microsoft Agent Framework. You can version instructions independently from code, and update agent behavior without touching Python.
import azure.functions as func
from agent_framework import Agent
from azurefunctions.agents.extensions.agent_framework import AgentFunctionApp
app = AgentFunctionApp(client_factory=create_chat_client)
@app.function_name(name="ProcessOrder")
@app.route(route="orders/{orderId}", methods=["POST"])
@app.markdown_agent(
arg_name="order_agent",
agent_name="order-fulfillment",
)
async def process_order(
req: func.HttpRequest,
order_agent: Agent,
) -> func.HttpResponse:
task = f"Validate order {req.route_params['orderId']} and return fulfillment risk."
response = await order_agent.run(task)
return func.HttpResponse(response.text)
AgentFunctionApp extends FunctionApp with no behavior changes — all existing triggers and bindings work identically. The only addition is the @markdown_agent decorator and the injected Agent parameter.
Three Scenarios Where This Makes Sense
Microsoft’s docs describe three patterns. The third one is the most interesting for production teams.
HTTP Request Assessment
An HTTP trigger fires, your code runs deterministic validation, and the agent evaluates the harder fuzzy parts — fulfillment risk, sentiment, classification. The agent never sees the raw request. It sees whatever task string you construct for it. Your code assembles the response.
Event Enrichment
A queue message arrives or an Event Grid event fires. Your function receives the payload, calls the agent to classify or summarize it, then writes the enriched result downstream. The agent handles one bounded step in a multi-step pipeline.
Durable Functions Orchestration
This is where agent bindings earn their keep. A Durable orchestrator calls context.call_agent(), which schedules the agent work as a hidden activity. Orchestration replay stays deterministic because the nondeterministic model calls run in the activity, not the orchestrator.
@app.orchestration_trigger(context_name="context")
def order_orchestrator(context):
assessment = yield context.call_agent(
"order-fulfillment",
{"order": context.get_input()},
)
return assessment
Long-running workflows with bounded AI reasoning and Durable Functions reliability guarantees. This is the architecture most production teams actually mean when they say they want “AI in their backend.”
MCP Servers and Shared Skills
Drop an mcp.json file at the app root and every agent binding in the function app automatically connects to those MCP servers. Put shared agent skills in skills/<name>/SKILL.md. No per-binding wiring required.
One security detail worth flagging: agent skills and MCP tools can perform privileged operations. If different agents in your app need different capability boundaries, use separate function apps. Do not put secrets directly in a source-controlled mcp.json — use environment variable references instead.
How Agent Bindings Compare to the Alternatives
Azure Functions now has three distinct patterns for adding AI. They are not interchangeable — see the AI integration options overview for the full comparison.
| Pattern | Who’s in control | When to use |
|---|---|---|
| Agent bindings | Your Python code | Code logic + bounded AI reasoning |
| Hosted skills | The agent (declarative) | The agent IS the application |
| MCP extension (GA) | External AI clients | Build tools that other agents call |
If your function is the primary execution model and you want AI to handle one bounded task inside it, agent bindings are the right choice. If you want to define the whole app declaratively in Markdown without writing Python, look at hosted skills. If you’re building the server side of an MCP integration, the MCP extension is stable and already GA.
Getting Started
The preview requires Python 3.13 or later and the Azure Functions v2 programming model. Install the provider package:
pip install azurefunctions-agents-extensions-agent-framework
Create function_app.py with AgentFunctionApp, write your .agent.md instructions file, and add the decorator. Full documentation and quickstarts are on Microsoft Learn.
Current preview limitation worth knowing: only Microsoft Agent Framework is supported. LangChain, AutoGen, and other SDKs are not available yet. If your team is not already on the Microsoft Agent Framework, factor in that dependency before adopting agent bindings in production.
The Verdict
Agent bindings solve a genuine architectural problem — how to add AI reasoning to a workflow without surrendering control of the workflow. The “agent as a parameter” model is the right abstraction. The Durable Functions integration makes it production-serious. The Microsoft Agent Framework-only constraint is a real limitation in this preview, but for shops already building on Azure with Python, this is worth testing now.













