Enterprise Multi-Tenancy & Governance Architecture Comparison
| Security Dimension | Single-Tenant SQLite / Local Files | Basic Cloud Vector DBs | Memoreal Enterprise Substrate |
|---|---|---|---|
| Tenancy Isolation | None; local process access only | Developer-managed namespace filtering in queries | Server-enforced `org:<slug>` prefix; rejects client spoofing |
| RBAC Permissions | File system permissions only | Single API key shared across team | 4-tier role hierarchy with fine-grained tool authorization |
| Key Scoping | N/A | Coarse-grained cluster-level keys | Dedicated read-only agent tokens vs. administrative write keys |
The Hazard of Unpartitioned AI Agent Knowledge Stores
When organizations adopt autonomous coding agents or enterprise copilots without centralized governance, developers frequently share a common vector database or embedding index. In such unpartitioned environments, a customer support agent querying for refund policies might inadvertently retrieve unreleased product roadmap notes stored by an engineering agent, or an external contractor agent might view internal payroll guidelines. Preventing cross-tenant data leaks requires cryptographic tenant isolation at the database layer rather than soft prompt-level reminders.
- Shared vector spaces risk cross-departmental data leakage.
- Client-provided organization headers can be manipulated or bypassed by compromised agents.
- Soft prompt constraints like "only look at marketing notes" fail under adversarial pressure.
- Compliance auditors mandate physical or logical cryptographic separation between tenants.
Server-Enforced org: Tenancy & Anti-Spoofing Architecture
In the Memoreal security model, multi-tenancy is enforced directly by the API gateway and backend storage layer. Every authenticated API key is bound to a verified organization ID. When a client agent sends a request referencing namespace `payments-service`, the server transparently normalizes this to `org:<tenant_id>:payments-service`. Crucially, if an agent attempts to pass a reserved `org:` prefix in its payload, the server rejects the request with an explicit error. This prevents agents from spoofing foreign tenant IDs or bypassing isolation barriers.
- Automatic namespace scoping: keys can only access data within their assigned organization.
- Anti-spoofing filter: client requests containing `org:` prefix are rejected immediately.
- Dedicated project workspaces isolate staging, production, and departmental environments.
- Cross-wing collaboration via explicit `handoff_to_agent` boundaries.
4-Tier Role Hierarchy & Granular Key Scoping
Enterprise governance requires separating administrative privileges from automated agent execution. Memoreal implements a clear 4-tier RBAC hierarchy: `Owner` (full billing, organization deletion, and user management), `Admin` (team member invitation, global key rotation, and audit review), `Manager` (namespace management and batch imports), and `Member` (standard read/write agent operations). Automated agents deployed in production environments receive read-only keys, preventing compromised agents from altering historical records.
- `Owner`: Full organization ownership, billing, and membership authority.
- `Admin`: Security policy configuration, API key generation, and audit log inspection.
- `Manager`: Workspace creation, team namespace consolidation, and bulk imports.
- `Member`: Day-to-day memory encoding, retrieval, and code intelligence queries.
- Read-Only Tokens: Constrained tokens limited to `build_context` and `search_code`.
Configuring Multi-Tenant Scoped Keys & Namespace Access in MCP
json{
"mcpServers": {
"memoreal": {
"command": "npx",
"args": ["-y", "@kolivri/memoreal-mcp@latest", "run"],
"env": {
"MEMOREAL_API_KEY": "mem_sec_ro_88f921aa4c9102",
"MEMOREAL_NAMESPACE": "payments-billing-service"
}
}
}
}
Frequently Asked Questions
How does Memoreal prevent an agent from querying another organization memory?
Each API key is hard-bound to an organization tenant ID on the server. All memory lookups automatically query only records partitioned under that tenant. Attempting to access another organization returns an authorization denial.
Can we create read-only API keys for autonomous continuous integration bots?
Yes. Memoreal allows generating read-only keys that are permitted to invoke retrieval tools (`build_context`, `search_code`, `explain_code`) while blocking all mutation and deletion operations.
Where are access logs stored for SOC2 compliance auditing?
All API requests and tool invocations generate structured audit events stored in immutable, append-only logs accessible via `/v1/trace/recent` and the management portal.
Install Persistent Memory for Your Coding Agent
Sub-15ms deterministic recall, AST symbol navigation, and 70%+ token savings across Claude Code, Cursor, Codex CLI, and Windsurf.
npx -y @kolivri/memoreal-mcp setup