Brainby arc-labs/docs
Changelog

Python SDK changelog

Release notes for brain-db-sdk on PyPI.

0.1.0 — initial public pre-release

The first published version of the hand-written Python SDK (pip install brain-db-sdk, import brain_db_sdk). Feature-parity with the TypeScript SDK, two clients over one package.

Added

  • HTTP clientBrainHttpClient, a synchronous JSON client built on the standard library's urllib.request (zero third-party dependencies). Verbs: encode, recall, forget, link, unlink, plan, reason, whoami, capabilities. Signature BrainHttpClient(api_key, base_url=..., timeout=30.0, retry=None)api_key positional first; base_url defaults to http://127.0.0.1:8080.
  • Wire clientBrainClient, speaking the BRN0 binary protocol with the full surface: memory verbs plus typed-graph create/read, schema, transactions, and SUBSCRIBE streaming. Connect with BrainClient.connect(host, port, auth) / .connect_with(host, port, config).
  • Membership-shaped recallrecall returns a Single / Many / None verdict with the supporting memories, not a ranked list. Absence is explicit.
  • Request buildersEncodeBuilder, RecallBuilder, ForgetBuilder, including per-request act_as(namespace, agent_id).
  • AuthAuthorization: Bearer <key> on the HTTP client; token / mTLS on the wire client after the WELCOME handshake.
  • Connection pool, mux, and retry — a pooled multiplexed connection and an HttpRetryPolicy (idempotent verbs only: encode, whoami, capabilities; retried on 503 and transport/timeout, honoring Retry-After).
  • Error taxonomyBrainHttpError (status / code / message) for the HTTP client and the wire-client error hierarchy, both exported from the package root.
  • Wire layer — CBOR codec (shortest round-tripping float per field), frame codec with CRC32C, and opcode table, validated against the shared wire conformance corpus so the Python, TypeScript, and Rust SDKs stay byte-for-byte in agreement.

Was this page helpful?

On this page