pggraph Explore the API
An illustrative graph. Drag horizontally or use the arrow keys to rotate. Switch to Matrix to see its adjacency matrix.

GRAPH COMPUTATION, RECONSIDERED

Your data.Connected.

A new dimension for your graph queries.
GraphBLAS-powered acceleration for PostgreSQL,
starting with Apache AGE™.

Python interface. Sparse matrices. More possibilities.

EXPLORE THE ENGINE
BUILT ON SOLID GROUNDPostgreSQLApache AGE™GraphBLASPython

THE EXECUTION LAYER

One query.
The right route.

Keep your graph in Apache AGE. pg-graph caches its topology as sparse matrices and routes supported queries to GraphBLAS, the database, or both.

CYPHER INpg.execute()
MATCH (p:Person)-[:KNOWS*1..3]->(friend:Person)
RETURN DISTINCT friend

Traverse the cached topology with GraphBLAS sparse matrix operations.

GraphBLAS COMPUTEHybrid COMBINEApache AGE DATABASE
SELECTED ROUTE GRAPHBLASRecorded decisions from the pg-graph query router

A Python interface for your existing graph

Graph topology, expressed as sparse matrices

Database filters meet in-memory traversal

EARLY BENCHMARKS

Let the numbers
do the talking.

INTERNAL RUN · JAN 2026

Recorded query latency on a Twitter follow graph. Explore the results from an early comparison with Neo4j.

20.8ms

pg-graph · mean · 4-hop traversal

100 timing samples per query, per engine2 warm-up queries per starting vertex

Exploratory measurements. Graph loading is excluded; these results have not been independently reproduced.

What’s behind these numbers?

The saved run contains 10 starting vertices × 10 timed runs, with 2 warm-up queries per vertex. The original result files call this engine “AGEBlas”; it is presented here under the pg-graph product name.

Hardware, database versions, exact dataset size, and output-equivalence evidence were not retained with the run. These are preliminary engineering results, not a general performance comparison. Shortest-path and algorithm benchmarks were excluded.

Download the recorded timings

THE GRAPH PLAYGROUND

Small graph.
Real possibilities.

Follow a connection. Find the influential nodes.
An illustrative social graph, with results recorded from the pg-graph Python engine.

SOCIAL / KNOWSChoose a node to start there
Explore the sample social graphSeven people linked by nine directed KNOWS relationships. Select a person to change the traversal source.
Starting point Reachable vertex07 NODES / 09 EDGES
RESULT SET6 vertices
People reachable from Ada within 3 hops
PersonNode ID
Bo102
Cy103
Dee104
Eli105
Faye106
Gus107

Unique people reachable from Ada within 3 hops.

pg.explicit().multi_hop_neighbors(101, max_hops=3, edge_label="KNOWS")

Recorded engine results on a fixed sample graph. No database connection is made by this page.

Traversal Shortest paths PageRank Components Clustering

BUILT FOR THE CURIOUS

Make the
connection.

Your graph. Your Cypher.
A Python interface to explore what comes next.

Get the Python exampleDiscuss your workload
GET CONNECTEDPYTHON
# With pg_graph installed and Apache AGE configured
from pg_graph import PGGraph

pg = PGGraph.connect(
    database="mydb",
    graph="social",
)

# Let the router choose an execution path.
results = pg.execute("""
    MATCH (p:Person)-[:KNOWS*1..3]->(friend)
    WHERE p.name = 'Ada'
    RETURN DISTINCT friend.name
""")
What do I need to get started?

Python 3.11+, the pg_graph package and its Cypher grammar dependency, plus PostgreSQL with Apache AGE and an existing graph. The downloadable example reads connection settings from environment variables.

Where does the data live?

Your graph stays in PostgreSQL. Graph topology is loaded into an in-memory GraphBLAS cache in the Python process. Property access and database operations use Apache AGE.

Is it ready for production?

pg-graph is an experimental Python project. It is best evaluated on static or controlled graph snapshots. Cache synchronization and refresh behavior need further work; full Cypher compatibility and production reliability are not claimed.