Skip to content

[sdk] Add an async Python client with cancellation and lifecycle management #595

Done

Description

@ravi-decoverai

Phase: M - SDK simplification · Tracker: #590 · Priority: P1

Problem

The current Python client uses blocking HTTP. Bulk helpers use threads, but there is no native async client/iterator for concurrent agent tools and async application servers.

Scope

  • Add async client and namespace APIs matching the native synchronous contract.
  • Use nonblocking I/O, async context management and explicit connection cleanup.
  • Support cancellation during requests, backoff and streaming/iteration.
  • Share serialization, errors, idempotency decisions and retry defaults with the synchronous API.
  • Provide a bounded-concurrency agent retrieval example.

Done when

  • Delayed HTTP calls do not block an independent event-loop task.
  • Cancelling a request or iterator prevents later retries/dispatch and releases request resources.
  • Closing the client releases connections; async context-manager behavior is documented.
  • Shared error/retry/serialization fixtures pass for synchronous and asynchronous variants.
  • The same native documents and query options work with both variants.
  • The example demonstrates parallel retrieval with an explicit concurrency bound.

Dependencies and evidence

Depends on #591, #592 and #594.

Current Python transport · native helpers · shared retry contract.

Activity

  1. added
    roadmap
    area:api
    phase:M
    on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:apiphase:Mroadmap

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions