Other

项目介绍

skaiworldwide-oss/agensgraph 是一个托管在 GitHub 上的开源项目,主要使用 C 编写,采用 Other 许可证,目前获得 1.5k 个 Star、159 次 Fork。

仓库全名
skaiworldwide-oss/agensgraph
开源许可证
Other
Star 数
1.5k
Fork 数
159
未关闭 Issue
145

README 摘要

A high-performance graph database built on PostgreSQL. Graphs and tables in one database. SQL, openCypher and ISO GQL in one query. AgensGraph is developed by SKAI Worldwide, formerly Bitnine. Documentation · Quick start · AI and agents · Discussions · Releases What AgensGraph is PostgreSQL with the property graph model built in. A fork of PostgreSQL, not an extension. A graph is a schema, a label is a table, a…

完整内容见 GitHub 原始 README 或本页 。

常见问题

agensgraph 用什么语言开发?

主要使用 C 编写,采用 Other 许可证,目前有 1.5k 个 Star。

agensgraph 可以免费商用吗?

仓库标注的许可证为 Other,商用前请先阅读仓库 LICENSE 文件确认授权范围。

如何获取 agensgraph 的源码?

可以直接克隆仓库:git clone https://github.com/skaiworldwide-oss/agensgraph.git,默认分支为 main;安装与运行步骤见仓库 README。

agensgraph 最近还在维护吗?

仓库最近一次更新为 1 周前,当前有 145 个未关闭 Issue;Star 数为 1.5k,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

AgensGraph, a transactional graph database based on PostgreSQL

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
1893
价值分
955
活跃状态
活跃

语言占比

Assembly
C
C++
DTrace
Emacs Lisp
Lex
M4
Makefile
Meson
PLSQL
PLpgSQL
Perl
Prolog
Python
Roff
Ruby
Shell
Starlark
XS
Yacc
sed

Release

README

SKAIWorldwide AgensGraph

A high-performance graph database built on PostgreSQL.
Graphs and tables in one database. SQL, openCypher and ISO GQL in one query.
AgensGraph is developed by SKAI Worldwide, formerly Bitnine.

Documentation · Quick start · AI and agents · Discussions · Releases

Regression Release Docker pulls License

What AgensGraph is

  • PostgreSQL with the property graph model built in. A fork of PostgreSQL, not an extension.
  • A graph is a schema, a label is a table, a vertex or an edge is a row.
  • Graph data and relational tables live in one database and commit in one transaction.
  • Query with SQL, openCypher and ISO GQL (ISO/IEC 39075). Mix them in one statement.
  • Everything PostgreSQL has works on graph data: transactions, roles, row-level security, replication, pg_dump, EXPLAIN, extensions such as pgvector.
  • Apache License 2.0.

Quick start

1. Start a server

docker run --name agensgraph -e POSTGRES_PASSWORD=agensgraph -d skaiworldwide/agensgraph:latest
docker exec -it agensgraph agens -U agens -d postgres

2. Create a graph

CREATE GRAPH movies;
SET graph_path = movies;

CREATE (keanu:person {name: 'Keanu Reeves'}),
       (carrie:person {name: 'Carrie-Anne Moss'}),
       (matrix:movie {title: 'The Matrix', year: 1999}),
       (wick:movie {title: 'John Wick', year: 2014}),
       (keanu)-[:acted_in {role: 'Neo'}]->(matrix),
       (carrie)-[:acted_in {role: 'Trinity'}]->(matrix),
       (keanu)-[:acted_in {role: 'John Wick'}]->(wick);

3. Match a pattern

MATCH (:person {name: 'Carrie-Anne Moss'})-[:acted_in]->(m:movie)<-[:acted_in]-(co:person)
RETURN co.name AS co_star, m.title AS movie;
    co_star     |    movie
----------------+--------------
 "Keanu Reeves" | "The Matrix"
(1 row)

4. Follow a path of any length

MATCH (:person {name: 'Carrie-Anne Moss'})-[:acted_in*1..3]-(m:movie)
RETURN DISTINCT m.title AS reachable ORDER BY reachable;
  reachable
