pgGraph

Graph search, traversal and shortest-path queries over your existing PostgreSQL tables.

Source repo
Evokoa/pgGraph
Stars
★ 1.1k
Last updated
2mo ago
FARS reviewed
Nov 25, 2026
License
NOASSERTION
Primary language
Rust

At a glance

Works with
Portable with changes
You'll need
PostgreSQL 14–18Docker (quickstart/Docker 镜像)Rust toolchain 1.96 (源码构建)cargo-pgrx 0.19.1 (源码构建)Shell / CLINetwork accessLocal filesystem
Typical use
Teams with a relational production database who want 'find records related to Alice within two hops' without migrating data
Main limitation
Each backend that loads a graph keeps roughly one artifact-sized private snapshot, and base graph pages are not shared across backends through the OS page cache, so memory needs sizing
Website
polygres.com ↗ set on GitHub
Maintenance
Commits in the last 6 monthslast commit 2026-09-23
Source review
60/100 · Some gaps

What does this agent do, and when should you use it?

pgGraph is a Rust/pgrx PostgreSQL extension that runs graph search, traversal, shortest path and relationship queries directly against ordinary PostgreSQL tables, without a separate graph database or a new query language. Your tables stay authoritative; the extension compiles relationships into forward and reverse CSR edge stores as a rebuildable .pggraph artifact and exposes queries through functions in the graph schema. Build, sync, vacuum and maintenance are SQL-callable and visible, and results come back as source table coordinates or hydrated PostgreSQL rows. Traversal includes explicit circuit breakers — depth limits, visited-node tracking, frontier limits, pagination and memory safeguards. It supports PostgreSQL 14–18 and ships as Docker images, a Homebrew tap and PGXN/pgrx source installs, with a managed option from Evokoa at polygres.com.

pgGraph reads your existing PostgreSQL tables and the foreign key relationships between them. graph.build() compiles those relationships into forward and reverse compressed sparse row (CSR) edge stores, producing a .pggraph artifact that is written atomically; when a new backend starts it validates the artifact and copies it into a backend-private anonymous mapping before exposing immutable forward graph arrays and a resolution index through read-only views. At query time the SQL layer resolves coordinates, labels, filters and tenant scopes, then enters a tight loop that streams CSR neighbors while checking compact adaptive one-, two- or four-byte EdgeTypeId values, typed FilterIndex values, tenant bitmaps, active bits and sync overlays. SQL-facing functions such as graph.search() and graph.shortest_path() return source table coordinates or hydrate raw rows on demand. Build, sync, vacuum and maintenance are all SQL-callable operations, and the engine enforces depth limits, visited-node tracking, frontier limits, pagination and OOM/memory safeguards as circuit breakers.

  1. Teams with a relational production database who want 'find records related to Alice within two hops' without migrating data
  2. Application developers who need shortest paths between entities such as a person and a company
  3. Engineering teams adding graph traversal to an existing schema without learning Cypher or adopting a graph namespace
  4. Architects evaluating the CSR versus mutable projection modes with the Streamlit playground and Panama or LDBC preset datasets
  5. Multi-tenant SaaS backends that need tenant-scoped traversal with depth and pagination caps
  6. AI application developers preparing a graph traversal layer inside PostgreSQL for GraphRAG-style retrieval

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • brew install pggraph
  • cargo install cargo-pgrx --version 0.19.1 --locked
  • docker pull ghcr.io/evokoa/pggraph:1.2.1
Config files
graph/rust-toolchain.toml
Install notes cover
macOS · Docker

How do you install or deploy this agent?

The fastest path is the bundled quickstart, which starts a disposable Docker PostgreSQL 17 and installs the extension:

# install into the repo's own Docker Compose database
git clone https://github.com/evokoa/pggraph.git
cd pggraph
scripts/quickstart.sh

To install into an already running PostgreSQL Docker container:

scripts/quickstart.sh docker my-postgres 17 appdb postgres

On macOS with a local PostgreSQL 17, use the Evokoa Homebrew tap:

brew tap Evokoa/tap
brew install pggraph
brew test pggraph
brew services start postgresql@17

Source or PGXN builds require PostgreSQL development headers plus pg_config, the Rust toolchain (1.96, pinned by graph/rust-toolchain.toml) and cargo-pgrx 0.19.1:

cargo install cargo-pgrx --version 0.19.1 --locked
PG_MAJOR=$(pg_config --version | sed -E 's/[^0-9]*([0-9]+).*/\1/')
cargo pgrx init --pg${PG_MAJOR}="$(which pg_config)"
pgxn install pgGraph

Or build and install manually:

git clone https://github.com/evokoa/pggraph.git
cd pggraph
make install

The PGXN distribution name is pgGraph; the PostgreSQL extension name is graph.

How do you use this agent?

