is a leading multi-model graph database
Graph Processing & Analytics for Relational Databases
What is Apache AGE?
Apache AGE is an extension for PostgreSQL that enables users to leverage a graph database on top of the existing relational databases. AGE is an acronym for A Graph Extension and is inspired by Bitnine's AgensGraph, a multi-model database fork of PostgreSQL. The basic principle of the project is to create a single storage that handles both the relational and graph data model so that the users can use the standard ANSI SQL along with openCypher, one of the most popular graph query languages today. There is a strong need for cohesive, easy-to-implement multi-model databases. As an extension of PostgreSQL, AGE supports all the functionalities and features of PostgreSQL while also offering a graph model to boot.
Overview
Apache AGE is :
- Powerful: adds graph database support to the already popular PostgreSQL database: PostgreSQL is used by organizations including Apple, Spotify, and NASA.
- Flexible: allows you to perform openCypher queries, which makes complex queries much easier to write. It also enables querying multiple graphs at the same time.
- Intelligent: allows you to perform graph queries that are the basis for many next-level web services such as fraud detection, master data management, product recommendations, identity and relationship management, experience personalization, knowledge management, and more.
Features
- Cypher Query: supports graph query language
- Hybrid Querying: enables SQL and/or Cypher
- Querying: enables multiple graphs
- Hierarchical: graph label organization
- Property Indexes: on both vertices(nodes) and edges
- Full PostgreSQL: supports PG features
Documentation
Refer to our latest Apache AGE documentation to learn about installation, features, built-in functions, and Cypher queries.
Pre-Installation
Install the following essential libraries according to each OS. Building AGE from the source depends on the following Linux libraries:
- CentOS
yum install gcc glibc glib-common readline readline-devel zlib zlib-devel flex bison
- Fedora
dnf install gcc glibc bison flex readline readline-devel zlib zlib-devel
- Ubuntu
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison
Installation
Apache AGE is intended to be simple to install and run. It can be installed with Docker and other traditional ways.
Install PostgreSQL
You will need to install an AGE compatible version of Postgres, for now AGE supports Postgres 11, 12, 13, 14, 15, 16, 17 & 18. Supporting the latest versions is on AGE roadmap.
Installation via Package Manager
You can use a package management that your OS provides to download PostgreSQL.
sudo apt install postgresql
Installation From Source Code
You can download the Postgres source code and install your own instance of Postgres. You can read instructions on how to install from source code for different versions on the official Postgres Website.

Install AGE on Linux and MacOS
Clone the github repository or download the download an official release.
Run the pg_config utility and check the version of PostgreSQL. Currently, only PostgreSQL versions 11, 12, 13, 14, 15, 16, 17 & 18 are supported. If you have any other version of Postgres, you will need to install PostgreSQL version 11, 12, 13, 14, 15, 16, 17 & 18.
pg_config
Run the following command in the source code directory of Apache AGE to build and install the extension.
make install
If the path to your Postgres installation is not in the PATH variable, add the path in the arguments:
make PG_CONFIG=/path/to/postgres/bin/pg_config install
Run using Docker
Get the docker image
docker pull apache/age
Create AGE docker container
docker run \
--name age \
-p 5455:5432 \
-e POSTGRES_USER=postgresUser \
-e POSTGRES_PASSWORD=postgresPW \
-e POSTGRES_DB=postgresDB \
-d \
apache/age
Enter PostgreSQL's psql:
docker exec -it age psql -d postgresDB -U postgresUser
Post Installation
For every connection of AGE you start, you will need to load the AGE extension.
CREATE EXTENSION age;
LOAD 'age';
SET search_path = ag_catalog, "$user", public;
Note on ag_catalog ownership
AGE installs all of its objects into the ag_catalog schema. Install AGE
(CREATE EXTENSION age) before granting the CREATE privilege on the
database to other roles. A role that can create schemas could otherwise
pre-create ag_catalog and own it; CREATE EXTENSION age therefore refuses to
install when ag_catalog already exists and is owned by a different role. If you
hit that error, drop the stray schema (DROP SCHEMA ag_catalog CASCADE) or
transfer its ownership to the installing role, then retry.
Using AGE with Non-Autocommit Clients (psycopg, JDBC, etc.)
If you are using AGE from a database client that does not default to autocommit — most commonly psycopg v3 or JDBC — you must understand how PostgreSQL's transaction semantics apply to AGE's setup and DDL-like functions. Otherwise, you may see graphs or labels that appear to be created successfully, but are not visible from new connections.
This is not a bug in AGE — it is standard PostgreSQL behavior. AGE's DDL-like functions write to the catalog, and catalog writes only become visible to other sessions after the enclosing transaction is committed.
What is and isn't transactional
| Statement | Scope | Needs commit to be visible elsewhere? |
|---|---|---|
LOAD 'age' |
Session-local (loads the .so into the current backend) | No |
SET search_path = ag_catalog, "$user", public |
Session-local | No |
SELECT create_graph('g') |
Writes to ag_graph and creates a schema |
Yes |
| `SELECT create_vlabel(' |