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.

Let your agent set it up

Paste this into Claude Code, Codex, Cursor, or another coding agent. It installs the CLI and walks you through logging in:

Set up Haystack Enterprise for me. Fetch https://raw.githubusercontent.com/deepset-ai/haystack-enterprise-sdk/main/get-started.md and follow it.

Installation

On macOS or Linux, one command installs the CLI. It installs uv first if you don't have it, and running it again upgrades the CLI:

curl -fsSL https://raw.githubusercontent.com/deepset-ai/haystack-enterprise-sdk/main/install.sh | bash

Or install it yourself:

# 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 1.0.2

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 1.0.2
File Size Uploaded Provenance
haystack_enterprise_sdk-1.0.2.tar.gz 137.8 kB With provenance Details

Built distribution (wheel)

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

Total release size: 293.9 kB

Release files / haystack_enterprise_sdk-1.0.2.tar.gz

Download URL haystack_enterprise_sdk-1.0.2.tar.gz
Size 137.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7e1fc70c8ab21fe4e553f0044f9ec1c3244c6df1db4e83bd69c27597ffab8058
BLAKE2b-256 checksum
How to use checksums
b41b10496a731a598bead7117819fa9f8fef78c1771f84a75c0d37e4a5774df0
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 Oct 14, 2026.

Transparency log

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

Download URL haystack_enterprise_sdk-1.0.2-py3-none-any.whl
Size 156.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9dadaa6bce7bc94f2622840bc7bda741b535f0a2dd876d05fd32f8047822758f
BLAKE2b-256 checksum
How to use checksums
0c95e2f7f855bc71beda51ec38b7bbbe8828f9dfa5591707717c4f0c46f77867
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 Oct 14, 2026.

Transparency log

Security for haystack-enterprise-sdk 1.0.2

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-1.0.2.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 Oct 14, 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