{"id":4010,"date":"2026-09-22T08:00:44","date_gmt":"2026-09-22T15:00:44","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/azure-sdk\/?p=4010"},"modified":"2026-09-22T14:40:59","modified_gmt":"2026-09-22T21:40:59","slug":"using-azure-blob-storage-as-a-durable-filesystem-for-langchain-deep-agents-2","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/azure-sdk\/using-azure-blob-storage-as-a-durable-filesystem-for-langchain-deep-agents-2\/","title":{"rendered":"Using Azure Blob Storage as a durable filesystem for LangChain Deep Agents"},"content":{"rendered":"<p><a href=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/azure-blob-deep-agents-hero_2.webp\"><img decoding=\"async\" class=\"alignnone wp-image-4001\" src=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/azure-blob-deep-agents-hero_2.webp\" alt=\"azure blob deep agents hero 2 image\" width=\"1342\" height=\"767\" srcset=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/azure-blob-deep-agents-hero_2.webp 1960w, https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/azure-blob-deep-agents-hero_2-300x171.webp 300w, https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/azure-blob-deep-agents-hero_2-1024x585.webp 1024w, https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/azure-blob-deep-agents-hero_2-768x439.webp 768w, https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/azure-blob-deep-agents-hero_2-1536x878.webp 1536w\" sizes=\"(max-width: 1342px) 100vw, 1342px\" \/><\/a><\/p>\n<p class=\"lead\"><a href=\"https:\/\/docs.langchain.com\/oss\/python\/deepagents\/overview\">LangChain Deep Agents<\/a> is an open-source agent harness with built-in capabilities for building LLM-powered agents and applications, including complex, multi-step workflows.<\/p>\n<p>A model can reason and generate responses, but it needs a harness to do useful work over time. The harness provides the tools and runtime that let the model retrieve the right context, take actions, and manage work across multiple steps. Deep Agents supplies that structure through planning, context management, a virtual filesystem, memory and skills, specialized subagents, and human approval points.<\/p>\n<p>Filesystems give agents a familiar way to organize and work with context. An agent can list and search files, read only what the current task needs, update artifacts, keep notes, and share work with subagents. This makes the filesystem useful as both a workspace and external memory for long-running tasks, a pattern LangChain highlights in its <a href=\"https:\/\/www.langchain.com\/blog\/deep-agents\">Deep Agents architecture<\/a>. Deep Agents exposes this pattern through tools for listing, searching, reading, writing, and editing files.<\/p>\n<p>When agents run in the cloud at scale, provisioning and managing a traditional filesystem for every agent can add infrastructure and lifecycle overhead. Developed through collaboration between LangChain and Azure Storage, <a href=\"https:\/\/github.com\/langchain-ai\/langchain-azure\/tree\/main\/libs\/azure-storage#deep-agents-azure-blob-storage-backend-usage\"><code>AzureBlobBackend<\/code><\/a> gives <a href=\"https:\/\/docs.langchain.com\/oss\/python\/deepagents\/backends\">Deep Agents<\/a> a virtual filesystem backed by Azure Blob Storage. The agent works through familiar filesystem tools such as <code>ls<\/code>, <code>read_file<\/code>, <code>write_file<\/code>, <code>edit_file<\/code>, <code>glob<\/code>, and <code>grep<\/code>, while Blob Storage provides durable, elastic storage underneath. Files can outlive an agent process, be shared across agents and applications, and remain accessible through familiar Azure security and data-management tools. The integration is available through the <a href=\"https:\/\/pypi.org\/project\/langchain-azure-storage\/\"><code>langchain-azure-storage<\/code><\/a> package in Public Preview.<\/p>\n<h2>Why use Blob Storage for a Deep Agents filesystem?<\/h2>\n<h3>Build self-improving workflows on durable state<\/h3>\n<p>Blob Storage can preserve the files that shape an agent&#8217;s behavior across sessions, including agent instructions, skill libraries, logs, memory, and offloaded context. Agents can read and update these artifacts over repeated runs, enabling feedback loops that retain useful experience and improve performance incrementally.<\/p>\n<h3>Create secure, organized filesystems for collaborating agents<\/h3>\n<p>Blob containers provide access boundaries that can be secured with Azure role-based access control, while familiar blob paths keep shared artifacts organized. This makes it practical for multiple agents to collaborate through the same filesystem while keeping access appropriately scoped.<\/p>\n<h3>Scale across enterprise document collections<\/h3>\n<p>Blob Storage provides durable, elastic storage for large enterprise document collections. Multiple agents can securely access the same corpus without relying on worker-local disks or managing storage capacity as data and workloads grow.<\/p>\n<h3>Inspect and operate the filesystem outside the agent<\/h3>\n<p>Developers can inspect agent-created files through the Azure portal, Azure Storage Explorer, or other applications with authorized access. They can scan files, run independent processing, and support interactions with people or tools that use the same data. Access control, diagnostics, retention, recovery, and lifecycle management remain available independently of the agent.<\/p>\n<h2>Getting started<\/h2>\n<p>Get started by connecting a simple agent to Blob Storage. The following example writes a file with one agent, then creates a second agent with the same backend and reads the file from their shared Blob-backed workspace.<\/p>\n<h3>Create the filesystem container<\/h3>\n<p>Choose an Azure storage account and a blob container for the agent&#8217;s filesystem. You can use an existing container or create one in the Azure portal by opening the storage account, selecting <strong>Data storage &gt; Containers<\/strong>, and selecting <strong>+ Container<\/strong>. This article uses <code>agent-files<\/code> as an example name. Copy the storage account&#8217;s Blob service endpoint, which has the form <code>https:\/\/&lt;storage-account&gt;.blob.core.windows.net<\/code>.<\/p>\n<h3>Grant access to the container<\/h3>\n<p>Assign <a href=\"https:\/\/learn.microsoft.com\/azure\/role-based-access-control\/built-in-roles\/storage#storage-blob-data-contributor\">Storage Blob Data Contributor<\/a> on the container to the identity that will run the agent. For local development, assign the role to your user account and sign in with the Azure CLI:<\/p>\n<pre><code class=\"language-bash\">az login<\/code><\/pre>\n<p>When the application runs in Azure, assign the same role to its managed identity or workload identity instead. The Azure host provides that identity to the application, so the deployed application does not need an Azure CLI sign-in or storage account keys.<\/p>\n<h3>Install the integration<\/h3>\n<p>Use Python 3.11 or later. Install the storage integration:<\/p>\n<pre><code class=\"language-bash\">pip install -U \"langchain-azure-storage[deepagents]\"<\/code><\/pre>\n<p>Deep Agents supports multiple model providers. Choose and install one using the <a href=\"https:\/\/docs.langchain.com\/oss\/python\/deepagents\/quickstart\">Deep Agents quickstart<\/a>. This example uses <code>openai:gpt-6-astra<\/code>; if you choose it, install <code>langchain-openai<\/code> and set <code>OPENAI_API_KEY<\/code>:<\/p>\n<pre><code class=\"language-bash\">pip install -U langchain-openai<\/code><\/pre>\n<p>Set the API key in Bash:<\/p>\n<pre><code class=\"language-bash\">export OPENAI_API_KEY=\"your-api-key\"<\/code><\/pre>\n<p>Or, in PowerShell:<\/p>\n<pre><code class=\"language-powershell\">$env:OPENAI_API_KEY = \"your-api-key\"<\/code><\/pre>\n<h3>Connect the backend to the agent<\/h3>\n<p>Create <code>AzureBlobBackend<\/code> with the Blob service endpoint and the exact name of your chosen container, \u201cagent-files\u201d in this example, then pass it to <code>create_deep_agent<\/code>. By default, the backend uses <a href=\"https:\/\/learn.microsoft.com\/azure\/developer\/python\/sdk\/authentication\/credential-chains?tabs=dac#defaultazurecredential-overview\"><code>DefaultAzureCredential<\/code><\/a>, so the same code works with your Azure CLI sign-in locally and an Azure identity when deployed.<\/p>\n<pre><code class=\"language-python\">from deepagents import create_deep_agent\r\nfrom langchain_azure_storage.deepagents import AzureBlobBackend\r\n\r\nbackend = AzureBlobBackend(\r\n    account_url=\"https:\/\/&lt;storage-account&gt;.blob.core.windows.net\",\r\n    container_name=\"agent-files\",\r\n)\r\n\r\nagent = create_deep_agent(\r\n    model=\"openai:gpt-6-astra\",\r\n    backend=backend,\r\n)\r\n\r\nagent.invoke(\r\n    {\r\n        \"messages\": [\r\n            {\r\n                \"role\": \"user\",\r\n                \"content\": \"Create \/hello.py with a Python hello world script.\",\r\n            }\r\n        ]\r\n    }\r\n)<\/code><\/pre>\n<p>Deep Agents exposes filesystem tools backed by the container. In this example, the agent uses <code>write_file<\/code> to create <code>hello.py<\/code> as a blob.<\/p>\n<h3>Share the workspace with another agent<\/h3>\n<p>Create another agent with the existing backend, then ask it to read the file. The two agent instances share the same Blob-backed workspace, even though the second agent has no earlier conversation state.<\/p>\n<pre><code class=\"language-python\">another_agent = create_deep_agent(\r\n    model=\"openai:gpt-6-astra\",\r\n    backend=backend,\r\n)\r\n\r\nresult = another_agent.invoke(\r\n    {\r\n        \"messages\": [\r\n            {\r\n                \"role\": \"user\",\r\n                \"content\": \"Read \/hello.py and explain what the script does.\",\r\n            }\r\n        ]\r\n    }\r\n)\r\nprint(result[\"messages\"][-1].content)<\/code><\/pre>\n<p>Both agents use the same backend object and therefore the same Blob-backed filesystem. This lets multiple agents exchange artifacts through a shared workspace. With basic sharing working, explore the <a href=\"https:\/\/github.com\/langchain-ai\/langchain-azure\/blob\/main\/samples\/deepagents-storage-backend\/mortgage-processing\/README.md\">mortgage packet processing example<\/a> to see how the same approach supports a complete multi-agent workflow.<\/p>\n<h2>Build a multi-agent mortgage processing workflow<\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/Mortgage-Packet-Processing-demo.webp\"><img decoding=\"async\" class=\"alignnone wp-image-3993\" src=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/Mortgage-Packet-Processing-demo.webp\" alt=\"Mortgage Packet Processing demo image\" width=\"1239\" height=\"795\" srcset=\"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/Mortgage-Packet-Processing-demo.webp 1981w, https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/Mortgage-Packet-Processing-demo-300x192.webp 300w, https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/Mortgage-Packet-Processing-demo-1024x657.webp 1024w, https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/Mortgage-Packet-Processing-demo-768x493.webp 768w, https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-content\/uploads\/sites\/58\/2026\/09\/Mortgage-Packet-Processing-demo-1536x985.webp 1536w\" sizes=\"(max-width: 1239px) 100vw, 1239px\" \/><\/a><\/p>\n<p>The <a href=\"https:\/\/github.com\/langchain-ai\/langchain-azure\/blob\/main\/samples\/deepagents-storage-backend\/mortgage-processing\/README.md\">mortgage processing example<\/a> provides a complete application pattern. It uses one coordinator and four specialist Deep Agents for packet intake, document classification, fact extraction, and underwriting. Instead of sending every file to Blob Storage, it uses <a href=\"https:\/\/docs.langchain.com\/oss\/python\/deepagents\/backends#compositebackend-router\"><code>CompositeBackend<\/code><\/a> to route only durable application data to three Blob-backed filesystem locations:<\/p>\n<ul>\n<li><code>\/source\/<\/code> contains read-only mortgage packet evidence.<\/li>\n<li><code>\/guidance\/<\/code> contains read-only <code>AGENTS.md<\/code> instructions and specialist skills.<\/li>\n<li><code>\/output\/<\/code> stores the packet index, classification, extracted facts, and underwriting decision for each run.<\/li>\n<\/ul>\n<pre><code class=\"language-python\">source_backend = AzureBlobBackend(\r\n    account_url=account_url,\r\n    container_name=\"mortgage-packets\",\r\n    prefix=\"MORT-2026-0042\/\",\r\n)\r\nguidance_backend = AzureBlobBackend(\r\n    account_url=account_url,\r\n    container_name=\"mortgage-agent-context\",\r\n)\r\noutput_backend = AzureBlobBackend(\r\n    account_url=account_url,\r\n    container_name=\"mortgage-decisions\",\r\n    prefix=f\"MORT-2026-0042\/{run_id}\/\",\r\n)\r\n\r\nbackend = CompositeBackend(\r\n    default=StateBackend(),\r\n    routes={\r\n        \"\/source\/\": source_backend,\r\n        \"\/guidance\/\": guidance_backend,\r\n        \"\/output\/\": output_backend,\r\n    },\r\n)<\/code><\/pre>\n<p><code>StateBackend<\/code> keeps thread-scoped working files, such as offloaded tool results, conversation history, and intermediate plans, in agent state. The explicit Blob routes preserve files needed across threads or processes, including source evidence, reusable instructions and skills, and generated decisions.<\/p>\n<p>To protect source evidence and guidance from tampering, the sample passes <a href=\"https:\/\/docs.langchain.com\/oss\/python\/deepagents\/permissions\"><code>FilesystemPermission<\/code><\/a> rules to <code>create_deep_agent<\/code>. The rules deny write operations on <code>\/source\/**<\/code> and <code>\/guidance\/**<\/code> for the coordinator and its subagents. See the <a href=\"https:\/\/github.com\/langchain-ai\/langchain-azure\/blob\/94a4847a61c8a913232c5332dffbb9e7acc71ad1\/samples\/deepagents-storage-backend\/mortgage-processing\/app.py#L72-L80\">permission configuration in <code>app.py<\/code><\/a>, then use the <a href=\"https:\/\/github.com\/langchain-ai\/langchain-azure\/blob\/main\/samples\/deepagents-storage-backend\/mortgage-processing\/README.md\">complete mortgage processing example<\/a> as a starting point for your own workflow.<\/p>\n<h2>Additional configuration recommendations<\/h2>\n<h3>Use additional Azure authentication options<\/h3>\n<p><code>AzureBlobBackend<\/code> uses <code>DefaultAzureCredential<\/code> by default. It can use your Azure CLI identity locally and an available managed identity or workload identity in Azure.<\/p>\n<p>If your security policy requires managed-identity-only authentication, pass <code>ManagedIdentityCredential<\/code> explicitly. Use the host&#8217;s system-assigned identity or provide the client ID of a user-assigned identity. The identity needs access to the container, and its credential is never exposed to the agent or model.<\/p>\n<pre><code class=\"language-python\">import os\r\n\r\nfrom azure.identity import ManagedIdentityCredential\r\nfrom langchain_azure_storage.deepagents import AzureBlobBackend\r\n\r\n# System-assigned identity:\r\ncredential = ManagedIdentityCredential()\r\n\r\n# For a user-assigned identity, use this instead:\r\n# credential = ManagedIdentityCredential(\r\n#     client_id=os.environ[\"AZURE_CLIENT_ID\"],\r\n# )\r\n\r\nbackend = AzureBlobBackend(\r\n    account_url=\"https:\/\/&lt;storage-account&gt;.blob.core.windows.net\",\r\n    container_name=\"agent-files\",\r\n    credential=credential,\r\n)<\/code><\/pre>\n<h3>Route only durable paths to Blob Storage<\/h3>\n<p>Use <code>CompositeBackend<\/code> to route cross-thread files such as memory, skills, shared policies, source documents, and final artifacts to <code>AzureBlobBackend<\/code>. Keep thread-scoped working files such as intermediate plans and offloaded tool results in <code>StateBackend<\/code>. Agents connected to the same Blob routes can resume or share durable files, which remain available for inspection outside the agent.<\/p>\n<h3>Protect the filesystem<\/h3>\n<p>The backend exposes filesystem operations to the agent, including operations that can overwrite or remove data. Apply the same care you would use when granting any automated system write access to storage.<\/p>\n<ul>\n<li><strong>Use a dedicated blob container for isolation.<\/strong> Assign each agent, tenant, or workload that needs a separate access boundary with its own container.<\/li>\n<li><strong>Use least-privilege access.<\/strong> Scope the Azure role assignment to the blob container the identity needs. Use <code>Storage Blob Data Reader<\/code> for read-only workflows and grant <code>Storage Blob Data Contributor<\/code> only when writes or deletes are required.<\/li>\n<li><strong>Enable recovery features.<\/strong> Turn on <a href=\"https:\/\/learn.microsoft.com\/azure\/storage\/blobs\/soft-delete-blob-overview\">blob soft delete<\/a> and, where appropriate, <a href=\"https:\/\/learn.microsoft.com\/azure\/storage\/blobs\/versioning-overview\">blob versioning<\/a>.<\/li>\n<li><strong>Limit destructive tools.<\/strong> If an agent does not need deletion, omit the <code>delete<\/code> tool from <code>FilesystemMiddleware<\/code> or require human approval before it runs.<\/li>\n<\/ul>\n<h2>Next steps<\/h2>\n<p>Use <code>AzureBlobBackend<\/code> to give Deep Agents a durable filesystem that can persist across processes, support collaboration, and use the security and data-management capabilities of Azure Blob Storage. The <a href=\"https:\/\/github.com\/langchain-ai\/langchain-azure\/tree\/main\/samples\/deepagents-storage-backend\">Deep Agents storage backend samples<\/a> include runnable examples for:<\/p>\n<ul>\n<li>Creating a basic agent with a Blob-backed filesystem.<\/li>\n<li>Sharing one Blob-backed workspace between two agent instances.<\/li>\n<li>Combining persistent memory, a shared filesystem, and subagents through <code>CompositeBackend<\/code>.<\/li>\n<\/ul>\n<p>Review the <a href=\"https:\/\/docs.langchain.com\/oss\/python\/integrations\/providers\/microsoft#backends\">Microsoft integrations documentation for LangChain backends<\/a>, explore the <a href=\"https:\/\/github.com\/langchain-ai\/langchain-azure\/tree\/main\/libs\/azure-storage\"><code>langchain-azure-storage<\/code> source and documentation<\/a>, and use the <a href=\"https:\/\/github.com\/langchain-ai\/langchain-azure\/pull\/1002\">mortgage processing example<\/a> to build a durable multi-agent workflow with your own data. Share feedback about this backend or ideas for other LangChain storage integrations through <a href=\"https:\/\/github.com\/langchain-ai\/langchain-azure\/issues\">GitHub issues<\/a>.<\/p>\n<p>This integration was developed through collaboration between LangChain and Azure Storage. Thanks to <a href=\"https:\/\/github.com\/kyleknap\">Kyle Knapp<\/a> for driving the integration and review, and <a href=\"https:\/\/github.com\/darieldatoon\">Dariel Dato-on<\/a> for the implementation and test contributions.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LangChain Deep Agents is an open-source agent harness with built-in capabilities for building LLM-powered agents and applications, including complex, multi-step workflows. A model can reason and generate responses, but it needs a harness to do useful work over time. The harness provides the tools and runtime that let the model retrieve the right context, take [&hellip;]<\/p>\n","protected":false},"author":199674,"featured_media":4020,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[786,802,950,162,738],"class_list":["post-4010","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure-sdk","tag-ai","tag-blob-storage","tag-ml","tag-python","tag-storage"],"acf":[],"blog_post_summary":"<p>LangChain Deep Agents is an open-source agent harness with built-in capabilities for building LLM-powered agents and applications, including complex, multi-step workflows. A model can reason and generate responses, but it needs a harness to do useful work over time. The harness provides the tools and runtime that let the model retrieve the right context, take [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/4010","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/users\/199674"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/comments?post=4010"}],"version-history":[{"count":2,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/4010\/revisions"}],"predecessor-version":[{"id":4019,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/posts\/4010\/revisions\/4019"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media\/4020"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/media?parent=4010"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/categories?post=4010"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/azure-sdk\/wp-json\/wp\/v2\/tags?post=4010"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}