Skip to main content
For the complete documentation index for agents and LLMs, see llms.txt.

Install the SDK

You can install the Haystack Enterprise SDK as a command-line tool or as a project dependency.


About This Task

You can install the Haystack Enterprise SDK as a standalone command-line tool or as a Python API you can use in your own projects.

Where to Install Haystack

The SDK needs Haystack installed in the same environment as your pipeline. Install Haystack where your pipeline lives, not where the CLI lives.

The validate, run, and deploy commands load your pipeline in a subprocess. They use your project's interpreter: either a virtual environment the SDK detects near your pipeline file, or the one you pass to --python.

If your pipeline runs in the same environment as the CLI, there's no separate project environment to detect. Install the deploy extra for that case:

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

Prerequisites

  • Python 3.10 or newer
  • uv (for the CLI) or pip (for the Python API)

Install the CLI

info

When using the Haystack Enterprise SDK on Windows, if haystack-enterprise isn't on your PATH, replace it with python -m haystack_enterprise_sdk.cli, for example:

haystack-enterprise validate pipeline.py

becomes

python -m haystack_enterprise_sdk.cli validate pipeline.py

The SDK is published to PyPI as haystack-enterprise-sdk. Install the CLI as a standalone tool with uv:

uv tool install haystack-enterprise-sdk

This installs the haystack-enterprise command into the uv tools directory, often ~/.local/bin on macOS and Linux. If your shell can't find the command, add that directory to your PATH or run uv tool update-shell, then open a new terminal.

Run the following command to check if the CLI is installed correctly:

haystack-enterprise --version

If the command is still not found, see Troubleshoot Installation.

Install the Python API

To use the Python API, add the SDK as a dependency to your project.

Add the SDK to a Project

Run the following command to add the SDK to your project:

uv add haystack-enterprise-sdk

You can also use the pip install haystack-enterprise-sdk command to install. The import name is haystack_enterprise_sdk:

from haystack_enterprise_sdk import PipelineClient

Install for Development

To work on the SDK itself, clone the repository and sync all dependency groups:

git clone https://github.com/deepset-ai/haystack-enterprise-sdk.git
cd haystack-enterprise-sdk
uv sync --all-groups

Run the CLI from source with the following command:

uv run haystack-enterprise --help

For the full workflow, see CONTRIBUTING.md.

Next Steps