Skip to content

pgraf

pgraf turns PostgreSQL into a lightning fast property graph engine with vector search capabilities, designed for use in AI agents and applications.

Features

  • Typed Models: Strong typing with Pydantic models for nodes, edges, and content
  • Vector Search: Built-in support for embeddings and semantic search
  • Property Graph: Full property graph capabilities with typed nodes and labeled edges
  • Asynchronous API: Modern async/await API for high-performance applications
  • PostgreSQL Backend: Uses PostgreSQL's power for reliability and scalability

Installation

pip install pgraf

Database Setup

Ensure pgvector is installed.

DDL is located in schema/pgraf.sql

psql -f schema/pgraf.sql

Requirements

  • Python 3.12+
  • PostgreSQL 14+