--------------
 "John Wick"
 "The Matrix"
(2 rows)

5. Join the graph to a table

CREATE TABLE my_ratings (title text, stars int);
INSERT INTO my_ratings VALUES ('The Matrix', 5), ('John Wick', 4);

SELECT f.title, r.stars
FROM (MATCH (:person {name: 'Keanu Reeves'})-[:acted_in]->(m:movie)
      RETURN m.title AS title) AS f
JOIN my_ratings r ON r.title = f.title #>> '{}'
ORDER BY r.stars DESC;
    title     | stars
--------------+-------
 "The Matrix" |     5
 "John Wick"  |     4
(2 rows)

Next: the example dataset · combining SQL and Cypher · paths

Query languages

Language Use it for Docs
SQL Tables, DDL, administration, and queries over a Cypher subquery Combining SQL and Cypher
openCypher Patterns, paths, graph writes Reading, Writing
ISO GQL LET, FILTER, FOR, NEXT, FINISH, INSERT, CALL { }, subquery expressions GQL conformance

GQL and Cypher are one language. No mode switch:

MATCH (p:person)-[:acted_in]->(m:movie)
RETURN p.name AS actor, count(m) AS movies
NEXT FILTER movies > 1
RETURN actor;
     actor
----------------
 "Keanu Reeves"
(1 row)

Features

Area What you get
Graph model Vertex and edge labels, label inheritance, property indexes, constraints
Paths Variable-length patterns, shortestpath(), allshortestpaths(), dijkstra()
Subqueries CALL { }, OPTIONAL CALL, EXISTS { }, COUNT { }, COLLECT { }, VALUE { }
Typed columns Store chosen properties in typed, indexable columns (typed columns)
Search Vector and full-text search on properties through PostgreSQL extensions (vector, full text)
Planner Row estimates for paths, label pruning, skipped scans for unused endpoints
Security Grants and row-level security on labels, enforced for Cypher reads and writes
Operations pg_dump / pg_restore, pg_upgrade, streaming and logical replication

AI and agents

  • Knowledge graph, embeddings (with pgvector) and agent memory in one PostgreSQL database.
  • GraphRAG in one statement: vector, full-text or hybrid search, then a graph traversal.
  • MCP servers give AI assistants and agents tool access to the graph.
Integration What it provides Package
MCP: Cypher Schema introspection and read/write Cypher tools for MCP clients such as Claude Desktop mcp-agensgraph-cypher
MCP: Memory Knowledge-graph memory for agents: entities, relations, observations mcp-agensgraph-memory
MCP: Data modeling Graph model validation; generated ingest and constraint Cypher mcp-agensgraph-data-modeling
LangChain Graph store, pgvector vector store, chat history, LangGraph checkpointer, LLM graph transformer langchain-agensgraph
LlamaIndex PropertyGraphIndex and VectorStoreIndex stores, hybrid search, Text2Cypher llama-index-agensgraph
LightRAG All four LightRAG storage roles in one database, with workspace multi-tenancy lightrag-agensgraph
cognee Graph and vector adapters for the cognee AI-memory framework cognee-agensgraph
pip install "agensgraph-ai[all]"     # or one of: [mcp] [langchain] [llama-index] [lightrag] [cognee]

AgensGraph AI documentation · source and demos · GraphRAG without a framework

Install

Route How
Docker skaiworldwide/agensgraph:v<release>-<base>. Bases: bookworm, trixie, alpine3.23, alpine3.24, rocky9, rocky10 (Docker Hub)
Source Build from source
Upgrade from 2.17 Upgrading to 2.18

Drivers

Any PostgreSQL driver connects (drivers and client libraries). The Python driver adds graph types:

Language Package Docs Repository
Python agensgraph-python AgensGraph for Python agensgraph-python

Documentation

Community

  • Questions: Discussions
  • Bugs and feature requests: Issues
  • Code: pull requests against main

License

评论

暂无评论