Installation¶
This guide walks you through installing tuvl and its dependencies.
Prerequisites¶
Before installing tuvl, ensure you have:
- Python 3.13 or 3.14 — tuvl 2.0 supports
>=3.13,<3.15. uv picks a compatible interpreter automatically. - uv — Fast Python package manager (recommended)
- PostgreSQL — For data persistence (optional for development)
- Docker — Optional. The easiest way to run PostgreSQL, Redis and Laya locally, and required by
tuvl shipto build the production image - Redis — Optional for
tuvl dev; needed when you run more than one worker (why) - Laya (
tuvl/laya-serve) — Optional. A self-hosted decision model fordecideagents; runs as its own container - Ollama — For local LLM inference (optional)
What you actually need
To try tuvl you need Python and uv, and a PostgreSQL database. Everything else above is opt-in: Redis only matters for multi-worker deployments, and Laya only if a decide agent uses it as its decision model.
Python 3.14
tuvl runs on Python 3.13 and 3.14 on Linux, macOS and Windows.
Installing uv¶
curl -LsSf https://astral.sh/uv/install.sh | sh
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
pip install uv
Installing tuvl CLI¶
Install the tuvl CLI globally using uv:
# Base CLI only
uv tool install tuvl
# With dev server and built-in UI (recommended)
uv tool install "tuvl[standard]"
Tip
tuvl[standard] includes the dev server (tuvl dev), the built-in tuvl insight UI, hot-reload support, the development tools (tuvl generate code, tuvl run tests, tuvl serve mcp) and every production extra below. The base install is the engine and the production CLI. From 2.1 the development tools live in the separate tuvl-insight package that [standard] installs: on a base install they answer with how to get them (Core and Insight). tuvl ship builds production images from the base install and adds only the extras your project uses.
Upgrading from 2.0
uv tool upgrade tuvl (or pip install -U "tuvl[standard]") installs 2.1. Nothing in your YAML has to change; read what's new first if you run a production server.
Verify the installation:
tuvl --version
Moving to another version¶
From 2.1.1, tuvl can move itself, whether it was installed with uv tool, pipx or into a virtual environment:
tuvl upgrade self --check # the plan and how to undo it; changes nothing
tuvl upgrade self # the latest stable; you confirm by typing the version
tuvl upgrade self --to 2.1.0 # a chosen version, older ones too
It needs a person at a terminal. On 2.1.0 or older, use your installer. Afterwards run tuvl update skills in each
project.
Installing tuvl as a Project Dependency¶
For projects that embed the engine directly:
# Base engine
uv add tuvl
# With dev server and built-in UI
uv add "tuvl[standard]"
Or with pip:
pip install "tuvl[standard]"
Extras¶
The base tuvl has no package for a feature you may not use. Install the extra when you use the feature:
| Extra | Adds | You need it for |
|---|---|---|
tuvl[mcp] |
mcp |
use: mcp tools, a loop calling an MCP server, exporting a workflow as an MCP tool, tuvl serve mcp |
tuvl[redis] |
redis |
a type: redis datasource |
tuvl[vector] |
pgvector |
collections, embeddings and tuvl.data_search / tuvl.data_ingest |
tuvl[otel-grpc] |
OTLP gRPC exporter | TUVL_OTLP_PROTOCOL=grpc (HTTP/protobuf is the default and needs nothing) |
uv add "tuvl[mcp,redis]"
In 2.0 the development tools also had extras (tuvl[codegen], [test], [review], [pdf], [tui]). From 2.1 their packages are dependencies of tuvl-insight, so tuvl[standard] is all you install.
Using a feature without its extra fails with the command to run, for example
pip install 'tuvl[mcp]'. You do not choose extras for production by hand: tuvl ship
reads the project and installs exactly the ones it needs. Model providers and blob storage (S3,
Azure, GCS, local disk) are built in and need no extra.
Optional Dependencies¶
PostgreSQL¶
brew install postgresql@16
brew services start postgresql@16
sudo apt update
sudo apt install postgresql postgresql-contrib
sudo systemctl start postgresql
docker run -d \
--name tuvl-postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=tuvl \
-p 5432:5432 \
postgres:16-alpine
Redis (optional)¶
Redis shares OAuth state and the token-revocation list between workers. A single tuvl dev
process works without it (an in-process fallback is used); add it before running more than one
worker. Install tuvl[redis] to use it. See Redis configuration for the datasource file.
brew install redis
brew services start redis
sudo apt install redis-server
sudo systemctl start redis-server
docker run -d --name tuvl-redis -p 6379:6379 redis:7-alpine
Then add datasources/redis-primary.yaml with type: redis, host: ${REDIS_HOST:localhost}.
Laya decision server (optional)¶
Laya is an open-weight model that picks one value of a
decide agent's enum with a confidence. It runs on CPU in its own container, offline, with
verified weights baked in. Use it when you want decisions made on your own infrastructure instead
of calling a hosted model.
The quickest route is to let tuvl init scaffold it:
tuvl init my-project --decision-model laya -y
cd my-project
docker compose up -d laya # serves on http://localhost:8000
This writes llms/laya.yaml (a provider: laya AgentModel), LAYA_API_* entries in .env and a
compose.yaml. To run the container by hand:
docker run -d --name laya -p 127.0.0.1:8000:8000 tuvl/laya-serve:0.4.7-1-en
docker run -d --name laya -p 127.0.0.1:8000:8000 tuvl/laya-serve:0.4.7-1
| Image | Use with | Memory |
|---|---|---|
…-en |
model: english |
about 2 GiB |
| full | model: auto or multilingual |
about 3.5 GiB |
The image is about 2.7 GB (CPU PyTorch plus the weights), amd64 and arm64. Check it is up with
curl localhost:8000/health. Details, checkpoints and settings are in
AI Models → Laya and Decide.
Ollama (Local LLM)¶
brew install ollama
ollama serve
# In another terminal, pull a model
ollama pull llama3
curl -fsSL https://ollama.com/install.sh | sh
ollama serve
# In another terminal
ollama pull llama3
docker run -d \
--name ollama \
-p 11434:11434 \
-v ollama:/root/.ollama \
ollama/ollama
docker exec ollama ollama pull llama3
Verifying Installation¶
Create the sample project and run its checks:
tuvl init my-project --sample --preset gemini -y # or openai | anthropic | ollama
cd my-project
tuvl lint project --strict
tuvl run tests
tuvl dev --auto-login
tuvl dev serves the engine on port 8885 and Insight at http://127.0.0.1:8885/insight/.
With --auto-login this machine skips the key screen; otherwise paste the session key, stored in
.tuvl/.dev-session (tuvl dev --show-key prints it).
Troubleshooting¶
Windows: port already in use or permission denied¶
Symptom — tuvl dev fails to start the engine on its default port (8885) with one of:
[Errno 48] Address already in use/Only one usage of each socket address … is normally permittedPermissionError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions
Why this happens — either another process is already bound to the port, or — common on Windows — the port falls inside a range Windows has reserved for dynamic allocation. Hyper-V, WSL 2, and Docker Desktop routinely reserve large TCP ranges; binding a port inside a reserved range fails with WinError 10013 even though nothing is actively listening on it.
Inspect the reserved ranges:
netsh interface ipv4 show excludedportrange protocol=tcp
If 8885 sits inside an excluded range (or is otherwise taken), run tuvl on a free port:
tuvl dev --port 8899
# Persist a different port for all tuvl commands in this shell
$env:TUVL_DEV_PORT = "8899"
tuvl dev
Tip
The port also appears in the login URL tuvl prints (http://127.0.0.1:<port>/insight/). If you rely on the OAuth callback flow, align TUVL_OAUTH_BASE_URL with the port you chose (defaults to http://localhost:8885).
The default 8885 spells T·U·V·L on a phone keypad and deliberately avoids the crowded 8000/8080/8888 range — but any free, non-reserved port works.
Verifying a release, and the PyPI provenance notice¶
From 2.0.0, tuvl and tuvl-insight are published to PyPI by a GitHub Actions workflow in the public repository tuvl-io/tuvl, using PyPI Trusted Publishing. Each file carries a signed provenance attestation that names that repository and the publish.yml workflow that built it, so anyone can read the code and the workflow behind a release.
Why PyPI shows "The repository or configuration that created this release differs from a previous release". PyPI compares the publisher of a release with the previous one. Earlier releases were published from a different place:
| Release | Published from |
|---|---|
| Releases before 2.0 | A build server, without provenance |
| 2.0.0b1 to 2.0.0b10 | A private repository (tuvl-io/tuvl-private), with provenance for some of them |
| 2.0.0 and later | The public repository tuvl-io/tuvl |
The notice is a comparison, not a finding. The publisher changed once, when the source moved to the public repository, and the notice appears once for the first release published from the new place. It does not mean a release was altered: the files in 2.0.0 are the ones the public workflow built.
To check a release yourself, download it and verify it against the repository:
pip download tuvl==2.0.0 --no-deps
pypi-attestations verify pypi --repository https://github.com/tuvl-io/tuvl pypi:tuvl-2.0.0-py3-none-any.whl
Run the second command in the folder you downloaded to. It succeeds only if the file was built by a workflow in tuvl-io/tuvl; releases before 2.0.0 do not pass it.
Next Steps¶
- Quickstart Guide — Build your first workflow
- Code generation —
tuvl generate code: typed schemas, stubs and tests - Shipping to production —
tuvl ship: image, Helm chart, Laya and secrets - Project Structure — Understand the project layout
- Agentic Manual — how tuvl projects are written