Skip to main content

Shifting from Plumbing to Prompts: Introducing the Azure Functions Serverless Agents Runtime

Brian Swiger
Author
Brian Swiger
Passionate Geek • Proud Father • Devoted Husband

Building production-ready AI agents today often feels less like designing intelligent behavior and more like acting as a cloud plumbing technician. By the time you stitch together an orchestration framework, configure hosting layers, set up message queues, manage secrets, secure identities, and wire up observability, you have written hundreds of lines of infrastructure boilerplate before your agent has even processed its first prompt.

Microsoft is changing that paradigm with the public preview of the Azure Functions serverless agents runtime.

This new feature brings a declarative, markdown-first programming model for building AI agents as a first-class workload directly on Azure Functions. It combines the scale-to-zero economics, event-driven triggers, and operational integrations of the Functions platform with the world of agentic design patterns.

The Core Architecture: Markdown-First Agents
#

Instead of forcing developers to write complex initialization code, the serverless agents runtime introduces the .agent.md file format. In this model, the agent itself is the unit of work. You define its configuration, triggers, and metadata in a YAML front-matter block, while the body of the markdown file contains the natural language instructions for the agent.

For example, a complete, timer-triggered agent that scours the web and emails a daily briefing looks like this:

---
name: Daily Tech News Email
description: Fetches top tech news and emails a summary daily.
trigger:
  type: timer_trigger
  args:
    schedule: "0 0 15 * * *"
---
You are a news assistant. When triggered, do the following:
1. Scour the web for today's top tech news headlines. Use reputable sources; Include links to the original articles.
2. Summarize the top stories in a concise, well-formatted HTML email body.
3. Email the summary to $TO_EMAIL with the subject "Daily Tech News Summary" followed by today's date.

When deployed to Azure Functions running on the Flex Consumption plan, this single file operates as a fully managed, auto-scaling, event-driven agent.

Native Integration and Tooling Shared at Scale
#

Agents rarely operate in a vacuum; they need tools, data sources, and models. The serverless agents runtime allows architectural assets to be declared and shared globally across multiple agents in the function app using standardized configuration files:

  • agents.config.yaml: Declares global system tools (like sandboxed code execution environments) and default LLM deployment models.
  • mcp.json: Lists the Model Context Protocol (MCP) servers your agents can call. This includes MCP-enabled Azure connections, allowing agents to securely interact with external systems using the function app’s managed identity without explicit secret management.
  • /tools and /skills Folders: Co-located directories holding custom Python tools or reusable prompt fragments that any agent in the ecosystem can leverage dynamically.

Key Capabilities in the Public Preview
#

The preview environment provides a robust set of features tailored for enterprise scenarios:

  • Extensive Trigger Catalog: Agents can be invoked by standard Azure Functions triggers (HTTP, Timers, Cosmos DB, Service Bus, Blob Storage) as well as new connection-backed triggers like incoming Microsoft Teams messages or Outlook emails.
  • Built-in Ecosystem via MCP: Over 1,400 Azure connectors are instantly available as tools by enabling their MCP endpoints.
  • Secure Code Sandbox: Built-in support for Azure Container Apps (ACA) dynamic sessions allows agents to run untrusted Python code or perform browser automation via Playwright in isolated environments.
  • Turnkey Turn-Based Interactions: The runtime auto-generates a built-in chat UI, an HTTP API, and an MCP server endpoint for your agents out of the box.

Architectural Fit
#

This runtime fills a critical gap in enterprise AI design. It is ideally suited for background automation tasks that run on schedules, event-driven workflows responding to enterprise alerts or data state changes, and cross-system orchestration where an agent must look up data in one SaaS platform and update another based on natural language logic.

For more information on getting started, review the official announcement on the Microsoft Tech Community Apps on Azure Blog and explore the technical implementation details in the Azure Functions documentation.