AgensGraph is a cutting-edge multi-model graph database designed for modern complex data environments. By supporting both relational and graph data models simultaneously, AgensGraph allows developers to seamlessly integrate legacy relational data with the flexible graph data model within a single database. AgensGraph is built on the robust PostgreSQL RDBMS, providing a highly reliable, fully-featured platform ready for enterprise use.
- Multi-Model Support: Combines relational and graph data models.
- Query Languages: Supports ANSI-SQL and openCypher (openCypher) and partially ISO/GQL.
- Seamless Integration: Integrate SQL and Cypher queries within a single query.
- Enterprise-Ready: ACID transactions, multi-version concurrency control, stored procedures, triggers, constraints, sophisticated monitoring, and flexible data models (JSON).
- Extensible: Leverages PostgreSQL's rich ecosystem, including modules like PostGIS.
-
Pull the AgensGraph Docker image
docker pull skaiworldwide/agensgraph
Note: By default, this pulls the
latesttag -
Create and run the AgensGraph container
docker run \ --name agensgraph \ -p 5455:5432 \ -e POSTGRES_USER=postgres \ -e POSTGRES_PASSWORD=agens \ -e POSTGRES_DB=agens \ -d \ skaiworldwide/agensgraph -
Connect to AgensGraph client
docker exec -it agensgraph agens -d agens -U postgres
More Information
See more information on the Docker Hub page.
To build, install and setup AgensGraph for source, follow instructions in Installation Guide
PostgreSQL's defaults are tuned for small relational queries. Graph analytics — neighbourhood aggregation, top-degree, multi-hop traversals — run large hash/sort operations that spill to disk at the default work_mem, and benefit from parallelism. The settings below are a good starting point for an analytics or mixed graph workload on a multi-core server.
Apply them with ALTER SYSTEM SET ...; followed by SELECT pg_reload_conf(); (or by editing postgresql.conf), or SET them per session.
# Memory: avoid disk spills in graph aggregation/sort
work_mem = 256MB # per sort/hash node; raise for heavy GROUP BY / DISTINCT
maintenance_work_mem = 1GB # faster index builds and VACUUM on large edge labels
# Planner: trust indexes and account for the cache
effective_cache_size = <~70% of RAM>
random_page_cost = 1.1 # for SSDs, where index scans are nearly as cheap as sequential
# Parallelism: speeds up full-edge-scan analytics
max_parallel_workers_per_gather = 4
max_parallel_workers = <number of CPU cores>
max_worker_processes = <number of CPU cores>Notes:
work_memis allocated per sort/hash node, per connection, so a large value combined with many concurrent clients can over-commit memory. Size it to roughlyRAM / expected_concurrency, or raise it only per session for heavy analytic queries.- Parallelism helps large full-scan analytics but adds worker-startup overhead to small point or single-hop reads; lower
max_parallel_workers_per_gatherif your workload is mostly short, OLTP-style queries. - After bulk-loading a graph, run
ANALYZEso the planner has accurate statistics for traversal joins.
AgensGraph-AI Repository provide collection of tools, integrations, and starter templates for building AI-powered applications that work with AgensGraph.
AgensGraph supports various drivers for seamless connection and interaction with the database. Below are the supported drivers:
| Driver | Description |
|---|---|
| JDBC | JDBC Driver Enables Java applications to interact with AgensGraph. |
| Python | Python Driver Facilitates interaction between Python applications and AgensGraph. |
| Node.js | Node.js Driver Allows Node.js applications to interface with AgensGraph. |
| Go | Go Driver Provides connectivity for Go applications to AgensGraph. |
AgensGraph Manual is available to help you get started with AgensGraph and make the most of its features.
AGViewer is a web-based user interface that provides visualization of graph data stored in an AgensGraph database. It allows users to easily interact with and visualize their graph data, making it easier to understand and analyze complex relationships within the database.
- Web-Based Interface: Accessible through any web browser.
- Graph Visualization: Provides interactive visualization tools for graph data.
- User-Friendly: Intuitive interface designed for ease of use.
- Real-Time Interaction: Allows for real-time data updates and interaction with graph data.
For more information and to get started with AGViewer, visit the AGViewer GitHub repository.
