# Polygres

> Polygres turns Postgres into working memory for AI agents by combining relational, graph, and vector search into a single hybrid retrieval query.

Polygres is a database platform built by Evokoa that extends PostgreSQL with native graph traversal (pgGraph) and HNSW vector search (pgVector), exposing them through a unified hybrid retrieval API designed for AI agents. It launched on Product Hunt and is available as a managed cloud service or as a self-hosted open-source stack. The Python SDK (Apache 2.0) is published on PyPI at version 0.1.0, and a companion CLI (`polygres-cli`) handles project management from the terminal.

## What It Is

Polygres positions itself as "working memory for AI agents" — a single query endpoint that replaces the typical combination of a separate vector store, a graph database, and a relational database. Instead of syncing data across multiple systems, agents query Polygres once and receive a ranked, token-ready context block that fuses relational rows, multi-hop graph paths, and semantic embeddings. The core components are pgGraph (foreign-key-based graph traversal) and pgContext (ten concurrent search methods fused into one ranked result), running on top of a standard PostgreSQL 17 instance.

## How the Retrieval Stack Works

Polygres exposes three retrieval layers that can be used independently or chained:

- **Vector search** — HNSW similarity search with scalar filters, `similar_to` row lookups, and optional embedding value return.
- **Text search** — TSVector full-text search and fuzzy matching against configured columns.
- **Graph traversal** — `expand`, `neighborhood`, `related`, `path`, and `connection` operations over a compiled graph built from existing foreign keys; supports multi-hop traversal up to a configurable depth.
- **Hybrid retrieval** — `graph_first`, `vector_first`, and `joint` modes that blend graph context scores with vector similarity scores into a single ranked page of results.

Every list-style method returns a `Page` with cursor-based pagination and an `auto_paging_iter()` helper.

## Architecture and Deployment Model

The SDK is a pure HTTP client — it does not open direct Postgres connections or bundle drivers like `asyncpg` or `psycopg`. It authenticates with an API key and a per-project Runtime API URL. The managed cloud runs on Kubernetes and Docker with automated vertical and horizontal scaling. Self-hosters can run pgGraph and pgVector on any existing Postgres instance using the open-source components. A visual Schema Playground in the dashboard lets teams configure relationships, manage join tables, and build hybrid indexes without writing SQL.

## Agent Skills Integration

Polygres ships an optional Agent Skills package (`Evokoa/polygres-skills`) compatible with Codex, Claude Code, and other coding agents. Once installed, agents can be prompted to write, test, and troubleshoot retrieval code using the SDK. The skill is installed via `npx skills add` or through native plugin marketplaces in Codex and Claude Code, and covers both SDK retrieval guidance and CLI project-management tasks.

## Update: SDK v0.1.0

The Polygres SDK reached version 0.1.0, published to PyPI on July 10, 2026. The release separates the SDK (`polygres-sdk`) from the CLI (`polygres-cli`), which were previously bundled in the 0.2.x package. The GitHub repository under `Evokoa/polygres-sdk` is licensed Apache 2.0 and was last pushed in July 2026. Interactive demos for Wikipedia-scale hybrid search and a user-memory retrieval playground are live at polygres.com, and the CLI is documented at docs.evokoa.com/polygres/cli.

## Features
- Hybrid retrieval combining vector, graph, and relational search in one query
- pgGraph: multi-hop graph traversal over existing foreign keys
- pgContext: ten concurrent search methods fused into one ranked result
- HNSW vector similarity search with scalar filtering
- TSVector full-text search and fuzzy text matching
- Graph-first, vector-first, and joint hybrid retrieval modes
- Cursor-based pagination with auto_paging_iter()
- Managed cloud hosting with automated vertical and horizontal scaling
- Self-hosted open-source deployment on any Postgres instance
- Visual Schema Playground for configuring relationships and hybrid indexes
- Polygres CLI for project management and terminal-based queries
- Agent Skills for Codex and Claude Code integration
- PostgreSQL 17 base with ACID compliance
- Python SDK (Apache 2.0) published on PyPI

## Integrations
PostgreSQL, pgVector, pgGraph, Python, Codex, Claude Code, Kubernetes, Docker, PyPI

## Platforms
WEB, API, CLI, DEVELOPER_SDK

## Pricing
Freemium — Free tier available with paid upgrades

## Version
0.1.0

## Links
- Website: https://polygres.com
- Documentation: https://docs.evokoa.com/polygres
- Repository: https://github.com/Evokoa/polygres-sdk
- EveryDev.ai: https://www.everydev.ai/tools/polygres
