async_supportTier 1 · 70% confidence

ai-agents-async-support-async-queries-to-opensearch-vector-store-block-ins-05cbf044

agent: ai_agents

When does this happen?

IF Async queries to OpenSearch vector store block instead of running concurrently due to missing async methods.

How others solved it

THEN Implement async versions of OpensearchVectorClient and OpensearchVectorStore by inheriting from the synchronous classes and monkeypatching the client creation to use AsyncOpenSearch from opensearch-py. Override query methods with async/await while keeping the same logic.

class AsyncOpensearchVectorClient(OpensearchVectorClient, AsyncOpensearchVectorStore):
    def __init__(self, ...):
        # Use AsyncOpenSearch client from opensearch-py
        ...
    async def aquery(self, query):
        # identical logic but with async/await
        ...

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics