Multi-Tenancy and RBAC for Open-Source Local Agent Platforms
This article examines why collaboration and governance break down when delivering custom AI agents to enterprise clients, and what an open-source, self-hosted agent platform needs to close that gap. It covers a six-layer capability checklist (visual orchestration, knowledge bases, prompt versioning, inference and model access, tool integration, and multi-workspace tenancy), then details a three-tier role model spanning read-only, read-write, and admin, with server-side, deny-by-default permission checks. It also addresses per-workspace quotas, audit logging, observability, a seven-step minimum validation checklist for on-premises deployment, and selection guidance for teams that cannot share cloud accounts.
1. The Problem: A Collaboration Gap in Agent Delivery
When delivering agent projects to enterprise clients, the most common obstacle is not model quality. It is that the collaboration and governance chain is never closed. A typical request combines live web retrieval, audio and video understanding, transcript generation, asset creation, and marketing copy output, and it often requires calling several models in parallel to compare output quality. Requirements like these demand far more from a platform than “getting one conversation to run.”
Early solutions usually fell into one of two forms: a self-hosted visual orchestration platform, or a cloud-hosted agent building service. Both can produce a demo, but real delivery exposes three structural problems:
- Prompts and configurations are invisible. When an agent is handed over by sharing it, the receiving party usually cannot see the underlying prompts or orchestration details. Any tone adjustment or wording revision has to be made in the original author’s account.
- Accounts and assets are coupled. Every configuration change requires a cycle of request an account, log in, edit, log out, with both the delivering and receiving sides sharing the account risk.
- Workspace granularity is insufficient. Once configuration items pile up, the final approver, such as a business owner, cannot see the finished agent in their own view, so delivery sign-off never closes.
The root cause is that the platform lacks multi-tenancy and role-based access control (RBAC). Vendors commonly reserve these capabilities for paid tiers, while open-source editions keep only single-user or coarse-grained permissions.
2. Capability Abstraction: Six Layers an Enterprise Agent Platform Needs
Setting aside specific products, an open-source agent platform that can support team collaboration typically needs to cover the following layers. This also serves as a checklist for evaluating any comparable solution.
2.1 Visual Orchestration and Module Coverage
The orchestration canvas should offer enough node types: LLM calls, conditional branches, loops, variable assignment, knowledge base retrieval, code execution, HTTP requests, and structured output parsing. Node count is not the only metric, but coverage directly determines whether glue code is needed. In practice, a platform without a code execution node and a structured output node will struggle with tasks that require comparing multiple model results, post-processing, and format validation.
2.2 Knowledge Bases and Retrieval
The platform needs document parsing, chunking strategy configuration, hybrid vector and keyword retrieval, and recall reranking. In enterprise settings, knowledge base ownership matters more: a knowledge base must be bound to a workspace rather than shared globally, otherwise cross-department data isolation is impossible.
2.3 Prompt Management and Versioning
Prompts are a core asset of an agent and must be version controlled. The sensible approach is to create a new version on every change, keep a diff record, and support rollback. A sample version record structure:
{"prompt_id": "copywriting_v7","workspace": "marketing","versions": [{"ver": 3, "content": "...", "author": "u_1024", "note": "tighten colloquial phrasing"},{"ver": 4, "content": "...", "author": "u_1024", "note": "add banned-word list"}],"active": 4}
With version records in place, a frequent request like “the tone is off, change one line” degrades from a cross-account collaboration flow into an ordinary configuration commit.
2.4 Inference Services and Model Access
The platform should support both self-hosted inference services and external model services, and allow a single agent to call multiple models in parallel for comparison. Engineering-wise, watch timeouts, retries, and concurrency limits so parallel calls do not saturate resources.
2.5 Tools and External Service Integration
Calls to external systems should be integrated through standardized tool service descriptions, with support for both local and remote endpoints. Tool invocation needs its own authorization and auditing; an agent should never hold long-lived, high-privilege credentials.
2.6 Multiple Workspaces and Multi-Tenancy
This is the focus of this article and is covered in the next section.
3. The Core: Multiple Workspaces and a Three-Tier Permission Model
The first principle of multi-tenant design is clear isolation boundaries: the workspace is the basic unit for resource ownership and permission decisions. Agents, knowledge bases, prompts, tool configurations, and invocation logs all hang under a specific workspace.
On top of that, build a “team → user → user group → role” hierarchy:
- Team: the tenant top level, which determines the resource pools and quotas that can be purchased or enabled.
- User: created by an administrator, or self-registered and then activated after administrator approval.
- User group: divided by function, such as product, operations, or engineering; a user can belong to several groups.
- Role: granted at the workspace level, commonly three tiers: read-only, read-write, and admin.
The semantic boundaries of the three tiers should be explicit and testable:
| Role | Agent | Knowledge base | Prompt | Members and permissions |
|---|---|---|---|---|
| Read-only | View, invoke | View, retrieve | View | None |
| Read-write | Edit, publish | Add, modify | Edit, release version | None |
| Admin | All | All | All | Add/remove members, assign roles |
An easily overlooked detail: permission checks must happen on the server, based solely on “the workspace the resource belongs to plus the user’s role in that workspace.” Hiding entries in the frontend only fails immediately once the API is called directly. Reference implementation logic:
def check(actor, action, resource):ws = resource.workspace_idrole = membership.get(actor.id, ws) # the user's role in this workspaceif role is None:return False # non-members are denied by defaultrequired = {"read": ["read", "write", "admin"],"write": ["write", "admin"],"admin": ["admin"]}[action]return role in required
Deny by default, combined with the principle of least privilege, makes problems like “the boss’s account cannot see the agent” disappear naturally: just add the approver to the relevant workspace with the read-only role.
4. Resource Quotas, Auditing, and Observability
Once multi-tenancy exists, you have to answer “who used how much.” At minimum, record three categories of metrics: invocation counts and token consumption per user and user group, the tool call chain for a single session, and audit logs of configuration changes. Quotas can sit at the workspace level so that long-running jobs from a single department do not crowd out global inference resources. Logs and metrics can be exported to general-purpose logging services and monitoring and alerting capabilities, closing the loop on “abnormal calls can be traced, abnormal consumption can trigger alerts.”
5. On-Premises Deployment and a Minimum Validation Checklist
The value of self-hosted deployment lies in keeping data within your own domain and remaining usable offline. Installing with a single command is the ideal experience, but in practice it is still worth validating in this order:
- Health checks for services and dependencies (application, database, vector store, object storage);
- Create a team and a first workspace, and confirm resource ownership is correct;
- Create two users, grant one read-only and the other read-write, and compare behavior against the table above item by item;
- Upload a document to create a knowledge base, and verify it is not visible across workspaces;
- Modify a prompt and publish a new version, then verify rollback works;
- Connect one local inference service and one remote model, and run a parallel comparison;
- Open the audit log and confirm all of the above actions were recorded.
6. Selection Guidance
If a team has no dedicated developers and cannot share cloud accounts, prioritize a self-hosted solution that is open source and natively supports multiple workspaces and role permissions, keeping prompts, knowledge bases, and logs inside your own domain. If the team already has platform engineering capability, it can also wrap its own permission layer on a container platform, but that means more work and tends to leave gaps in auditing and quotas. Either way, the criterion is the same: the deliverable is “transferable configuration assets,” not “an account nobody else can log into.”
