Metadata-Version: 2.4
Name: vectorshift
Version: 0.1.13
Summary: VectorShift Python SDK
Author: Alex Leonardi, Pratham Goyal, Eric Shen, Ishaan Shah
Author-email: support@vectorshift.ai
Maintainer: Ishaan Shah
Maintainer-email: ishaan.shah@vectorshift.ai
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/markdown
Requires-Dist: networkx==3.1
Requires-Dist: tomli>=2.0.1
Requires-Dist: pytest>=7.0.0
Requires-Dist: pytest-asyncio>=0.23.0
Requires-Dist: bson>=0.5.10
Requires-Dist: black>=23.0.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: aiohttp>=3.8.0
Requires-Dist: requests>=2.32.5
Requires-Dist: python-dotenv>=0.9.9
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: maintainer
Dynamic: maintainer-email
Dynamic: requires-dist
Dynamic: summary

# VectorShift SDK

The Python SDK for building, saving, and running AI pipelines and agents on the [VectorShift](https://vectorshift.ai) platform.

**Prerequisites:** Python 3.10+ and a VectorShift account.

## Quickstart

### 1. Install the SDK

```bash
pip install vectorshift
```

### 2. Set your API key

Generate one at [Account → API Keys](https://app.vectorshift.ai/account/api-keys), then export it:

```bash
export VECTORSHIFT_API_KEY="vs-..."
```

### 3. Build, save, and run

Paste this into a file (`hello.py`) and run it.

```python
from vectorshift import Pipeline

p = Pipeline.new(name="Hello pipeline")
query = p.add(name="query").input(input_type="string")
llm = p.add(name="llm").llm(provider="openai", model="gpt-5.4", prompt=query.text)
p.add(name="answer").output(value=llm.response)

p.save()
result = p.run({"query": "What is VectorShift in one sentence?"})
print(result["outputs"]["answer"])
```

```bash
python hello.py
```

### 4. See it in the editor

Open the [platform](https://app.vectorshift.ai/) — your new pipeline is editable in the visual editor, identical to one built there.

**For the best developer experience, enable the mypy plugin.** It catches wrong field names on node builders, mismatched types between wired nodes, and agent tools missing required inputs — at edit time, before you save. Drop a `mypy.ini` with `plugins = vectorshift.mypy_plugin` and most editors (VS Code, Cursor, PyCharm, Zed) light up SDK-aware errors inline as you type.

## Build with ChatGPT or Claude

Paste this at the start of a ChatGPT or Claude chat, then describe what you want. It points the model at the SDK docs so it builds the right VectorShift object — pipeline, agent, knowledge base, or table — correctly.

```text
You are building with the VectorShift Python SDK. Before writing code, read
https://docs.vectorshift.ai/llms.txt and the SDK reference pages it links.
Follow the documented patterns exactly: use the builder API, correct node and
field names, and the right object type for my request (pipeline, agent,
knowledge base, or table). Install with `pip install vectorshift` and
authenticate via the VECTORSHIFT_API_KEY environment variable. Then build,
save, and run what I describe, returning one complete runnable script.

My request:
```

## Documentation

Full documentation — streaming, background runs, agents, knowledge bases, and the complete API reference — lives at **[docs.vectorshift.ai/sdk](https://docs.vectorshift.ai/sdk)**.
