# Add Postgres-native vector retrieval to agent and RAG workflows with pgvector

> Store embeddings beside application data in Postgres, create vector indexes, and query nearest neighbors for semantic search, RAG, recommendations, or agent memory retrieval.

- **Type:** Skill
- **Install:** `agentstack add skill-agentskillexchange-skills-add-postgres-native-vector-retrieval-to-agent-and-rag-workflows-with-pgvector`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [agentskillexchange](https://agentstack.voostack.com/s/agentskillexchange)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [agentskillexchange](https://github.com/agentskillexchange)
- **Source:** https://github.com/agentskillexchange/skills/tree/main/skills/add-postgres-native-vector-retrieval-to-agent-and-rag-workflows-with-pgvector
- **Website:** https://agentskillexchange.com

## Install

```sh
agentstack add skill-agentskillexchange-skills-add-postgres-native-vector-retrieval-to-agent-and-rag-workflows-with-pgvector
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Add Postgres-native vector retrieval to agent and RAG workflows with pgvector

Store embeddings beside application data in Postgres, create vector indexes, and query nearest neighbors for semantic search, RAG, recommendations, or agent memory retrieval.

## Prerequisites

Postgres 13+, pgvector extension, SQL access to the target database, embeddings from the agent or RAG pipeline, and application code that can query Postgres

## Installation

Use the upstream install or setup path that matches your environment:
- git clone --branch v0.8.2 https://github.com/pgvector/pgvector.git
- make
- make install # may need sudo
- Then re-run the installation instructions (run make clean before make if needed). If sudo is needed for make install, use:

Requirements and caveats from upstream:
- You can also install it with [Docker](#docker), [Homebrew](#homebrew), [PGXN](#pgxn), [APT](#apt), [Yum](#yum), [pkg](#pkg), [APK](#apk), or [conda-forge](#conda-forge), and it comes preinstalled with [Postgres.app](#...
- You can also install it with [Docker](#docker) or [conda-forge](#conda-forge).
- Or load vectors in bulk using COPY ([example](https://github.com/pgvector/pgvector-python/blob/master/examples/loading/example.py))

Basic usage or getting-started notes:
- Compile and install the extension (supports Postgres 13+)
- cd /tmp
- cd pgvector

- Source: https://github.com/pgvector/pgvector
- Extracted from upstream docs: https://raw.githubusercontent.com/pgvector/pgvector/HEAD/README.md

## Documentation

- https://github.com/pgvector/pgvector#readme

## Source

- [Agent Skill Exchange](https://agentskillexchange.com/skills/add-postgres-native-vector-retrieval-to-agent-and-rag-workflows-with-pgvector/)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [agentskillexchange](https://github.com/agentskillexchange)
- **Source:** [agentskillexchange/skills](https://github.com/agentskillexchange/skills)
- **License:** MIT
- **Homepage:** https://agentskillexchange.com

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-agentskillexchange-skills-add-postgres-native-vector-retrieval-to-agent-and-rag-workflows-with-pgvector
- Seller: https://agentstack.voostack.com/s/agentskillexchange
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
