Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

mist-sdk: the Python SDK and the mist command

Mist is a governed place for agents' working data, a data plane: one identity, one set of access rules and one record of who did what, over the kinds of data agents work with. Today those are workspaces, named sets of files that agents and people share across sessions and machines, with a revision history, and lakes, named sets of tables an agent creates and works on with its own engine (DuckDB, PyIceberg or Polars).

Your org is your company in Mist, with its people, agents and roles. A namespace is where a team's workspaces and lakes live; you work in one at a time.

Install

pip install mist-sdk     # Python 3.10 or later: the Python package `mist` and the command `mist`

mist --version (and mist.__version__ in Python) is the version installed.

Sign in

mist login https://mist.example   # the address of your company's Mist; opens your identity provider in the browser
mist whoami

mist login <url> keeps your sign-in and the address of your Mist, and prints the line that sets MIST_IDENTITY_TOKEN_FILE to the sign-in (export MIST_IDENTITY_TOKEN_FILE=$HOME/.mist/identity-token). Set it, and DuckDB, PyIceberg and other tools use your sign-in the same way as the SDK. From then on the SDK and the command call that address, with that sign-in. mist login <another url> switches to another Mist; mist login alone signs in again to the same one; --no-browser gives a code to enter on another device. When the sign-in expires, a call says so.

A first workspace

import mist

ns = mist.connect(org="acme", namespace="research")
ws = ns.workspaces.create("market-research", description="Q3 notes")
ws.write_text("notes.md", "# Notes\n", if_absent=True)   # every write names what it is based on
print(ws.read_text("notes.md"))

In an agent runtime

Install mist-sdk (and mist-mcp, for the tools) in the runtime, give the agent its platform's token file, and set MIST_NAMESPACE once to the full name of the namespace it works in. Its calls then name only the address:

export MIST_IDENTITY_TOKEN_FILE=/var/run/secrets/mist/token
export MIST_NAMESPACE=arn:mist:mist::acme:namespace/research
mist-mcp --url https://mist.example            # the MCP tools, with no org or namespace in each call
ns = mist.connect(url="https://mist.example")  # the namespace MIST_NAMESPACE names, in its org

A namespace= (or --namespace) you pass is used instead; an org= passed alone must be that namespace's org.

Variable What Overridden by
MIST_IDENTITY_TOKEN_FILE, else AWS_WEB_IDENTITY_TOKEN_FILE a file holding the token (read again when it changes) token_file=, token_provider=, --token-file
MIST_CA_BUNDLE a CA file to trust instead of the system's trust store verify=, --ca-bundle
MIST_NAMESPACE a namespace's full name, arn:mist:mist::<org>:namespace/<name>: the namespace and org of a call that names neither namespace=, org=, --namespace, --org

With no token file set, the SDK and the command use the sign-in of mist login. mist logout forgets it. Every argument of mist.Client and mist.connect is named (url=, org=, namespace=, ...).

Any program that runs without a person (a pod, a CI job) names the address on every call (url= in Python, --url on the command line) and points MIST_IDENTITY_TOKEN_FILE at a file holding its identity provider's token. The people who run your company's identity provider give such a program its identity.

What you can do with it

  • A month-end reconciliation that runs for days. A matching agent loads the ledger and bank extracts into a lake and writes the matched lines and the exceptions as tables. Two accountants and a review agent keep their notes on the exceptions in a workspace. A save based on an old revision is refused and nothing is lost, so nobody overwrites anybody, and the workspace's history says who changed which file and when.
  • A daily document intake handed from agent to agent. An intake agent puts the day's invoices in a workspace's inbox/. An extraction agent writes extracted/<id>.json and moves the invoice to done/ in one change that is all or nothing. The validation agent reads what changed since its last look, and the clerk reads the same files.
  • Share with a role. Let the role reviewers read the workspace or the lake, with the same policy calls for both.
  • Go back. Bring back an earlier revision of a file an agent broke, or read a table as it was yesterday.

Workspaces and lakes

import mist

ns = mist.connect(org="acme", namespace="research")
ws = ns.workspaces.create("market-research", description="Q3 notes", tags={"team": "research"})
ws.write_text("notes.md", "# Notes\n", if_absent=True)   # every write names what it is based on
notes = ws.get_file("notes.md")
updated = notes.write_text("# Notes\n- rate is 5%\n")    # based on notes.revision; returns the new revision's handle
ws.changes()                                          # who changed what, oldest first

lake = ns.lakes.create("orders", description="Daily order lines", tags={"team": "research"})
lake.catalog_url, lake.warehouse                      # what DuckDB, PyIceberg and Polars attach to
mist workspaces create market-research --org acme --namespace research --description "Q3 notes" --tag team=research
mist lakes create orders --org acme --namespace research --description "Daily order lines" --tag team=research
mist lakes get orders --org acme --namespace research

Orgs and namespaces

Every call names the org and the namespace it works in: org= and namespace= in Python, --org and --namespace on the command line, or MIST_NAMESPACE when both are left out. A namespace's full name names its org too, so it can stand alone: mist.connect(namespace="arn:mist:mist::acme:namespace/research"), --namespace arn:mist:mist::acme:namespace/research. client.namespaces.list() and mist namespaces list --org acme list the namespaces you can use, each with its arn; ns.arn, ws.arn and lake.arn are the full names client.policies takes.

Roles, policies and sharing (client.roles, client.policies, mist roles, mist policies) are in one guide, the security reference that ships with the Mist plugin for Claude Code (its mist skill, references/security.md).

Output and errors

The command prints JSON on stdout; a delete prints nothing.

Every error is a mist.MistError with code (stable: AccessDenied, NoSuchEntity, RevisionConflict, ...), message, next (what to do: retry, retry_later, reread_and_redo, fix_arguments or ask_person), retryable and request_id; an error from the service (mist.APIStatusError and its subclasses) also carries status and rule. The SDK retries a call that never reached the service, and a call that is safe to repeat after a lost reply, a 5xx or a 429. On the command line an error goes to stderr, ending with a next: line, and the exit status follows the step: 1 fix the arguments, 3 read again and redo, 4 ask a person, 5 try again; 2 is a command line the command cannot parse.

Licence

Mist evaluation build: you may download and run it only to evaluate it; production use is not permitted (LICENSE).

Metadata

Release files for mist-sdk 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mist-sdk 0.1.0a1
File Size Uploaded Provenance Actions
mist_sdk-0.1.0a1.tar.gz 62.4 kB With provenance Details for mist_sdk-0.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mist-sdk 0.1.0a1
File Interpreter ABI Platform Actions
mist_sdk-0.1.0a1-py3-none-any.whl Python 3 none any Details for mist_sdk-0.1.0a1-py3-none-any.whl

Total release size: 135.1 kB

Release files / mist_sdk-0.1.0a1.tar.gz

Download URL mist_sdk-0.1.0a1.tar.gz
Size 62.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9790416894b301cf32dde0b9198f629a9173558ce059a8850843ad1dcb03a13c
BLAKE2b-256 checksum
How to use checksums
d9366850a14701633ab11860ffdb076643a97776e77920b496bfe5b9c6a35886
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / mist_sdk-0.1.0a1-py3-none-any.whl

Download URL mist_sdk-0.1.0a1-py3-none-any.whl
Size 72.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55e62a15eb4458f3893047e7c5efd1b9e03bb271696591de8e6f5ba8d24acd15
BLAKE2b-256 checksum
How to use checksums
a170c6793339ac5a30f10bbc89337bd25d0d9729402c2b6a203f12c315e1dc93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for mist-sdk 0.1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mist_sdk-0.1.0a1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page