Skip to main content
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

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 at Account → API Keys, then export it:
The SDK reads VECTORSHIFT_API_KEY at import time — set it before import vectorshift. If you set the key in code instead, assign vectorshift.api_key = "sk_..." before your first API call. A wrong prefix or a key set too late is the most common cause of a 401. See Authentication.
See Authentication for programmatic setup and key rotation.
3

Verify

Even an empty list means you’re connected. An AuthenticationError means the key isn’t set or is invalid.

Optional extras

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

2

Enable the plugin

Add a mypy.ini to your project root (or merge into your existing one):
The plugin name is the dotted import path. It works whether you installed vectorshift from PyPI or as an editable install.
3

Run

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.