How it works
A multi-tenant property-graph service. PostgreSQL and Apache AGE behind a typed HTTP API. For teams whose services share connected data (dependencies, assets, knowledge graphs, agent memory) and who already run PostgreSQL.
Your services, AI agents and people call graphos-api, with a bearer token; it alone connects to PostgreSQL and Apache AGE, on an internal network. Each tenant is its own AGE graph. Graph algorithms run beside the API, in a process of their own, and write their results back; every write is recorded in the change feed, in the same transaction.
01 · graphos-api
One service owns the graph: your services call typed HTTP, and only graphos talks to the database.
Consumers never see a PostgreSQL connection string and cannot send SQL. graphos-api connects as an unprivileged role, and the database has no published port: it sits on an internal network. The contract is published at /openapi.json, versioned under /v1.
See it in: One graph, many services, An AI agent reads the graph
02 · Tenant
Each tenant is its own AGE graph, and a caller reaches only the tenants it is granted.
graphos ships no labels of its own: you declare yours, with property rules if you want them, and rename or deprecate them later, in place. A missing grant or too low a level is refused before any SQL runs.
See it in: Many teams, one service, single sign-on, One graph, many services
03 · Writes through the API
Batches, NDJSON streams and snapshots, staged with COPY and upserted. Cypher reads only.
Rows go into a staging table with a binary COPY, then INSERT … ON CONFLICT DO UPDATE: there is no other write path. Sending the same data again leaves it as it was; each repeat still records a new revision and a change. Per-row Cypher MERGE managed 31 edges a second; this path, 1,153–4,840.
See it in: Load a big graph, and load it again, Keep the edges equal to the source
04 · Graph algorithms
Computed beside the data, in a process of their own, and stored on the nodes.
Degree, PageRank, components and betweenness run on rustworkx; communities, Louvain or Leiden, need the optional igraph extra. A re-run writes only what moved. Leiden can start from the stored communities, so they keep their ids.
See it in: Communities and key nodes, re-run cheaply, Explore a software ecosystem
05 · Plain AGE underneath
Your data stays in AGE's own format, in ordinary PostgreSQL tables: you can leave at any time.
AGE's Cypher and plain SQL read a tenant with no graphos running, and a dataset export loads into a new plain AGE graph with the loader graphos ships.
See it in: Leave whenever you want, Load a big graph, and load it again
The other parts you meet
- Reconcile
- Send the whole set of edges as your source has them; graphos changes only what differs. One node's edges of a type, or every edge of a type between two labels, made equal to the set you send, in one transaction. A dry run answers the counts and writes nothing.
- Change feed
- Every write recorded in the same transaction that makes it; read after a cursor, or followed live. Records say what changed, not the values. The feed never skips a committed change, delivers at least once, and keeps seven days by default.
- MCP endpoint
- /mcp gives AI agents graphos's reads as 22 tools, with the caller's own grants. Whatever a token may read through /v1, it may read through /mcp, and no more. No tool writes, and every call is in the audit log.
- Users, grants and sign-on
- Users and service accounts, a level per tenant, 15-minute tokens, OpenID Connect sign-on. Levels are read, write, maintain and owner. Tokens last 15 minutes by default, so a leaked one is useful for minutes, not months; the web UI and the Python client renew theirs by themselves.
- Web UI
- An optional web UI: explore, edit the schema, query, import. Explore draws a tenant's graph, its groups and its map; the schema editor declares labels and relationship types; the Query page reads with Cypher where the console is on; a CSV file is checked row by row before anything is written.
- Python client
- An async, typed Python client: pip install graphos-client. It signs in and renews its tokens by itself, and wraps the API's writes, reads, jobs and change feed.
- Audit log
- One JSON line per request: who, on which tenant, with what result. On by default for writes; reads by a setting. A person's own token forwarded by an application is audited as that person.
Questions people ask first
- Who is graphos for?
- Teams with several services that share connected data, such as dependencies, assets, a knowledge graph or an agent's memory, and who run PostgreSQL or are happy to. If a single application owns the graph and needs to write it with Cypher, plain Apache AGE or a native graph database suits it better.
- Why not Neo4j, or plain Apache AGE?
- graphos runs on PostgreSQL, a database you may already operate, back up and monitor; it has tenants, users and grants built in, and keeps your data in AGE's own format, so you can leave at any time. Plain AGE leaves every service to hold database credentials and to solve loading, indexing and isolation itself, with Cypher writes at about 31 edges a second. A native graph database wins for deep, variable-length traversals: graphos expands up to 5 hops and finds paths of up to 8.
- Why is Cypher read-only?
- Speed: per-row Cypher MERGE managed 31 edges a second, where graphos's COPY-staged upserts manage 1,153–4,840. Safety: AGE mishandles Cypher writes to tables carrying the columns graphos adds for revisions and communities. Writing through the API also keeps revisions, the change feed and the audit log right.
- How big can a tenant get?
- graphos sets no limit. Measured: a 251,246-node, 940,144-edge graph read on a single machine, the graph algorithms on synthetic graphs of up to 3.0 million edges, and the label map on ten million edges. A single snapshot import takes up to 50 million rows. Larger graphs mostly need more memory for PostgreSQL.
- Is it ready for production?
- It has what running it for other people needs: users, grants and single sign-on, secrets sealed at rest, statement timeouts, metrics and an audit log. Every change to main is tested in CI against PostgreSQL 18 with AGE 1.8. graphos is still before 1.0, so a release can change the API; each release's changes are in the changelog.
- What is the licence?
- graphos and its published images are Apache-2.0. Community detection (Louvain and Leiden) needs python-igraph, which is GPL-2.0-or-later, so it is an optional extra the published images leave out; the other graph metrics run on rustworkx, Apache-2.0.