Multi-Tenant Permission Governance for a Self-Hosted Agent Platform

    This article examines the permission and multi-tenancy challenges that appear once AI agents move into enterprise collaboration, and outlines the capability baseline a self-hosted agent platform needs: visual orchestration, knowledge base management, prompt and version control, inference access, tool and protocol extensions, and observability with evaluation. It then details a layered model of team (tenant), workspace, user and user group, and resources, three permission tiers (read-only, read-write, admin), and the engineering work required for data-plane isolation, quota isolation, and audit trails. Finally, it reframes delivery from account handoffs to workspace handover and lists selection criteria for teams evaluating a local deployment.

    1. Background: Three Sources of Friction When Agents Enter Enterprise Collaboration

    In real agent delivery projects, the stated goal is usually simple, but the constraints quickly make the solution complex: the application must search the live web, understand video content and produce transcripts, generate image assets and publishing copy, and call multiple models in parallel so their output quality can be compared side by side. Fitting these capabilities into one application is only the first step. The real difficulty is the ongoing maintenance after handover.

    The first source of friction comes from accounts and delivery format. With a hosted online approach, the requester is usually unwilling to hand over the main account because of knowledge base and workspace security concerns. An agent delivered through a share link, on the other hand, often hides internal configuration such as prompts from the recipient. As a result, even a minor adjustment, for example copy whose tone misses expectations, requires a full loop of contacting the owner, requesting an account, logging in, making the change, and logging out. Collaboration cost is amplified to an unreasonable degree.

    The second source of friction is a mismatch between organizational structure and resource visibility. The requester’s internal workspaces are often divided into fine-grained units, and after delivery even decision-maker accounts cannot see the application, which makes acceptance and internal rollout impossible.

    The third source of friction is missing permission granularity. When the platform offers only a binary “can use / cannot use” switch, roles such as product, operations, and data cannot share results within the same workspace without interfering with one another, and order can only be maintained through offline agreements.

    2. Capability Baseline: What a Usable Enterprise Agent Platform Needs

    Once these problems are abstracted, the capability requirements that enterprise scenarios place on a self-hosted agent platform concentrate on six areas:

    • Visual orchestration: composing modules such as large model calls, knowledge retrieval, conditional branching, code execution, and HTTP requests in a node-based way, where the number and type of nodes determine how complex a workflow can be expressed.
    • Knowledge base management: document parsing, chunking, vectorization, and retrieval testing, with isolation by workspace.
    • Prompt and version management: prompts maintained centrally and traceable, rather than scattered across workflow nodes.
    • Inference service access: connecting both to cloud model APIs and to locally deployed open-source models through a unified invocation layer.
    • Tool and protocol extensions: supporting local tools and remote services through a standardized tool integration protocol to extend connectivity to external systems.
    • Observability and evaluation: call logs, token consumption, latency, model output comparison, and evaluation set regression as the prerequisite for continuous tuning.

    On top of these, what really separates a toy from a deliverable system is multi-workspace and multi-tenant management.

    3. Core Design: Implementing Multi-Tenancy and Tiered Permissions

    Multi-tenancy is essentially dual isolation of resource ownership and permission checks. The recommended hierarchy is: team (tenant) → workspace → users and user groups → resources (applications, knowledge bases, tools, model configurations).

    Users can come through two channels: created directly by an administrator in the backend, or self-registered and then approved into a group by an administrator. User groups are divided by function, for example a product group, an operations group, and a data group. Permissions are granted at the group level, and users only inherit the permissions of their group, which avoids the drift caused by configuring each person individually.

    Three permission tiers are recommended:

    • Read-only: can view and run applications and knowledge bases in the workspace but cannot change configuration; suited to business stakeholders and acceptance reviewers.
    • Read-write: can edit workflows, upload documents, and adjust prompts; suited to delivery and operations executors.
    • Admin: holds the highest permission in the workspace, can manage members, quotas, and release policies; suited to the project owner.

    The permission check logic can be abstracted as:

    1. def can_access(user, workspace, resource, action):
    2. # 1. Tenant boundary check: reject all cross-tenant access
    3. if user.tenant_id != workspace.tenant_id:
    4. return False
    5. # 2. Resource-level ACL takes precedence over group permissions
    6. acl = get_resource_acl(resource.id, user.id)
    7. if acl is not None:
    8. return action in acl
    9. # 3. Fall back to the user group role
    10. role = get_group_role(user.id, workspace.id)
    11. mapping = {"readonly": {"read", "run"},
    12. "readwrite": {"read", "run", "write"},
    13. "admin": {"read", "run", "write", "grant"}}
    14. return action in mapping.get(role, set())

    Three engineering items also need to be in place. First, data-plane isolation: knowledge base documents, conversation records, and logs are tagged by workspace and forcibly filtered at retrieval time, which prevents “permission check passed but retrieval crossed knowledge bases.” Second, quota isolation: concurrency, tokens, and storage are limited per workspace so a single team cannot consume all inference resources. Third, audit trails: record who changed which prompt or permission and when, so changes can be traced.

    4. Reworking the Delivery Process: From Account Round Trips to Workspace Handover

    With these capabilities in place, delivery should shift from “borrow an account to operate” to “create a workspace and hand it over”:

    1. Create a separate workspace for the requester on the local platform, and set up user groups by department with the corresponding roles.
    2. Complete application orchestration, knowledge base import, and prompt configuration inside the workspace, without ever touching the requester’s main account.
    3. Set decision-maker accounts to read-only or admin so they can see and accept the application at any time.
    4. After delivery, the requester’s internal read-write roles fine-tune copy and workflows themselves, and the delivery team steps in only when needed, using the audit log as the basis.

    This process reduces maintenance cost from “one cross-organization conversation per change” to “self-service changes within granted permissions,” and because the knowledge base and configuration stay in the customer’s local environment, the data boundary is clearer.

    5. Selection and Implementation Recommendations

    If an enterprise already has baseline capabilities such as a container platform, object storage, and log monitoring, the marginal cost of a self-hosted deployment is low. Three points are worth evaluating first: whether the permission model natively supports multi-tenancy rather than depending on an additional tier; whether the orchestration nodes and tool protocols cover existing system integration needs; and whether an evaluation and fine-tuning loop is built in to support long-term iteration. In related enterprise practice, Baidu AI Cloud typically recommends starting with a small-scale pilot to validate the permission and isolation design against real business workflows, then gradually expanding the number of workspaces and the model footprint.