Skip to content

feat: add native async client (AsyncDynavec) via aioboto3 - #266

Open
ramashishmaurya wants to merge 12 commits into
codeforstartups:developmentfrom
ramashishmaurya:feat/async-dynavec
Open

ramashishmaurya wants to merge 12 commits into
codeforstartups:developmentfrom
ramashishmaurya:feat/async-dynavec

Conversation

@ramashishmaurya

Copy link
Copy Markdown
Contributor

Description

This PR introduces the Native Async Client (AsyncDynavec), fulfilling one of the major requested features on the v0.7 roadmap.

Modern AI agents and web frameworks (like FastAPI) operate asynchronously. The blocking nature of boto3 can be a bottleneck for high-concurrency production workloads. This PR implements a fully non-blocking architecture using aioboto3 while strictly maintaining the serverless, AWS-native philosophy of dynavec.

Related issue

Fixes #[Leave this blank or put the issue number if there is an open issue for Async Client]

Changes

  • Created AsyncDynavec Client, which fully mirrors the synchronous Dynavec client but exposes async def search() and async def upsert().
  • Implemented AsyncS3VectorsStore and AsyncDynamoDBStore to handle non-blocking AWS API interactions using aioboto3.
  • Offloaded blocking embedder models (e.g., OpenAIEmbedder) to an asyncio thread pool executor to prevent event loop blocking.
  • Added aioboto3>=13.0 as an optional dependency under the new [async] group and [all] group in pyproject.toml.
  • Added comprehensive pytest-asyncio coverage in test_async_client.py validating search and upsert logic.

Testing

  • Tests pass locally (pytest tests/test_async_client.py passes 100%)
  • Ruff checks pass
  • Documentation updated, if applicable (Will update in follow-up if required by maintainers)

Checklist

  • My changes are focused and relevant to this pull request.
  • I have added or updated tests where appropriate.
  • I have reviewed my changes for unrelated modifications.
  • I have updated documentation where necessary.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant