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/<deployment-id>/chat/completions \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "<workspace>/<service-name>", "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/<deployment-id>.

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

haystack_enterprise_sdk-0.1.2.tar.gz (118.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

haystack_enterprise_sdk-0.1.2-py3-none-any.whl (138.2 kB view details)

Uploaded Python 3

File details

Details for the file haystack_enterprise_sdk-0.1.2.tar.gz.

File metadata

  • Download URL: haystack_enterprise_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 118.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for haystack_enterprise_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7dabb629a1f4df6badc3d7ef307b2cbc22888f0def11824eacedc76254ba5de3
MD5 4cee3d094d8d6b109bbd0dc689bf21d0
BLAKE2b-256 fa9ce6889af2b1da9f5e2a16caad2b3d800203800ec3aa06073fad2d9214d437

See more details on using hashes here.

Provenance

The following attestation bundles were made for haystack_enterprise_sdk-0.1.2.tar.gz:

Publisher: CI_pypi_release.yml on deepset-ai/haystack-enterprise-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file haystack_enterprise_sdk-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for haystack_enterprise_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ce109f7537145513f9c691c8990c8a0a28841c9b1bd705ed29eb7241848e7064
MD5 320d0a6497dbcb33ccd28d4a72642bac
BLAKE2b-256 1c458e5924807f8211c3cf980595a6fc55bd9259604245e419b69c431d60fbb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for haystack_enterprise_sdk-0.1.2-py3-none-any.whl:

Publisher: CI_pypi_release.yml on deepset-ai/haystack-enterprise-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.0

2 files

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