Skip to main content

Haystack Enterprise SDK

Haystack Enterprise SDK

Experimental. This SDK is under active development. APIs and CLI commands may change without notice.

Python SDK and CLI for the Haystack Enterprise Platform.

Installation

# Install as a CLI tool
uv tool install haystack-enterprise-sdk

# Or add it as a dependency of your project
uv add haystack-enterprise-sdk

# pip works too
pip install haystack-enterprise-sdk

deploy, validate, and run load your pipeline in a subprocess using your project's own interpreter (an auto-detected venv, or --python), so the CLI environment does not need Haystack. Install the deploy extra only when the CLI environment doubles as the pipeline environment — that is, when there is no separate project venv to detect:

uv tool install "haystack-enterprise-sdk[deploy]"

To install unreleased changes from main:

uv tool install git+https://github.com/deepset-ai/haystack-enterprise-sdk.git

Usage

haystack-enterprise --help

Authentication

haystack-enterprise login
haystack-enterprise logout

Files

# Upload a folder to a workspace
haystack-enterprise upload ./my-files

# List files in a workspace
haystack-enterprise list-files

# Download files to your local machine
haystack-enterprise download

Pipelines

# Validate a local pipeline against the platform
haystack-enterprise validate ./pipeline.py

# Run a local pipeline in the platform sandbox (shows a spinner with the elapsed time while it waits)
haystack-enterprise run ./pipeline.py

# Transient failures (network errors, timeouts, 429, 5xx) are retried twice by default; 0 disables it.
# Config and input errors always fail immediately.
haystack-enterprise run ./pipeline.py --retries 0

# Deploy a local pipeline as a service deployment (reused if it exists, otherwise created serverless).
# Asks at most which socket receives the query and which is the main output -- and nothing at all when
# your socket names already say so. Prints the service's chat-completions endpoint once it is serving.
haystack-enterprise deploy ./pipeline.py my-service

# Create a managed (provisioned) service instead, with explicit sizing
haystack-enterprise deploy ./pipeline.py my-service --managed --cpu 2 --memory 4Gi

# Deploy and get a shareable prototype link (a chat UI). Because that UI routes through the pipeline's
# input/output mapping, --share is also what asks you to review the mapping.
haystack-enterprise deploy ./pipeline.py my-service --share

# Check the status of a service deployment
haystack-enterprise service-status my-service

Calling a deployed service

A deployed service is served over an OpenAI-compatible chat-completions endpoint, which deploy prints once the service is running:

curl -N https://api.cloud.deepset.ai/api/v1/workspaces/<workspace>/deployments/v1/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "<workspace>/<deployment-id>", "messages": [{"role": "user", "content": "Hello"}]}'

The response is a server-sent-event stream of chat.completion.chunk objects. Any OpenAI client works — point its base_url at everything up to and including /deployments/v1.

Pass --verbose to any command for INFO/DEBUG logs, and <command> --help for its arguments.

Development

# Install uv if you don't have it
pip install uv

# Sync all dependencies (including dev dependencies)
uv sync --all-groups

# Run the CLI from source
uv run haystack-enterprise --help

See CONTRIBUTING.md for contribution guidelines.

Licenses

The SDK is licensed under Apache 2.0, see LICENSE.

Some bundled libraries are licensed under the MPL 2.0 license:

  • tqdm for progress bars
  • pathspec for pattern matching file paths
  • certifi for validating trustworthiness of SSL certificates

Metadata

Release files for haystack-enterprise-sdk 0.2.0

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

Source distribution (sdist)

Source distribution for haystack-enterprise-sdk 0.2.0
File Size Uploaded Provenance
haystack_enterprise_sdk-0.2.0.tar.gz 120.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for haystack-enterprise-sdk 0.2.0
File Interpreter ABI Platform
haystack_enterprise_sdk-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 260.8 kB

Release files / haystack_enterprise_sdk-0.2.0.tar.gz

Download URL haystack_enterprise_sdk-0.2.0.tar.gz
Size 120.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1a65a0f93103ecce44bf154a4418d0e8137c42cb17521a149a520054ecb2e59a
BLAKE2b-256 checksum
How to use checksums
bc06530a6987c5e9755a53ad6d21494009c118a70333cd52368070aac78d652d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 11, 2026.

Transparency log

Release files / haystack_enterprise_sdk-0.2.0-py3-none-any.whl

Download URL haystack_enterprise_sdk-0.2.0-py3-none-any.whl
Size 140.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e9960686ab2c73d789064ba12fe507b5bff36c6cd2c16d7963ff4941e234c37
BLAKE2b-256 checksum
How to use checksums
387eb66df36c38ed4853acd7b52eac033624607715cb9e9911cb0a6116d5db3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 11, 2026.

Transparency log

Security for haystack-enterprise-sdk 0.2.0

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for haystack_enterprise_sdk-0.2.0.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 Sep 11, 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.

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