After installation, create the extension and confirm the version:

psql -d postgres -c "CREATE EXTENSION graph;"
psql -d postgres -c "SELECT extname, extversion FROM pg_extension WHERE extname = 'graph';"

Inside the container you can use the bundled psql:

docker exec pggraph psql -U postgres -d graph \
  -c "SELECT extname, extversion FROM pg_extension WHERE extname IN ('graph', 'pg_cron');"

Then let pgGraph discover foreign key relationships on your tables, call graph.build() to build the graph, and query it with functions in the graph schema. For deployment, use the versioned multi-architecture release image and verify its published digest:

docker pull ghcr.io/evokoa/pggraph:1.2.1

Upgrading to 1.2.1 requires updating the extension and rebuilding each graph (see the release notes). Optionally start the Streamlit playground with a preset dataset:

scripts/quickstart.sh playground panama csr
scripts/quickstart.sh playground panama mutable

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • No data migration: source tables, constraints, indexes, ACLs, RLS, backups and application writes stay standard PostgreSQL concerns; the graph is derived, rebuildable state
  • CSR adjacency gives O(1) neighbor lookup and streams neighbors in memory, avoiding recursive SQL and repeated joins
  • Explicit circuit breakers — depth limits, visited-node tracking, frontier limits, pagination and OOM/memory safeguards — reduce the risk of unbounded expansion crashing the database
  • Several install channels: Docker images for PostgreSQL 14–18, a Homebrew tap, and PGXN/pgrx source builds
  • Independent of native SQL/PGQ, sidestepping PostgreSQL 19's removal of that feature
Limitations
  • Each backend that loads a graph keeps roughly one artifact-sized private snapshot, and base graph pages are not shared across backends through the OS page cache, so memory needs sizing
  • Upgrading to 1.2.1 requires updating the extension and rebuilding every graph — real operational work
  • Source builds need matching PostgreSQL server dev packages, Rust 1.96 and cargo-pgrx 0.19.1; mismatches surface as errors such as a missing postgres.h
  • The Homebrew tap is updated separately from Docker and PGXN, so you must verify the installed extension reports 1.2.1
  • Optimized for repeated bounded traversal over known topology; it is not a general graph database and has no Cypher-style query language
  • Repository metadata reports the license as NOASSERTION while the README states Apache-2.0; check the LICENSE file before adopting

How does this agent compare with similar options?

The README explicitly contrasts pgGraph with Apache AGE: AGE is a property graph database inside Postgres with graph namespaces, vertex and edge tables, agtype and openCypher; pgGraph asks you to keep your schema and learn no Cypher, accelerating bounded traversal with SQL functions such as graph.search() and graph.shortest_path(). It also addresses PostgreSQL's native SQL/PGQ (CREATE PROPERTY GRAPH, GRAPH_TABLE), which was removed from the PostgreSQL 19 release branch; pgGraph supports PostgreSQL 14–18 independently of it.

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
pgGraph This agent 60 · Some gaps — ★ 1.1k 2mo ago Rust —
Tabularis: Open-Source Desktop SQL Workspace 73 · Some gaps Desktop appFree + model costs ★ 5.5k 1d ago TypeScript ChatGPT · Codex · Claude Code · Claude.ai
BrainDB Memory Database 59 · Major gaps Self-hosted serviceFree + model costs ★ 117 1mo ago Python Claude Code
AgentBench 54 · Major gaps Self-hosted serviceFree + model costs ★ 3.8k 9mo ago Python OpenAI API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
60/ 100 5-point scale 3.0 / 5
Trust 17/29
Reliability 9/14
Adaptability 10/18
Convention 12/18
Effectiveness 7/13
Verifiability 5/8
Why each dimension lost points
Trust17 / 29 · 2.9/5

Security docs show ACL preflight, admin boundaries, SECURITY DEFINER search_path pinning, RLS visibility scopes, tenant scoping and quotas, a fairly complete privilege design (least_privilege 2). However the Docker init script creates pg_cron and schedules maintenance every five minutes by default, a persistent external side effect without per-action confirmation (external_effects 1, user_confirmation 2). Data flow is explained (derived state, private artifact snapshot) but artifacts contain source primary keys and topology; sensitive handling relies on ACL/RLS only, no encryption or masking (sensitive_data_handling 2). Dependency security has exact pins, lockfiles, a 6-hour age gate and sfw wrapper (dependency_security 2). Rollback via reset/rebuild and retaining last valid generation is described (rollback 2). Attribution is only README badges and Evokoa branding; publisher unverified (source_attribution 1).

Reliability9 / 14 · 3.2/5

Error model has SQLSTATE and stable diagnostic table, high-quality failure messages (failure_messages 3). But SECURITY.md claims 1.0.x is supported while README/AGENTS say 1.2.1, a version inconsistency (self_consistency 1). Dependency availability has explicit Rust/pgrx/PostgreSQL matrix and multi-channel install (dependency_availability 2).

