Documentation Index
Fetch the complete documentation index at: https://astron-bb4261fd.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Multi-Tenancy
Z3rno is designed for multi-tenant deployments from day one. Every memory is scoped to an organisation, and data isolation is enforced at the database level — not in application code.Three-Tier Isolation
Z3rno uses a three-tier hierarchy to scope all data:| Level | Scope | Example |
|---|---|---|
| Organisation | Top-level tenant. All data is partitioned by org_id. | Acme Corp |
| User | An end-user within an organisation. | alice@acme.com |
| Agent | An AI agent serving a user. One user can have multiple agents. | ”Support Agent”, “Research Agent” |
org_id, user_id, and agent_id columns. All three are required when storing or recalling memories.
PostgreSQL Row-Level Security
Data isolation is enforced using PostgreSQL Row-Level Security (RLS). RLS policies are applied at the database level, meaning no application code bug can cause cross-tenant data leakage. How it works:- Each API request authenticates with an API key
- The API key is mapped to an
org_idin theapi_keystable - Before executing any query, the database session variable
app.current_org_idis set - RLS policies on every table filter rows to
WHERE org_id = current_setting('app.current_org_id')
RLS is enforced even for raw SQL queries. If a developer connects directly to the database, they must set
app.current_org_id or they will see zero rows. The superuser role bypasses RLS for administrative tasks only.API Key to Organisation Mapping
Every API key is bound to exactly one organisation. When you create an API key, it is permanently associated with anorg_id.
| Permission | Allows |
|---|---|
read | Recall memories |
write | Store and update memories |
delete | Soft and hard delete memories |
admin | Manage agents, users, and API keys within the org |
Zero Data Leakage Guarantee
Z3rno’s multi-tenancy model provides a zero data leakage guarantee through multiple layers:Database-Level Isolation
RLS policies are enforced by PostgreSQL itself. Application code cannot bypass them, even with SQL injection.
API Key Binding
Every request is authenticated and bound to an org_id before any query executes. No anonymous access.
Vector Index Isolation
pgvector similarity searches are always filtered by org_id. An embedding from Org A will never match a query from Org B.
Graph Isolation
Apache AGE graph traversals are scoped to the org’s subgraph. Cross-org edges are structurally impossible.
What this means in practice
- Store: A memory stored by Org A is invisible to Org B, even if they share the same PostgreSQL instance.
- Recall: A vector similarity search by Org A will never return memories belonging to Org B, even if the embeddings are semantically identical.
- Forget: A hard delete by Org A only cascades through Org A’s data. Org B’s data is untouched.
- Audit: Audit logs are scoped to the organisation. Org A cannot see Org B’s audit trail.