PGVector CLI
Docker Setup
Quick Start
Commands
Doctor
Run with Knowledge
Python Test
Environment Variables
| Variable | Description |
|---|---|
PGVECTOR_URL | PostgreSQL connection URL |
CLI commands for PGVector vector store
docker run -d --name pgvector \
-e POSTGRES_PASSWORD=postgres \
-p 5433:5432 \
pgvector/pgvector:pg16
# Test connection
praisonai persistence doctor \
--knowledge-url "postgresql://postgres:postgres@localhost:5433/postgres"
# Run with knowledge store
praisonai persistence run \
--knowledge-backend pgvector \
--knowledge-url "$PGVECTOR_URL" \
"Search my documents"
praisonai persistence doctor \
--knowledge-url "postgresql://postgres:postgres@localhost:5433/postgres"
praisonai persistence run \
--knowledge-backend pgvector \
--knowledge-url "$PGVECTOR_URL" \
--session-id my-session \
"What do my documents say?"
python3 -c "
import psycopg2
conn = psycopg2.connect('postgresql://postgres:postgres@localhost:5433/postgres')
cur = conn.cursor()
cur.execute('CREATE EXTENSION IF NOT EXISTS vector')
conn.commit()
cur.execute('SELECT extversion FROM pg_extension WHERE extname = %s', ('vector',))
print('PGVector OK:', cur.fetchone()[0])
conn.close()
"
| Variable | Description |
|---|---|
PGVECTOR_URL | PostgreSQL connection URL |