Skip to main content
The Pipeline class is the main entry point for building, saving, and running VectorShift pipelines from Python. Pipelines are graphs of nodes (LLMs, data loaders, transforms, knowledge-base readers, …) that you assemble with the fluent pipeline.add builder, then save() and run() against the platform.
Prerequisites: Installed SDK · API key set · Python 3.10+.

Mental model

  • A pipeline is a graph of nodes. Inputs flow through transforms and LLMs to outputs.
  • You build it with the p.add.* builderadd.input, add.llm, add.knowledge_base_reader, add.output, and so on. Every node returns an object whose attributes (.text, .response, .results) are wired into the next node.
  • save() persists the graph to the platform (and optionally bumps a version). run() executes it.
  • Every method has an async variant (asave, arun, astream, …). Install vectorshift[async] to use them.

Quick start

from vectorshift import Pipeline

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

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

Recent additions

Background runs (start / stream / terminate), async variants of every method, and user/org-scoped sharing (share(user_id=...)) all landed recently. See the reference for the full surface.

What’s next

Reference

Every public method, grouped by topic.

Examples

Runnable examples to copy-paste and adapt.

Concepts

Pipelines vs Agents vs Sessions vs KBs.