Skip to main content
The VectorShift Python SDK targets the same backend as the visual editor — anything you build in the SDK is editable in the platform UI and vice versa. Pick a primitive and start shipping.

Pipeline

A graph of nodes (LLMs, loaders, transforms, knowledge readers) you build, save, and run.

Agent

Tools, typed I/O, and multi-turn conversations via Session.

Knowledge Base

Managed vector + document store you query directly or expose as a tool on an Agent.

Table

Typed schema, AI-generated columns (Pipeline / Agent), and SQL-grade filters.

Transformation

Reusable, typed Python functions you run directly or wire into a Pipeline.

Analytics

Query runs, tokens, costs, latency, errors, and traces across every primitive.

Get started in 60 seconds

1

Install

pip install vectorshift
2

Authenticate

export VECTORSHIFT_API_KEY="vs-..."
Generate a key under Account → API Keys.
3

Run your first pipeline

Follow the Quickstart for a five-line LLM pipeline you can paste and run.

What you can build

RAG pipelines

Wire a knowledge-base reader into an LLM in a few lines.

Conversational agents

Tools, approvals, and streamed tool events out of the box.

Background batch runs

Kick off long-running jobs and poll for results.

Streaming chatbots

Multi-turn sessions with token-level streaming.

Reference

Pipeline reference

Every public method, grouped by topic.

Agent reference

Lifecycle, tools, running, types.

Errors

Full exception hierarchy with status codes.
The SDK ships with type hints and a mypy plugin that catches pipeline-wiring and tool-definition mistakes at static-check time.

Writing SDK code

Follow these conventions — every example in these docs does, and they keep generated code correct and re-runnable:
  • Authenticate via the VECTORSHIFT_API_KEY environment variable. Never hardcode the key inline.
  • Build pipelines with the fluent builderpipeline.add(name="...").llm(...). Don’t use standalone node constructors or pass nodes=[...] to the constructor.
  • Guard with fetch-or-create at the top, then build. Nodes dedup by name, so a stable name= makes re-runs idempotent — don’t pass hardcoded id= values.
  • Set temperature via sampling=SamplingConfig(temperature=...), not as a top-level .llm() argument (where it’s silently dropped).
  • For exact signatures use the primitive’s reference page; for full runnable scripts use its examples pages.