StoreBackend hangs on async stores — missing async methods for ls/glob/grep/download_files
Submission checklist
- This is a bug, not a usage question.
- I added a clear and descriptive title.
- I searched existing issues and didn't find this.
- I can reproduce this with the latest released version.
- I included a minimal reproducible example and steps to reproduce.
Area (Required)
- deepagents (SDK)
- dcode
- talon
- acp
- evals
- harbor
- daytona
- modal
- quickjs
- runloop
- vercel
- langsmith-sandbox
- Other / not sure / general
Related Issues / PRs
No response
Reproduction Steps / Example Code (Python)
import asyncio
from langgraph.store.postgres.aio import AsyncPostgresStore
from deepagents.backends.store import StoreBackend
async def main():
store = AsyncPostgresStore(conn) # any async BaseStore
backend = StoreBackend(namespace=lambda _: ("test",), store=store)
# These hang forever — sync methods call store.get()/store.search()
# on an async connection. BackendProtocol's default async impl
# wraps via asyncio.to_thread(sync), which also hangs.
await backend.adownload_files(["/AGENTS.md"]) # hangs
await backend.als("/") # hangs
await backend.aglob("*") # hangs
asyncio.run(main())Error Message and Stack Trace (if applicable)
Description
Problem
StoreBackend supports async stores (e.g. AsyncPostgresStore) for aread/awrite/aedit/adelete — they use store.aget/store.aput and _asearch_store_paginated (which uses store.asearch).
However, download_files, ls, glob, and grep only have sync versions that call store.get() / store.search(). On async stores, these sync methods hang — the async connection can't be used synchronously.
The BackendProtocol default async implementations fall back to asyncio.to_thread(sync_method), which still calls the sync store methods → same hang.
Fix
The library already has the async helper _asearch_store_paginated (used by adelete). These four methods just weren't wired up to it. Add adownload_files/als/aglob/agrep mirroring the sync bodies but using store.aget/store.asearch.
Environment / System Info
No response
Source: langchain-ai/deepagents