Adaptability10 / 18 · 2.8/5

Targets graph queries over existing Postgres data; audience and scenarios clear (audience_and_scenarios 2). Capability boundaries explained via AGE and SQL/PGQ comparisons and limitations (capability_boundaries 2). Trigger precision: AGENTS.md is actually a package-manager safety wrapper, weakly related to the product, and auto_discover heuristics may misfire (trigger_precision 1). Environment fit covers macOS/Linux/WSL2 and multiple PG versions (environment_fit 2).

Convention12 / 18 · 3.3/5

Docs are well structured with user guide, contributor guide and API reference (information_architecture 2). Install notes are thorough across Homebrew/PGXN/Docker/source (install_notes 3). Naming: PGXN name pgGraph differs from extension name graph, requiring explicit callout (naming_stability 2). Examples and FAQ exist via quickstart and playground (examples_and_faq 2). Known limitations documented in limitations-and-fit and config warnings (known_limitations 2). LICENSE is full Apache-2.0 but metadata says NOASSERTION (license 2). Release notes and version badge present (versioning_changelog 2). Maintenance responsibility points to Evokoa and an external tap; publisher unverified (maintenance_responsibility 1).

Effectiveness7 / 13 · 2.7/5

Output usability: SQL functions return structured results plus a playground (output_usability 2). Marginal value over recursive SQL is clear (marginal_value 2). Cost: requires Docker/Rust/pgrx builds and per-backend private snapshots consuming memory, relatively high (cost_benefit 1).

Verifiability5 / 8 · 3.1/5

README claims trace to docs and code modules (claim_traceability 2). Multiple docs and test scripts corroborate each other (cross_source_corroboration 2). Docs separate fact from inference, e.g. SQL/PGQ removal cites upstream commit (fact_inference_separation 2). All static reading, no execution.

Risks and how to mitigate them
  • SECURITY.md claims 1.0.x support while README/AGENTS state 1.2.1; the security support scope may be stale.
  • Docker image enables pg_cron and schedules maintenance every five minutes by default, a persistent side effect to confirm before deployment.
  • Graph artifacts contain source primary keys and topology; sensitive protection relies on ACL/RLS with no encryption or masking shown.
  • Publisher identity is unverified and the Homebrew tap is maintained in an external repo; verify signatures and digests before install.
  • AGENTS.md is a package-manager safety wrapper, weakly related to the product, and should not be treated as product instructions.
  • License metadata is NOASSERTION while LICENSE is Apache-2.0; reconcile manually.
Evidence confidence: Low Reviewed Nov 25, 2026 Reviewed revision b0f53df41cd9
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/pggraph.svg)](https://followagents.com/en/agents/pggraph)
<a href="https://followagents.com/en/agents/pggraph"><img src="https://followagents.com/badge/pggraph.svg" alt="FARS review"></a>

FAQ

Does it copy my data into a separate graph database?
No. Source tables remain the system of record and application data does not move. pgGraph builds derived graph artifacts from table relationships, and queries return source table coordinates or hydrate raw rows on demand.
Which PostgreSQL versions are supported?
PostgreSQL 14 through 18, with Docker images published per major version. PostgreSQL 13 is past upstream EOL and supported only on a best-effort basis via the legacy pg13 pgrx feature; the extension package's major version must match the target server.
Is there a cost?
The extension is open source, stated as Apache-2.0 in the README, and can be self-hosted. Evokoa separately runs a managed version at polygres.com, which is an optional paid path — the community edition does not require it.
Can an unbounded traversal take down the database?
The engine includes circuit breakers — depth limits, visited-node tracking, frontier limits, pagination and strict OOM/memory safeguards — so you bound expansions rather than leaving them open-ended.
Metadata says NOASSERTION for the license — can I use it commercially?
The repository metadata reports NOASSERTION while the README and badge state Apache-2.0 and point to the LICENSE file. Read that file directly to confirm the terms before adopting.
Is pgGraph safe to use?
FollowAgents' FARS review (Nov 25, 2026) scored pgGraph 17/29 on trust and safety. None of the eight safety controls the review checks for was missing outright.
Is pgGraph still maintained?
Development has slowed: the latest commit on GitHub is from 2026-09-23, within the last six months but not the last 30 days.
Who makes pgGraph?
pgGraph is published on GitHub by the account Evokoa. FollowAgents has not verified which person or company is behind that account.
What is pgGraph's official website?
The project's GitHub repository lists https://www.polygres.com as its website. That link is set by the repository owner; the source code itself is on GitHub (Evokoa/pgGraph).
Was this page helpful?
View on GitHub ↗ Install ↓

Related concepts