Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.vectorshift.ai/llms.txt

Use this file to discover all available pages before exploring further.

The VectorShift Python SDK lets you build, run, and manage Pipelines, Agents, and Knowledge Bases from Python. It targets the same backend as the platform UI, so anything you build in the SDK is editable in the visual editor and vice versa.

Requirements

  • Python 3.10 or newer
  • A VectorShift account and API key

Setup

1

Install the package

pip install vectorshift
The SDK ships with type hints. Editor autocomplete works out of the box, including for the auto-generated agent tools and pipeline node builders.
2

Set your API key

Generate one in the platform under Account → API Keys, then export it:
export VECTORSHIFT_API_KEY="vs-..."
See Authentication for programmatic setup and key rotation.
3

Verify

from vectorshift import Pipeline

print(Pipeline.list(limit=1))
Even an empty list means you’re connected. An AuthenticationError means the key isn’t set or is invalid.

Optional extras

pip install 'vectorshift[async]'
Adds httpx for async transport. Recommended if you use astream, arun, or any other async method.

Type checking with mypy

The SDK ships a mypy plugin that validates pipeline node wiring and agent tool definitions at static-check time. It catches things plain type hints can’t — wrong field names on a node builder, type mismatches between connected pipeline nodes, agent tools missing required ToolInputs, and so on — before you save and run.
1

Install mypy

pip install mypy
2

Enable the plugin

Add a mypy.ini to your project root (or merge into your existing one):
[mypy]
plugins = vectorshift.mypy_plugin
python_version = 3.11
ignore_missing_imports = True
explicit_package_bases = True
strict_optional = True
The plugin name is the dotted import path. It works whether you installed vectorshift from PyPI or as an editable install.
3

Run

mypy your_pipeline.py
The plugin runs alongside mypy’s normal type checking. Errors from the plugin look like any other mypy error and point at the exact line.
Most editors (VS Code, PyCharm, Cursor, Zed) can run mypy on save. Once mypy.ini is in place, you’ll see SDK-aware errors inline as you type — no extra wiring.

What’s next

Pipeline

Build and run pipelines.

Agent

Agents with tools and multi-turn sessions.

Session

Stream tool events and multi-turn replies.