Self-Hosted Knowledge Graph for AI Agents With RBAC

For a self hosted knowledge graph with RBAC, the question that matters is not which database role an agent holds but whether a fact derived from a source stays hidden from anyone who cannot see that source. Most graph stores give you permissions on the database, the graph or the dataset. Helix Foundry, an open-source ontology builder from the HelixDB team, inherits access from the sources each fact came from, and it deploys in your own cloud.
That difference decides whether an agent can answer a question with something it should never have read. The sections below compare where each self-hostable option draws its permission line, so you can check your own requirements against them.
Why RBAC on a knowledge graph is harder for agents
RBAC on a knowledge graph is harder for agents because the graph stores derived facts, and a derived fact has no obvious owner. A relationship like "Acme renewed at a discount" might come from a Stripe record, a CRM note and a call transcript. If the transcript is restricted to the sales team, who is allowed to see that edge?
A database role answers a different question: what can this user do to this graph, label or property? That works when the people reading and the people writing share a clear boundary. It breaks when an agent is the reader. An agent traverses edges, joins across sources and summarises, so a single answer can pull in facts whose origins have different audiences.
The test is simple. Pick a document one user cannot open. Ask an agent running as that user a question whose answer depends on that document. If the answer comes back, your permission line is in the wrong place. The rest of this post compares where each tool draws it.
What to check: where it runs, licence, roles, finer-grained rules, directory integration, source-grounded access
Check six things before you pick a self-hosted knowledge graph for agents, and ask each vendor for evidence on all six.
Where it runs. Self-hosted, bring-your-own-cloud or managed only. Some access features exist only on a paid or hosted tier.
Licence. Open source, source-available or commercial. It decides whether you can run the access layer without a contract.
Roles. Whether users can be grouped into roles, or only given individual permissions.
Finer-grained rules. Whether you can restrict by label, property or edge type rather than only by whole graph.
Directory integration. Whether users and groups come from LDAP or your identity provider instead of being re-entered by hand.
Source-grounded access. Whether a derived fact inherits the visibility of the sources it came from, or whether you model that yourself with properties and tags. This is the one most buyers forget, and the one that stops an agent leaking.
Neo4j and Memgraph: roles and property rules in Enterprise
Neo4j and Memgraph both offer roles and fine-grained rules, but the strong features sit in their Enterprise editions. Memgraph is licensed under BSL 1.1 with a separate Enterprise licence.
Neo4j's property-based access control grants or denies permission to read or traverse nodes and relationships based on property and value conditions. The docs also warn that it can add significant performance overhead in some scenarios. The rule is only as strong as the property it reads: if a fact's visibility lives in a property, then whoever can change that property changes who sees the fact, and you are responsible for keeping it in step with the source. Neo4j also supports LDAP integration in Enterprise, mapping LDAP groups to Neo4j roles.
Memgraph's role-based access control is an Enterprise feature. Users can hold several roles, and its fine-grained access control covers label-based permissions for nodes and edge-type permissions for relationships.
Both are strong database-level controls, and if you need label or property rules on a graph you operate directly, either fits. Neither documents carrying a source system's permissions onto the facts derived from it, so that mapping is yours to build and maintain.
FalkorDB, Graphiti and Cognee: per-graph and per-dataset boundaries
FalkorDB, Graphiti and Cognee draw the line around a whole graph or a whole dataset, not around individual facts.
Its ACL command defines users with graph-name patterns and per-graph read or write permissions. The ACL page documents no roles, no label or property rules and no directory integration. If your tenants map cleanly to separate graphs, that is a clear and cheap boundary. If a tenant's graph mixes sources with different audiences, it cannot split them.
Its README says you build tenancy and access control yourself, and the reference servers do not authenticate callers. Treat it as a temporal graph framework, not an access control layer.
Its permissions system provides multi-user mode with users, tenants and roles, and read, write, delete and share permissions per dataset. The dataset is the boundary. That is real RBAC out of the box, but a fact extracted from two datasets lands in one of them, so source-level visibility depends on how you split your data before ingestion.
Zep: source policies on the Enterprise plan
Zep comes closest among the memory tools to source-aware access, and it gates that behind its Enterprise plan.
Its attribute-based access control includes source-based policies. Your application attaches metadata to data at ingestion, and Zep carries the combined metadata of all contributing episodes onto the nodes, edges and summaries derived from them. A policy can then hide any object that a non-granted source contributed to. Matching is exact set equality by default, with an opt-in for subset matching.
That is the right idea, and Zep deserves credit for it. The catch is where the labels come from. Your app attaches the metadata, so Zep does not read the permissions of Google Drive, Slack or Notion itself. If a file's access list changes in the source system, someone has to re-tag. Source-based policies are also an Enterprise-plan feature, not part of the open-source Graphiti you run yourself.
Helix Foundry: access that follows the source, in your own cloud
Helix Foundry is an open-source (Apache-2.0) tool that connects your databases, SaaS tools and documents, builds one ontology over them and loads it into HelixDB as a connected graph, with every fact traced back to the source it came from. Because each fact carries its origin, access can follow the source: a person who cannot see a source cannot see anything the ontology grounded in it.
Object storage is encrypted at rest.
It runs in your own cloud or on-prem as a bring-your-own-cloud deployment, with self-hosted models or your own inference. For the directory side, see directory sync for an AI ontology; for the bigger picture, see building an enterprise knowledge graph with access control.
The HelixDB database underneath has tenant partitioning but no per-user permissions, so the access control in this post is Foundry's, not the database's.
Which to pick
Pick by where your permission line has to sit, and rank the options by how close they get to source-grounded access.
| Option | Self-host licence | Permission line | Roles | Finer-grained rules | Directory integration | Source-grounded access |
|---|---|---|---|---|---|---|
| Helix Foundry | Apache-2.0 | Source | RBAC | Source-level access | Enterprise directory sync | Yes, facts inherit from their sources |
| Zep | Managed or BYOC | Source policy | API key roles | Policies on metadata | Yes, from metadata your app attaches (Enterprise plan) | |
| Neo4j | Property | Enterprise | Property-based rules | LDAP (Enterprise) | No, modelled as properties | |
| Memgraph | BSL 1.1, Enterprise licence | Label, edge type | Enterprise | Label and edge-type permissions | No | |
| Cognee | Dataset | Users, tenants, roles | Per-dataset permissions | No, dataset is the boundary | ||
| FalkorDB | Graph | Per-graph read or write | No | |||
| Graphiti | None built in | No, you build it |
Choose Neo4j or Memgraph if you operate the graph directly and need label or property rules, and you will maintain the mapping from source permissions yourself. Choose FalkorDB or Cognee if per-graph or per-dataset isolation matches how your tenants are already split. Choose Zep if you want source policies and accept its Enterprise plan and app-side tagging. Choose Foundry if agents will read company data from many sources and you need a fact to stay hidden from anyone who cannot see where it came from, running in your own cloud.
Put the permission line at the source, then test it with a hidden document
A role on the database protects the database. It does not protect a fact that an agent derived from a document you restricted. Start by picking a source one user cannot open, then try to reach it through an agent as that user, and see which tools hold. To try source-grounded access yourself, clone github.com/HelixDB/helix-foundry, or set up a deployment in your own cloud.