Skip to main content
BlobHub is the one-stop shop for agentic development. It is a new set of primitives to build against, which makes agents, copilots and the apps that use them easy to design and build — and inherently compatible, because they are all made of the same parts. Agents live and work inside BlobHub, so it is the system of record and action for them: every agent runs inside guardrails the company sets, and everything it does is on the record, written by the work itself. Under the hood, BlobHub is a serverless platform for versioned blob storage with workflow automation: a workflow, a schedule or a model is a typed, versioned blob behind one REST API. The BlobHub Python SDK, blobhub, runs workflows and reads their record from Python and notebooks. Its workflow module runs a definition that is already deployed, follows a session’s events and waits for a run; a generic layer reaches blobs, revisions and any blob type’s data commands, and typed modules cover ONNX models and OrientDB graphs. It is a synchronous client of the public REST API, and finds its key the way the CLI does, from an argument, the environment or a shared profile, falling back to an anonymous token that reads public content.

Install

Python 3.10 or newer. The only dependencies are httpx and PyYAML. This documents blobhub 0.2 and later, a rewrite. Code written for 0.1.x does not run against it, and 0.1.x cannot reach the current API at all; see Migrating from 0.1.x.

Connect

connect() makes no network call. It takes its API key from the first place that has one: the api_key= argument, the BLOBHUB_API_KEY environment variable, or a profile that blobhub login stored in ~/.blobhub/credentials.yaml. With none of them, it reads as an anonymous visitor. Credentials and profiles has the full order and its rules. hub.identity says where the key came from and which API the client talks to. It never shows the key itself. hub.whoami() returns your user record, or None for an anonymous client.

Read a public model

Public content needs no account. connect(anonymous=True) ignores any stored profile and reads as an anonymous visitor, so this runs on any machine:
hub.blob() takes an organization and a blob, each an alias or an id. revision() with no argument is the blob’s default revision. Onnx is the typed module for ONNX blobs, and download() returns the local path of the model.

What is in the package

The generic layer works with every blob type. A typed module is a view over one revision of one type, and it uses nothing below that revision. A type with no module of its own, such as a scheduler blob, is still reachable through the revision’s data channel, revision.query() and revision.command().

What it does not do

  • No async client and no WebSocket. Waiting is polling, and so is following a session’s event stream (Session.events(follow=True)). For a push connection, use the WebSocket API.
  • No login. The SDK reads profiles and never writes them. blobhub login, from blobhub-cli, stores them.
  • No organization or blob administration in its public API: creating and deleting blobs, API keys and members. hub.request() reaches those routes when you need them.
  • No workflow authoring. Writing and deploying definitions is blobhub-cli’s job. The SDK runs what is deployed.

Next steps

Credentials and profiles

Where the SDK finds its key, and how to read public content without one.

Blobs and revisions

The generic layer: blobs, revisions, the data channel and operations.

Errors and retries

What each error means, and which requests the SDK repeats.