Griptape Vector Store Driver: PGVector
The self-hosted vector store for people who already run Postgres
- embedding_driver
- DRIVER
This is the driver for people who already run Postgres and think adding a vector database is absurd when they have a perfectly good one. The pgvector extension turns Postgres into a vector store without a second system to manage, and this node is how a Griptape agent reaches it. It's the most "infrastructure you already own" option in the pack - if you're self-hosting and your docs are already in Postgres, this is likely the right call. If you don't have Postgres running, though, the Local driver is a far better starting point than standing up a database just to test RAG.
How it works
The node builds a PgVectorVectorStoreDriver with a connection string assembled from environment variable names, plus one field typed directly:
table_name(defaultgriptape_vectors) - the one input not read from env. The table the driver stores vectors in. If it doesn't exist, the driver creates it - a small but real convenience versus the other drivers.host_env(POSTGRES_HOST),user_env(POSTGRES_USER),pass_env(POSTGRES_PASSWORD),port_env(POSTGRES_PORT),name_env(POSTGRES_DB) - the connection bits, all as env var names.
Under the hood it composes postgresql://user:pass@host:port/db and hands it to the driver. Output is DRIVER (VECTOR_STORE_DRIVER), wired through Griptape Structure Config → Create Agent → Griptape Vector Store: Query.
The non-negotiables
Two things are on you before this node does anything useful. First, the pgvector extension has to actually exist in your Postgres - CREATE EXTENSION IF NOT EXISTS vector; in the target database. The driver can create the table, but it can't install the extension. Second, the embedding dimension story that haunts every driver in this pack applies here with extra teeth: once the table is created with a column sized to your embedding model, changing models means dealing with schema, not just config. Pick your embedding driver first and don't churn on it. And keep that same embedding driver wired into both Add Text and Query - mismatched embedders produce a store that "works" and returns noise.
One honest note on effort: of all the drivers, this one has the most moving parts outside the node - a Postgres server, the extension, the right privileges for the user in your env vars. It's the right tool when Postgres is already your home base, not the one to reach for on a whim.
Install
Pack install is the usual drill: ComfyUI Manager → search "Griptape" → INSTALL, or git clone https://github.com/griptape-ai/ComfyUI-Griptape into custom_nodes, restart. Dependencies (griptape[all], python-dotenv) install with it, and if ComfyUI starts erroring post-install, the README's torch fix is the standard remedy. Your Postgres side needs pgvector installed on the server and the extension enabled in the database - that's the part no node in this pack will do for you.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| embedding_driveropt | EMBEDDING_DRIVER | Select an embedding driver or leave as default. | |
| table_nameopt | STRING | griptape_vectors | Name of the table to store vectors |
| host_envopt | STRING | POSTGRES_HOST | Environment variable name for the PostgreSQL host |
| user_envopt | STRING | POSTGRES_USER | Environment variable name for the PostgreSQL user |
| pass_envopt | STRING | POSTGRES_PASSWORD | Environment variable name for the PostgreSQL password |
| port_envopt | STRING | POSTGRES_PORT | Environment variable name for the PostgreSQL port |
| name_envopt | STRING | POSTGRES_DB | Environment variable name for the PostgreSQL database name |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DRIVER | VECTOR_STORE_DRIVER | — |