python
344 TopicsSkills over MCP are now available in VS Code
VS Code 1.147+ can now load agent skills straight from an MCP server! If your team runs an MCP server, you can ship skills from the same server as your tools, so every agent reads the same copy and gets updates the moment you deploy. Those skills can help models use your tools optimally and equip agents for the most common workflows. Once agent skills are bundled inside the MCP server itself, the skills can be served with the same auth, access control, and trust model as the tools. One sign-in covers both, and each skill is versioned right alongside the tools it describes. Skills-over-MCP: How it works The MCP standard added support for skills in SEP-2640. Many thanks to the Skills Over MCP Working Group for getting it there! A server advertises that it can serve skills by declaring the extension in its capabilities: { "capabilities": { "resources": {}, "extensions": { "io.modelcontextprotocol/skills": {} } } } A client can then call skills/list to get each skill's name and description, along with a list of the skill's files: { "uri": "skill://pdf-processing/SKILL.md", "frontmatter": { "name": "pdf-processing", "description": "Extract, fill, and assemble PDF documents" }, "resources": [ { "uri": "skill://pdf-processing/SKILL.md", "digest": "sha256:d5e6...", "size": 5120 }, { "uri": "skill://pdf-processing/references/FORMS.md", "digest": "sha256:e6f7...", "size": 18433 } ] } The files themselves are ordinary skill:// resources that the client loads with resources/read as it needs them. So you get the same progressive disclosure you'd get from skills on disk, where the agent only pays for a skill when it uses one. Adding skills to a FastMCP server Adding skills to an existing MCP server is easy, especially if you are using the FastMCP framework for building your MCP servers. In the example code below, we define a new Skill inline, with name, description, instructions, and files, and add that via the SkillCatalogProvider to the MCP server: from fastmcp import FastMCP, Skill from fastmcp.skills.provider import SkillCatalogProvider release_notes = Skill( name="release-notes", description="Write release notes from merged pull requests.", instructions="# Release notes\n\nGroup changes by theme. Follow template.md.\n", files={"template.md": "## Highlights\n\n## Fixes\n"}, ) mcp = FastMCP("Team Skills") mcp.add_provider(SkillCatalogProvider([release_notes])) Learn more ways to add skills to FastMCP servers from their Skills over MCP documentation guide. Using them in VS Code Support for skills-over-MCP varies across MCP clients, as you can see from MCPJam's caniuse.dev compatibility matrix. VS Code is one of the first clients to add support, which makes it great for testing you MCP servers which bundle skills. Verify that your VS Code is version 1.147 or higher, and has chat.agentHost.mcpSkills.enabled: Run your server over HTTP: fastmcp run server.py --transport http --port 8000 Add your server to ~/.copilot/mcp-config.json: { "mcpServers": { "team-skills": { "type": "http", "url": "http://localhost:8000/mcp" "tools": ["*"] } } } Start a new chat and type /. Your server's skills show up as slash commands, right next to the built-in ones. Pick one and VS Code asks before it loads skills from that server. Then the agent follows the skill like any skill on disk, and pulls in template.md when the instructions point to it. Of course, you don't need to explicitly invoke the skill. You can also write a prompt to the Copilot agent that causes it to invoke the bundled skill: VS Code will prompt to ensure you want to allow the MCP server to load the skill instructions into the context, and you can decide whether to allow once or allow always. That prompt gives users more control over the instructions injected into their context windows. Hosting MCP servers A local MCP server works great if it's just for your personal workflows, but if you're like many developers, you're building MCP servers to share inside an organization or even externally for customers. We have great ways for you to host MCP servers on Azure, like Azure Container Apps, Functions, App Service, or Kubernetes. Check our guide on choosing an Azure service for MCP servers. The FastMCP team also makes it easy to deploy servers with their FastMCP Gateway, the quickest way to deploy a FastMCP server from a GitHub repo. For clients that aren't as far along as VS Code, the FastMCP Gateway can also offer your skills as plain tools, so the same URL works there too. They also offer FastMCP Skills Drop, a free page that turns your skills into an MCP server. Start experimenting with skills in your MCP servers today! Give feedback to the VS Code team if you find any issues with invoking the skills, and share your experience in the MCP community on how MCP can better support skills.Public preview: OS-level dependency support via containers for Azure Functions Flex Consumption
Your function needs Chromium to generate a PDF. Or GnuPG to encrypt data. Or a native Linux library that isn’t available in the managed execution environment. Until now, an OS-level dependency could require redesigning the application, moving part of the workload to another service, or selecting another hosting option. Today, we’re announcing the public preview of OS-level dependency support via containers on Azure Functions Flex Consumption. With this capability, you can build a Linux container image containing your function application, one supported Functions language worker, application dependencies, and the OS-level software your workload needs. Azure continues to operate the Functions host, trigger integration, routing, and Flex Consumption scaling outside your image. See it in action: Generate PDFs with .NET and Chromium Consider a function that converts HTML into a PDF by using .NET, Puppeteer Sharp, and Chromium. The application needs more than a NuGet package. Puppeteer Sharp needs a compatible browser and the native Linux libraries and fonts required by Chromium. These dependencies aren’t part of the standard managed execution environment. With OS-level dependency support, the application can package those components in its worker image: The .NET isolated function application The .NET isolated Functions worker supplied through the application’s NuGet dependencies Puppeteer Sharp Chromium and its required Linux libraries Fonts and other assets used when rendering the document After the image is deployed to Flex Consumption, an HTTP request invokes the function. Puppeteer Sharp launches the packaged Chromium browser, renders the supplied HTML, and returns the generated PDF. You can explore the complete implementation in the Azure Functions Flex Consumption .NET isolated container sample. A worker-only container model Flex Consumption uses a different container model from other hosting options where the complete Function App runtime is packaged in the customer image. Bring your preferred compatible Linux or language base image to Flex Consumption. As long as the final image satisfies the Flex worker-image contract, you control the base OS, language runtime, application dependencies, and OS-level packages, while Azure provides and maintains the Functions host. Your Flex Consumption container image contains: Your function application One supported Functions language worker Language and application dependencies OS packages, native libraries, browsers, fonts, drivers, executables, and command-line tools required by the application Azure provides and operates: The Azure Functions host and platform components Trigger integration Request and event routing Communication with the language worker Flex Consumption managed scaling This worker-only boundary is important. The feature isn’t arbitrary web-container hosting, and you don’t package or operate the Functions host. You customize the environment in which your function code runs while retaining the Azure-managed Functions programming and scaling model. For broader context on how Azure Functions separates the managed host from the compute that runs your application, see Separating Compute in Azure Functions: Building for scale, efficiency, and reliability. What makes a Flex app registry-backed? A registry-backed Flex app uses the same `Microsoft.Web/sites` resource as a code-package app. The deployment storage type identifies the deployment model: A code-package app uses `properties.functionAppConfig.deployment.storage.type` set to `BlobContainer`. A worker-image app uses the same property set to `Registry`. For a registry-backed app, `deployment.storage.value` contains the fully qualified image reference, and `deployment.storage.authentication` tells Azure how to pull the image. Registry-backed apps omit `functionAppConfig.runtime` because the language runtime and Functions worker are supplied inside the image. properties: { functionAppConfig: { deployment: { storage: { type: 'Registry' value: '<registry>/<repository>:<tag-or-digest>' authentication: { type: '<authentication-type>' } } } // No runtime property for a Registry-backed app. } } Other Function App configuration, including scale and concurrency settings, remains part of the resource and should be preserved when changing the deployment model. See the complete documentation for authentication options, Azure CLI commands, and the complete resource shape. How it works The end-to-end flow is straightforward: Start with the sample Dockerfile for your supported Functions language. Add the OS packages and native dependencies required by your application. Test the source application locally using the normal Functions development experience. Build and scan the linux/amd64 image, then push it to a supported registry. Configure the Flex Consumption app with the fully qualified image reference. Deploy and validate the complete image integration in Azure, then monitor it through logs and Application Insights. For deterministic deployments and rollback, use an immutable image digest for each release. When you need to update the language worker, runtime, base image, OS packages, or application dependencies, rebuild and test the image, push a new version, and update the function app to reference it. Microsoft publishes supported worker artifacts or packages, depending on the language, along with sample Dockerfiles, but doesn’t provide a Flex Consumption base image. You select and maintain the Linux or language base image that meets your application and organizational requirements. When should you use this feature? Use OS-level dependency support when you want the Flex Consumption programming and scaling model but your function requires software that can’t be supplied through the language package manager alone. Examples include: Browser automation with Chromium and Puppeteer PDF generation with Chromium and Puppeteer Sharp Data encryption and signing with GnuPG Image, audio, or video processing with native libraries Database drivers or vendor-provided native SDKs Custom fonts required for document generation Linux executables and command-line tools invoked by application code This capability isn’t intended as a blanket replacement for other Azure Functions hosting options or general container platforms. Choose it when Flex Consumption fits your workload and OS-level dependencies are the missing requirement. Public preview considerations During the preview, keep these considerations in mind: The preview is currently available in several public regions and is rolling out to additional Azure regions over the next few weeks. Use only the documented Functions languages and supported language versions. Images must target Linux amd64. Durable Functions isn’t supported. The Azure Service Bus extension (trigger and output bindings) isn’t supported. Availability zone support isn’t available. The preview doesn’t currently provide a supported experience for running the Flex worker container locally. Continue to test the source application locally and validate the complete image integration in Azure. You are responsible for selecting, securing, scanning, patching, rebuilding, testing, and redeploying the base image, language worker, application dependencies, and OS-level dependencies in your image. Preview capabilities and limitations can change. See the complete documentation for the current language versions, configuration procedures, registry authentication options, operational behavior, and known limitations. Get started Start with the sample for your preferred language: .NET isolated container sample Python container sample Node.js container sample Go container sample Read Use OS-level dependencies via containers with Azure Functions Flex Consumption for the complete image contract and deployment guidance. Try the preview with a workload that needs Chromium, GnuPG, a native library, a driver, a font, or another Linux dependency and share what this capability enables for your application!252Views0likes0CommentsManaged connectors in Azure Functions are now generally available
Today, we're announcing the general availability of managed connectors in Azure Functions, bringing managed connectivity to business systems directly into Azure Function apps and hosted skills. Modern applications rarely operate within a single system. Whether you're processing documents from SharePoint, responding to customer updates in Salesforce, or reacting to changes in Microsoft Dataverse, building these integrations often means writing service-specific API code, building and managing authentication, handling event delivery and retry before you can focus on your application's business logic. With managed connectors, developers can: Connect to 1,600+ services through the managed connector ecosystem, including Microsoft 365, Salesforce, Dataverse, Jira, Slack, Dropbox, and many more. React to events from connected services using Connector triggers. Take actions against connected services using language-native Connector SDKs. Build in familiar languages, including C#, Python, and TypeScript. Scale automatically with polling triggers, newly supported for GA Built through close collaboration between the Azure Functions and Azure Connector Namespace teams, this integration brings managed connectors directly into the Azure Functions programming model. Connector Namespace handles connections, authentication, and service-specific integration logic, while Azure Functions provides the familiar development experience, event-driven execution, and automatic scaling. Together, they enable developers to build integrations with enterprise services using the same programming model and tools they already use for Azure Functions. See managed connectors in action Suppose you're building an application that processes documents uploaded to SharePoint. When a new file arrives, you want to extract information, run custom validation, and update another business system. Traditionally, implementing this workflow requires managing SharePoint authentication, detecting new files, and delivering those events to your application. With managed connectors, you can use a Connector Trigger to invoke your function when a new event is detected. For example, here's what a connector-triggered function looks like in C#, using a SharePoint event to illustrate the programming model: [Function("OnNewFile")] public void OnNewFile( [ConnectorTrigger( DeliveryMode = ConnectorTriggerDeliveryMode.Poll, Connection = "ConnectorNamespace", TriggerConfigName = "%OnNewFileTriggerConfigName%")] SharePointOnlineOnNewFileItemsTriggerPayload payload) { _logger.LogInformation("Received OnNewFile trigger ({Count} items)", payload.Body?.Value?.Count ?? 0); } The function receives the events and runs your application logic. Connector Namespace handles the integration with the external service. The same approach works for other supported connector events, including Outlook changes, Dataverse updates, and more. The following is a connector-trigger function in Python showing a Outlook new calendar event: @app.function_name(name="OnNewCalendarEvent") @app.connector_trigger( arg_name="events", connection="ConnectorNamespace", delivery_mode=func.DeliveryMode.POLL, trigger_config_name="%OnNewCalendarEventTriggerConfigName%", ) def on_new_calendar_event(events: List[office365.GraphCalendarEventClientReceive]) -> None: """Triggered when a new calendar event is created in Office 365.""" logging.info("Received OnNewCalendarEvent trigger (%d items)", len(events)) Connector-trigger function in TypeScript showing a Dataverse row modified event: import { app, DeliveryMode, InvocationContext } from '@azure/functions'; app.connectorTrigger('OnDataverseRowModified', { deliveryMode: DeliveryMode.Poll, connection: 'ConnectorNamespace', triggerConfigName: '%OnDataverseRowModifiedTriggerConfigName%', handler: async (payload: unknown, invocationContext: InvocationContext) => { invocationContext.log('Received OnDataverseRowModified trigger.'); return payload; }, }); Take actions with strongly typed Connector SDKs While Connector triggers let your functions react to events, Connector SDKs let your code call operations in connected services. This makes it easy to combine integrations with external services, custom business logic, and Azure AI capabilities within the same application. For example, in this RFP intake sample, an Azure Function is triggered when a new document arrives in SharePoint. It uses the SharePoint Connector SDK to retrieve the document, Azure Content Understanding to extract its contents, and the Teams Connector SDK to post a summary card to a Teams channel. The following is simplified code from the RFP sample showing how the Teams client from the .NET Connector SDK is used to post an Adaptive Card to a channel: 1. Register the TeamsClient in `Program.cs` services.AddSingleton(new TeamsClient( new Uri(teamsRuntimeUrl), new DefaultAzureCredential())); 2. Inject and use it in the function: public class RfpFunctions(TeamsClient teams) { [Function("OnNewFile")] public async Task OnNewFile( [ConnectorTrigger] SharePointOnlineOnNewFileItemsTriggerPayload payload, CancellationToken cancellationToken) { var request = new DynamicPostCardRequest { AdditionalProperties = { ["recipient"] = JsonSerializer.SerializeToElement( new { groupId = "<team-id>", channelId = "<channel-id>" }), ["messageBody"] = JsonSerializer.SerializeToElement(new { type = "AdaptiveCard", version = "1.4", body = new[] { new { type = "TextBlock", text = "New RFP received!" } } }) } }; await teams.PostCardToConversationAsync( "Flow bot", "Channel", request, cancellationToken); } } The connector catalog For popular connectors such as Outlook, SharePoint, and Teams, the Azure Functions Connector extension provides strongly typed event payloads, while the Connector SDKs offer strongly typed clients and models for interacting with these services. This lets developers work with familiar language-native objects when responding to events or calling connector operations, with less manual JSON parsing and API integration code. Below are examples of popular connectors in each enterprise integration category: Microsoft 365 and productivity: Outlook, SharePoint, Teams, OneDrive for Business, Planner, and OneNote CRM and business applications: Salesforce, Pipedrive, Microsoft Dataverse, and Zendesk Developer tools and collaboration: Azure DevOps, GitHub, Jira, and Slack. File storage and data services: Dropbox, Box, FTP, Azure Blob Storage, and SQL Server. Messaging and event streaming: Azure Event Hubs, Azure Service Bus, and RSS. For other connectors supported by Connector Namespace, developers can still use the generic Connector Trigger to receive events as JSON payloads and parse them in their function code. Together, the breadth of the managed connector ecosystem and a code-first, strongly typed developer experience make it easier to integrate business systems while retaining the flexibility of Azure Functions. To explore the strongly typed APIs available for each connector, refer to the following resources. These references help you identify supported trigger payloads, SDK clients, operations, and models: Capability Where to find supported types Strongly typed trigger payloads Connector trigger payloads for Azure Functions Python Connector SDK clients Python API reference TypeScript Connector SDK clients TypeScript API reference .NET Connector SDK clients .NET API reference Note: generic trigger support doesn't automatically imply Connector SDK action support. Developers can receive events from connectors across the broader catalog, but strongly typed SDK clients for taking actions are available only for supported connectors and operations. New for GA: Polling triggers with automatic scaling One of the biggest additions in this release is support for polling-based connector triggers. Previously, managed connector triggers in Azure Functions relied on webhook delivery. With GA, developers can choose between webhook and polling mode, depending on their application's requirements. Both models use the same Connector Trigger programming model, but they differ in how events reach your function. Webhook delivery With webhook delivery, Connector Namespace sends events directly to your Function App's webhook endpoint. This is useful when you want events pushed to your application as they become available, minimizing latency. Polling delivery With polling delivery, Connector Namespace makes events available through a polling endpoint, and Azure Functions retrieves those events. Polling triggers integrate with the Azure Functions scaling infrastructure to monitor pending connector events, allowing applications to handle changing event volumes without manually managing the number of function instances. The polling model also supports batching, so a function invocation can process multiple events. Developers can configure settings such as: MaxBatchSize: Controls how many events can be retrieved in a batch. TargetPendingEventThreshold: Influences scaling based on the number of pending events. maxPollingInterval: Controls the maximum interval between polling attempts. These settings provide flexibility to balance processing throughput, responsiveness, and resource consumption. Local development experience For GA, we're also introducing a new Connector Triggers experience in the Azure Functions extension for VS Code (v1.23.0 or higher), making it easier to build and test polling-based connector triggers. From Azure Functions: Create New Project -> Connectors tab, you can: Choose a connector and event. Browse available connectors and select one or more events you want your function to respond to. Generate your project and code. VS Code scaffolds an Azure Functions project with the corresponding connector trigger code, so you can start building without writing the integration boilerplate yourself. Configure resources for local testing. When you're ready to debug with F5, VS Code guides you through creating or reusing the required Connector Namespace, connection, and trigger resources, including connection authentication and configuration. This streamlined experience lets you go from selecting an event to running and debugging your function locally, without manually provisioning and configuring each integration resource. For developers who prefer the command line, Azure Functions Core Tools (v4.16.1 or higher) also includes a selection of connector trigger templates, providing another way to get started with connector-triggered functions. Pricing Managed connectors in Azure Functions follow existing Azure pricing models, with no additional charge for the integration itself. Two pricing components apply: Azure Functions: Standard Azure Functions pricing applies based on your hosting plan. Managed connectors: Connector usage is billed based on connector calls, with rates depending on whether the connector is classified as Standard or Enterprise. For details, see the Connector Namespace pricing. Get started with managed connectors There are several ways to get started with managed connectors in Azure Functions, depending on your preferred development tools. Azure Developer CLI (azd) If you're familiar with the Azure Developer CLI, the easiest way to get started is with our sample repositories. They include examples of different connectors and triggers, along with Bicep templates that provision the required Azure resources, connector connections, and trigger configurations. Clone a sample, follow its prerequisites, and run azd up to provision and deploy the application. C# samples Python samples TypeScript samples Visual Studio Code Use the Azure Functions extension for VS Code to browse connectors and events in the Template Gallery, scaffold your project, and get guided setup for the connector resources and trigger configurations needed for local testing. Azure Functions Core Tools If you prefer working from the command line, Azure Functions Core Tools also offers a selection of connector trigger templates to help you scaffold your project. Follow the instructions at aka.ms/connectortrigger to set up the required resources and configurations to test the scaffolded project. More references To learn more about managed connectors in Azure Functions, explore the following resources: Use managed connectors in Azure Functions Azure Functions Connectors Samples Azure Connector Namespace Overview Browse available managed connectors Connector SDKs: .NET SDK Python SDK Node.js SDK757Views1like0CommentsIntroducing Azure App Service Builder (Public Preview)
This is a summarized version of the full post which can be found here: Introducing Azure App Service Builder: From code to a running app Builder brings application builds, hosting, and deployment management into one app-focused workflow. Connect an authorized GitHub repository for source-based builds or deploy a ZIP package, track deployment progress, and open your app at its service-provided URL. The initial preview focuses on static sites, web applications, and HTTP APIs. Whether you write code directly or work alongside an AI coding agent, Builder helps reduce the setup and handoffs between development and deployment so you can spend more time building and iterating on your application. A new option alongside the App Service you use today Builder does not replace existing Azure App Service experiences. Those experiences remain available and supported, and there is no requirement to move an existing application. Builder offers a new starting point for applications where a streamlined code-to-app workflow is a priority. The public preview is intended for development and test workloads, has no financially backed SLA, and is not recommended for production workloads. Supported regions, runtimes, workflows, and resource limits apply. Read the full announcement For a walkthrough, more on how Builder fits alongside existing App Service experiences, and what to expect during preview, read Introducing Azure App Service Builder: From code to a running app on the App Service Builder blog. Ready to explore? Visit the Builder portal and the App Service Builder documentation to get started.882Views0likes0CommentsA Rust foundation for Python Functions: evolution of the Python worker
When you write a Python function, your focus is on what the function should do. Behind the scenes, the layer that passes requests to your code affects dependency compatibility, support for new Python versions, and performance. As we started working on Python 3.15 support for Azure Functions, we took another look at that layer. Our goal was to move host communication away from Python transport packages while keeping the code that runs functions in Python. The result is R2P2, short for Rust to Python Proxy. Its communication layer is written in Rust, and your functions still run in Python. Here's what we changed, why we chose Rust, and what we learned along the way. How a Python function gets to work Azure Functions lets you run code in response to events, such as an HTTP request, a message in a queue, or a file upload. Two components work together to get that event to your code: The Functions host listens for events and sends work to the appropriate language worker. The Python worker loads and calls your Python function, then sends the result and logs back to the host. The worker for Python 3.13 and 3.14 already split that work into two layers. A Python-based proxy worker, an intermediary inside the worker process, handled communication with the host. It then passed requests to the Python runtime libraries, which discover functions, prepare their inputs, and invoke them. Here, runtime libraries mean the worker's Python execution code, rather than a separate service. Python 3.13 and 3.14: the host communicates with a Python proxy, which calls the runtime libraries. The proxy and application share an interpreter. That split gave us a place to make a focused change. We could build a new communication layer while keeping the Python runtime libraries. What changed, and what stayed Python R2P2 builds on architectural decisions made over several Python releases. With Python 3.13, we introduced the proxy workerand separated communication with the host from the libraries that execute functions. That gave each layer a clearer responsibility and allowed the Python execution libraries to evolve separately from the transport. That earlier work made this change practical. For Python 3.15, we had an established boundary where we could replace the Python proxy with a Rust transport while retaining the Python execution libraries. The work involved adapting the runtime integration, handling the Rust-to-Python handoff, and validating startup, imports, and function execution together. It was an evolution of the worker architecture, built on the separation introduced in Python 3.13. With R2P2, the host uses the same protocol as before, but a Rust transport layer, the part that sends and receives messages, handles the communication. PyO3 connects it to an embedded CPython interpreter, the Python interpreter running inside the worker process, and the existing Python execution libraries. Python 3.15 and R2P2: Rust replaces the Python transport. The bridge and Python execution libraries run in the same worker process. We adapted the integration with the runtime libraries and kept Python responsible for function execution. Users continue to write Python functions using the same programming models. For a deeper look at how the worker fits together, see the Python worker architecture documentation. Why consider Rust? We wanted the worker's communication stack to use a different set of dependencies while preserving the Python execution layer. Rust gave us a way to do both. A communication stack independent of Python packages: The Python proxy used grpcio for gRPC, the protocol the host and worker use to communicate, and protobuf to encode and decode their messages. These packages include native components, so a new Python version or platform needs compatible package builds. They also share an interpreter with your application, which might need different versions of those packages. Moving that layer to Rust let us use tonic for gRPC and prost for Protocol Buffers. The host still speaks the same protocol, while the worker uses a Rust implementation. Your application can continue to use Python's grpcio and protobuf packages; the worker's transport uses its own Rust libraries for communication. A practical bridge back to Python: We also needed a practical way for Rust to call the existing Python execution libraries. PyO3 gave us that connection. It provided the capabilities we needed to integrate a Rust transport with the existing worker’s Python execution libraries: embedding CPython, calling Python code, and passing values between the two languages. That let us build on the Python execution layer we already had. Through PyO3, the Rust transport calls those libraries within the same worker process, and they continue to load and run your Python functions. What this enables Changing the transport gives us a few benefits: A shorter path to supporting new Python versions: The worker's communication layer can be built for a new Python release independently of compatible Python grpcio and protobuf packages. Using tonic and prost removes that transport-package gate from the process. We still build against the new interpreter and validate the execution libraries, tooling, and application compatibility. Removing a dependency from that process gives us more control over the path to a new Python release. Separate transport dependencies from application packages: The Rust transport uses its own libraries for messaging. An application can choose the Python grpcio and protobuf packages it needs without competing with the worker's transport for those imports. That removes one source of dependency collisions: the worker transport and application needing different versions. Compatibility between an application's own dependencies remains something to manage. Windows ARM64 support in the Azure Functions CLI: The Azure Functions CLI (v5) lets users run and test functions locally. Python support on Windows ARM64 depended in part on the availability of Python's gRPC package, grpcio for that platform. Moving the worker's transport to Rust removes that dependency and helps enable Python support on Windows ARM64 in the Azure Functions CLI (v5). Performance as an added benefit: Every request needs work before and after your function runs. The worker receives and decodes a message, routes it, and sends the response back. For a short function, that overhead can make up a meaningful part of the request. Rust lets us handle that communication natively and keep it moving while Python runs a function. In our performance testing, Python 3.15 with R2P2 delivered about 50% higher throughput than Python 3.14. The comparison includes both a Python version change and a worker change, so it measures the combined result rather than Rust's contribution alone. What we learned Start with a boundary: The split between the proxy and execution libraries gave us a clear place to start. We could focus on how the worker receives and sends messages while keeping the existing Python code for function discovery, bindings, and invocation. That boundary helped us keep the project manageable. We could test whether the Rust transport worked with the behavior the Python runtimes already provided, instead of rebuilding that behavior in another language. We still had integration work to do, especially where messages and function inputs cross from one side to the other. The handoff has a cost: A request crosses several steps on its way from the host to your function. Rust receives and decodes the host's message, then passes the values Python needs to the execution layer. The result takes the return journey. Each conversion between Rust and Python has a cost, particularly for functions that do very little work themselves. We learned to look at the whole request path when evaluating performance. Faster message handling is useful, but the data passed across the bridge and the work done on either side matter too. Rust can keep communication moving while Python runs a function; Python execution still follows the standard interpreter's concurrency constraints. Rust has a learning curve: Rust asks you to think explicitly about ownership: which part of the program is responsible for a value, how long it lives, and who can use it. Coming from Python, that took some adjustment. The questions became especially important at the bridge, where Rust code interacts with objects managed by the Python interpreter and work may arrive concurrently. The compiler gives useful feedback while we build, and that helped us reason about how data is shared. It also took time to learn how to express those relationships. Debugging can now involve both Rust and Python, and the interpreter and its native extensions still need their own testing. The learning continues beyond getting the code to compile. Startup and imports need attention: Getting a request through a running worker is one part of the job. At startup, the worker also needs to find the application, select the appropriate Python execution layer, and load dependencies in the expected order. Those steps matter because applications may bring packages that overlap with packages used by the worker. Shared Python namespaces were a useful example. Several packages can contribute modules under the same namespace. When dependency paths change, Python may still have earlier imports cached. The worker needs to account for both the paths and the loaded modules so subsequent imports find the right code. That work made the boundary more than a function call. Startup, imports, and the way the worker is packaged all contribute to a reliable experience. The trade-offs We now maintain a mixed-language worker, build native binaries for supported platforms, and test the Rust-to-Python boundary. Troubleshooting can involve both toolchains. Startup, imports, and packaging all need attention as the worker evolves. For us, those costs were worth taking on to address the transport dependencies while keeping the Python execution layer. This boundary gave us a place to use Rust for communication and Python for running the functions users write.226Views3likes0CommentsPython support has arrived in the guided Copilot experience for VS Code
When we introduced the guided Copilot experience for building Azure apps in VS Code, we started with JavaScript and TypeScript, with Python on the roadmap. Since then, we've seen people creating Python projects with the experience, and we wanted to make sure our Python lovers had proper support. Today, we're excited to announce that the guided Copilot experience in VS Code now fully supports Python projects. 🐍 From Python idea to Azure app The guided experience helps you move from an idea to a deployed Azure app through a structured workflow, with checkpoints for reviewing important decisions. Now Python developers can use that same experience to: Plan and scaffold: Describe your app, review the proposed architecture, and approve a plan before code is generated. Develop locally: Get help preparing your development environment, then run and iterate on your Python project in VS Code. Deploy to Azure: Review the deployment tools, resources, and estimated costs before deploying your app. This guided path complements the free-form Copilot workflows you already know, so you can choose the approach that works best for you. Give it a try Install the Azure Tools extension pack, open an empty folder in VS Code, and start the guided Copilot experience with your Python project in mind. Whether you're building an API, prototyping an idea, or learning something new, we'd love to see what you create. Have feedback? Share it with us on GitHub. Thanks to everyone who's been building Python projects with the experience. We're excited to see what you make next!201Views0likes0CommentsDurable Task extension for Microsoft Agent Framework is now Generally Available
Today, we’re excited to announce the general availability of the Durable Task extension for Microsoft Agent Framework. It brings the reliable execution model of Durable Task to Agent Framework, helping agents and agentic workflows recover from failures and interruptions without losing their progress. Saving a conversation is only part of the story. When an agent is doing work, your application also needs to know which steps have finished, which jobs are still running, and whether it’s waiting for someone’s approval. If the application restarts, that information makes the difference between continuing the work and figuring out where to begin again. The Durable Task extension keeps track of that state for you. Agents can continue the same conversation after a worker restart, and workflows can pick up interrupted work without repeating steps whose results have already been saved. They can also wait for approvals or external events without keeping a worker running. You can focus on what your agents do, with less state management and recovery code to build yourself. Run durable agents and workflows in Azure Functions, or self-host them in your own .NET or Python application. Key capabilities of the Durable Task extension The Durable Task extension adds two capabilities to Microsoft Agent Framework that work together: durable agents and durable workflows. Durable agents keep conversation and session state between requests. Each agent call runs through Durable Task, so saved session state stays available even if a worker restarts or another application instance handles the next request. The conversation can continue without relying on the original process. Durable workflows keep track of work that takes multiple steps or runs over time. You can write Durable Task orchestrations to coordinate agent calls, application activities, and external events. If you prefer Agent Framework’s graph-based workflows, the extension runs those graphs as Durable Task orchestrations and handles registration of their agents and executors. The two come together when an interactive agent needs to start work that won’t finish in a single request. The agent can launch a workflow and return its instance ID rather than keep the user waiting. The workflow continues independently, including waiting for results or approvals. The agent can use that ID later to check progress or send an event, such as an approval decision. The examples below show how this works in practice: continuing a conversation, coordinating work across multiple steps, waiting for someone’s input, and managing session state and model context. Later in the post, we’ll show how to set up the host that runs these examples. Agent sessions that survive interruptions Suppose a customer starts a support conversation, then comes back with their order number. In between, your application restarts or another worker takes over. The agent should be able to pick up the conversation where it left off. Agent Framework can keep sessions in memory or use a persistent history provider to save messages between requests. A durable agent builds on that with a managed path for running agent calls and restoring session state, so you don’t have to wire that together yourself. With the Durable Task extension, each conversation has a stable durable session ID, and saved session state lives outside the worker process. Your application keeps the session reference. When the customer returns, another compatible worker can use that reference to continue the same conversation. The examples below show two separate requests. The first starts the conversation and serializes its session reference, which your application must save for later use. Serialization alone does not save it. The later request loads that reference and reconnects to the same durable session, without needing the original session object. Both requests use the same Durable Task backend, with SupportAgent registered through the extension. C# using System.Text.Json; using Microsoft.Agents.AI; using Microsoft.Agents.AI.DurableTask; // First request: start the conversation and return its session object. static async Task<JsonElement> StartConversationAsync( IServiceProvider services) { AIAgent agent = services.GetDurableAgentProxy("SupportAgent"); AgentSession session = await agent.CreateSessionAsync(); await agent.RunAsync( "I need help with my order.", session: session); // SerializeSessionAsync returns only the lightweight JSON session reference // (containing the durable session ID); Durable Task already stores the // conversation history in the backend. return await agent.SerializeSessionAsync(session); } // Later request, after a restart or on another compatible worker. // Load savedSession from your application's durable storage before calling. static async Task<AgentResponse> ContinueConversationAsync( IServiceProvider services, JsonElement savedSession) { AIAgent agent = services.GetDurableAgentProxy("SupportAgent"); AgentSession session = await agent.DeserializeSessionAsync(savedSession); return await agent.RunAsync( "The order number is 12345.", session: session); } Python from typing import Any from agent_framework import AgentResponse from agent_framework_durabletask import ( DurableAIAgentClient, DurableAgentSession, ) # First request: start the conversation and return its serialized session reference. def start_conversation( durable_client: DurableAIAgentClient, ) -> dict[str, Any]: agent = durable_client.get_agent("SupportAgent") session = agent.create_session() agent.run("I need help with my order.", session=session) # to_dict() returns only the lightweight session reference dict (containing # durable_session_id); Durable Task already stores the conversation history # in the backend. return session.to_dict() # Later request, after a restart or on another compatible worker. def continue_conversation( durable_client: DurableAIAgentClient, saved_session: dict[str, Any], ) -> AgentResponse: agent = durable_client.get_agent("SupportAgent") session = DurableAgentSession.from_dict(saved_session) return agent.run("The order number is 12345.", session=session) Coordinate multi-step agentic workflows reliably A simple customer question can lead to several steps: look up records, prepare a response, and send it to the right person or system. If something interrupts the process halfway through, your application needs to know what has already finished and what still needs to happen. Durable Task saves the results of agent calls and activities as the workflow progresses. After an interruption, the orchestration replays its history, reuses saved results, and continues with unfinished work. Completed agent calls whose results have been recorded don’t need to call the model again during replay, avoiding unnecessary token usage and inference costs during recovery. C# // Registered as the Durable Task orchestration for this workflow. static async Task<string> RunOrderResponseWorkflowAsync( TaskOrchestrationContext context, string orderNumber) { DurableAIAgent agent = context.GetAgent("OrderAgent"); AgentSession session = await agent.CreateSessionAsync(); AgentResponse<TextResponse> summary = await agent.RunAsync<TextResponse>( message: $"Summarize order {orderNumber}.", session: session); AgentResponse<TextResponse> reply = await agent.RunAsync<TextResponse>( message: $"Draft a customer reply: {summary.Result.Text}", session: session); return reply.Text; } Python # Registered as the Durable Task orchestration for this workflow. def run_order_response_workflow( context: OrchestrationContext, order_number: str, ): agent_context = DurableAIAgentOrchestrationContext(context) agent = agent_context.get_agent("OrderAgent") session = agent.create_session() summary = yield agent.run( messages=f"Summarize order {order_number}.", session=session, ) reply = yield agent.run( messages=f"Draft a customer reply: {summary.text}", session=session, ) return reply.text Make graph-based workflows durable If you prefer to build workflows as graphs in Agent Framework, you can use that approach too. The Durable Task extension runs your graph as a durable orchestration, keeping track of its progress so it can recover from failures and interruptions. You only need to register the graph. The extension takes care of registering its agents, activities for the other executors, and the orchestration that runs it. C# Workflow expertTeamWorkflow = new WorkflowBuilder(questionParser) .WithName("ExpertTeamReview") .AddFanOutEdge(questionParser, [biologist, physicist]) .AddFanInBarrierEdge([biologist, physicist], responseAggregator) .Build(); services.ConfigureDurableWorkflows( options => options.AddWorkflow(expertTeamWorkflow)); Python expert_team_workflow = ( WorkflowBuilder( name="ExpertTeamReview", start_executor=question_parser, ) .add_fan_out_edges( source=question_parser, targets=[biologist, physicist], ) .add_fan_in_edges( sources=[biologist, physicist], target=response_aggregator, ) .build() ) # agent_worker wraps the Durable Task worker. agent_worker.configure_workflow(expert_team_workflow) As agents and executors finish their work, Durable Task saves their results and reuses them during replay. You define how the work connects in the graph, and Durable Task handles preserving progress and recovering execution. Human in the loop Sometimes an agent needs someone to review a draft, approve an action, or provide more information before the work can continue. That response might take an hour, a day, or longer. Keeping a worker running just to wait can add cost and prevent the application from scaling down. With the Durable Task extension, the workflow can save its progress and wait for an external event without keeping a worker active. When the person responds, an HTTP endpoint, agent tool, or other application code sends the event to the matching workflow instance. The orchestration picks up from its saved state and continues the work. C# // Registered as the Durable Task orchestration for this workflow. static async Task<string> RunContentReviewWorkflowAsync( TaskOrchestrationContext context, GeneratedContent draft) { await context.CallActivityAsync(nameof(NotifyReviewer), draft); HumanApprovalResponse decision = await context.WaitForExternalEvent<HumanApprovalResponse>( eventName: "HumanApproval", timeout: TimeSpan.FromHours(24)); if (!decision.Approved) return "Content was not approved."; await context.CallActivityAsync(nameof(PublishContent), draft); return "Content published."; } // From the approval endpoint or agent tool, outside the orchestration: await client.RaiseEventAsync(instanceId, "HumanApproval", approvalResponse); Python # Registered as the Durable Task orchestration for this workflow. def run_content_review_workflow( context: OrchestrationContext, draft: dict[str, str], ): yield context.call_activity("notify_reviewer", input=draft) decision = yield context.wait_for_external_event("HumanApproval") if not decision["approved"]: return {"status": "not-approved"} yield context.call_activity("publish_content", input=draft) return {"status": "published"} # From the approval endpoint or agent tool, outside the orchestration: client.raise_orchestration_event( instance_id=instance_id, event_name="HumanApproval", data={"approved": True}, ) Observe agents and workflows in one place When your application uses the Durable Task Scheduler as the durable backend, you can see what your agents and workflows are doing in the Durable Task Scheduler dashboard, whether they run in Azure Functions or a self-hosted application. Open an agent session to review its conversation history, see the timeline of its execution, and check reported token usage. For workflows, you can check their status and see how the work has progressed through the timeline, event history, and flow views. Open an individual step to inspect its inputs and outputs, understand what happened, or investigate a failure. Build with the Durable Task extension You can run durable agents and workflows in Azure Functions, or host them in your own .NET or Python application. The examples below show how to register your agents and workflows with the host that runs them. They assume you’ve already defined the agents, workflow graphs, and orchestration functions. Hosting environment .NET Python Azure Functions Microsoft.Agents.AI.Hosting.AzureFunctions agent-framework-azurefunctions Self-hosted applications Microsoft.Agents.AI.DurableTask agent-framework-durabletask Azure Functions Azure Functions gives you managed HTTP endpoints and scales with demand. To get started, add Microsoft.Agents.AI.Hosting.AzureFunctions for .NET or agent-framework-azurefunctions for Python to your Functions project, and configure its Durable Task backend. C# example for Azure Functions Register standalone agents and agents used by your own orchestrations with ConfigureDurableAgents. For Agent Framework workflow graphs, use ConfigureDurableWorkflows. You can use either method on its own or combine them to host agents and graphs in the same application. using IHost app = FunctionsApplication .CreateBuilder(args) .ConfigureFunctionsWebApplication() .ConfigureDurableAgents(options => options.AddAIAgent(agent)) .ConfigureDurableWorkflows(options => options.AddWorkflow(workflow)) .Build(); app.Run(); For a Durable Task orchestration, mark its entry point with [Function] and [OrchestrationTrigger] so Azure Functions can discover it. If you register an Agent Framework graph, the extension creates the supporting orchestration for you. Python Pass standalone agents and agents used by your own orchestrations to AgentFunctionApp through the agents argument. For an Agent Framework graph, use the workflow argument. You can provide either or both. from agent_framework_azurefunctions import AgentFunctionApp app = AgentFunctionApp( agents=[agent], workflow=workflow, ) For a Durable Task orchestration, mark its entry point with app.orchestration_trigger(context_name="context"). For an Agent Framework graph, AgentFunctionApp adds that trigger for you. The C# Functions samples and Python Functions samples show the full project setup and how to call your agents and workflows. Self-hosted applications You can also run durable agents and workflows in your own application with Microsoft.Agents.AI.DurableTask for .NET or agent-framework-durabletask for Python. You choose where the application runs and how users or other systems call it. Durable Task handles saving execution state and recovering work after interruptions. C# example for self-hosted applications Configure the Durable Task worker and client, register your agents, and add any Agent Framework graphs. using IHost host = Host.CreateDefaultBuilder(args) .ConfigureServices(services => { services.ConfigureDurableAgents( options => options.AddAIAgent(agent), workerBuilder: builder => builder.UseDurableTaskScheduler(connectionString), clientBuilder: builder => builder.UseDurableTaskScheduler(connectionString)); services.ConfigureDurableWorkflows( options => options.AddWorkflow(workflow)); }) .Build(); await host.RunAsync(); For a Durable Task orchestration, also register it through AddTasks in the workerBuilder callback. For example, this registers the earlier order-response function and passes it the orchestration input: workerBuilder: builder => { builder.UseDurableTaskScheduler(connectionString); builder.AddTasks(registry => registry.AddOrchestratorFunc( "RunOrderResponseWorkflow", (TaskOrchestrationContext context) => RunOrderResponseWorkflowAsync( context, context.GetInput<string>() ?? throw new ArgumentException( "An order number is required.")))); } The scheduler integration requires Microsoft.DurableTask.Worker.AzureManaged and Microsoft.DurableTask.Client.AzureManaged alongside the extension. Python example for self-hosted applications Pass your configured Durable Task worker to DurableAIAgentWorker, then register your agents, orchestrations, and workflow graphs before starting the worker. from agent_framework_durabletask import DurableAIAgentWorker agent_worker = DurableAIAgentWorker(worker) # Register an agent and an orchestration you wrote directly. agent_worker.add_agent(order_agent) worker.add_orchestrator(run_order_response_workflow) # Register a graph and let the extension configure its components. agent_worker.configure_workflow(workflow) worker.start() Register only the components your application needs, or combine them in the same worker. Your application keeps the worker running and calls worker.stop() when it shuts down. When you deploy, configure your Durable Task Scheduler endpoint, task hub, and authentication. Durable Task Scheduler is the recommended backend for Durable Functions and the Durable Task SDKs. Start with a sample You don’t have to start from scratch. Pick a sample for your language and hosting environment, and build from there: - .NET Azure Functions samples - .NET self-hosted samples - Python Azure Functions samples - Python Durable Task samples Read the Durable Task extension documentation to get started, and share feedback or contribute in the Microsoft Agent Framework Durable Task extension repository1.7KViews1like0Comments