Skip to main content

Azure Blob Storage filesystem backend for LangChain Deep Agents

Project description

deepagents-azure-blob-backend

CI codecov

Azure Blob Storage filesystem backend for LangChain Deep Agents.

Deep Agents exposes a BackendProtocol — a pluggable interface for file operations (read, write, edit, ls, glob, grep) that the agent uses as its virtual filesystem. This package provides a production-ready implementation backed by Azure Blob Storage.

Installation

pip install deepagents-azure-blob-backend

Or with uv:

uv add deepagents-azure-blob-backend

Quick Start

import asyncio
from deepagents import create_deep_agent
from deepagents_azure_blob_backend import AzureBlobBackend, AzureBlobConfig

async def main():
    config = AzureBlobConfig(
        account_url="https://<your-account>.blob.core.windows.net",
        container_name="agent-workspace",
        prefix="session-001/",
    )
    backend = AzureBlobBackend(config)

    agent = create_deep_agent(backend=backend)

    result = await agent.ainvoke(
        {"messages": [{"role": "user", "content": "Create a hello world script at /hello.py"}]},
    )
    print(result["messages"][-1].content)
    await backend.close()

asyncio.run(main())

Configuration

from deepagents_azure_blob_backend import AzureBlobConfig

config = AzureBlobConfig(
    account_url="https://<account>.blob.core.windows.net",
    container_name="my-container",
    prefix="agent-workspace/",     # Namespace isolation for multi-agent setups
    credential=None,               # None → DefaultAzureCredential()
    max_concurrency=8,             # Parallel blob ops for grep/glob
    encoding="utf-8",
    connection_string=None,        # Override for Azurite / testing
)

Authentication

By default, DefaultAzureCredential is used, which supports:

  • Local development: az login, environment variables
  • Azure Container Apps: Managed identity
  • GitHub Actions: Workload identity federation (OIDC)

For local development with Azurite, use a connection string:

config = AzureBlobConfig(
    container_name="test",
    connection_string="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;...",
)

Supported Operations

All methods from BackendProtocol:

Method Async Description
ls_info(path) als_info List directory with synthesized subdirectories
read(path, offset, limit) aread Read file with line numbers
write(path, content) awrite Create new file (errors if exists)
edit(path, old, new) aedit String replacement editing
glob_info(pattern, path) aglob_info Glob pattern file matching
grep_raw(pattern, path, glob) agrep_raw Literal text search across files
upload_files(files) aupload_files Batch binary upload
download_files(paths) adownload_files Batch binary download

Development

# Install dev dependencies
uv sync --group dev

# Run unit tests
uv run pytest tests/test_backend_unit.py -v

# Run integration tests (requires Azurite)
docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite
uv run pytest tests/test_backend_integration.py -v

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deepagents_azure_blob_backend-0.1.1.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deepagents_azure_blob_backend-0.1.1-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file deepagents_azure_blob_backend-0.1.1.tar.gz.

File metadata

  • Download URL: deepagents_azure_blob_backend-0.1.1.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for deepagents_azure_blob_backend-0.1.1.tar.gz
Algorithm Hash digest
SHA256 33c16912ee3a44d171658246539ed796f3e0ce151111ee28269c0452a29d05cd
MD5 d2b388864c4324c490531607fd54c6d4
BLAKE2b-256 7db7d874eb8e30f5f091a58faf4368db840610a2d6d9ad9655f64b691c8dbd36

See more details on using hashes here.

File details

Details for the file deepagents_azure_blob_backend-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: deepagents_azure_blob_backend-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for deepagents_azure_blob_backend-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e3c873868b0ec00306159f3668649db084c2ca4b1be90900cf2e0eac059edf9
MD5 036f32931fb925d7b23b9531a621a85a
BLAKE2b-256 39308b194b446822aad3e75a96cb8233c124131e03ce65671793e50ff1be8000

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page