Skip to content

Install PyAIStack

Requirements

Install Ollama

Ollama Required

Ollama is default provider with gemma3:4b model

  • On Mac / Linux
curl -fsSL https://ollama.com/install.sh | sh
  • On Windows
irm https://ollama.com/install.ps1 | iex

Pull the default models:

ollama pull embeddinggemma
ollama pull gemma3:4b

Install using pip

pip install pyaistack

For PostgreSQL + pgvector support, install the optional dependency:

pip install "pyaistack[postgres]"

The target PostgreSQL database must already have the pgvector extension enabled. See PostgreSQL + pgvector.

Verify the installation

python -c "from pyaistack import RAG; print(RAG().document_count)"

The command prints 0 for a new in-memory index.