Multi-Tenancy for Agents
Workspace Isolation
Section titled “Workspace Isolation”Every agent is owned by a workspace and can only access that workspace’s data.
How isolation is enforced:
Section titled “How isolation is enforced:”- Agent creation —
workspace_idis extracted from the JWT at creation time and stored immutably - Tool calls — All tool calls include
workspace_idin the request context. OpenSearch queries are automatically scoped to tenant-suffixed indexes - Execution logs — Execution records are stored with
workspace_idand filtered in all API responses - Agent Runner — Fetches agents per-workspace; each execution runs in a workspace-scoped context
// Tool calls always include workspace contextasync function callSemanticSearch(query: string, context: AgentContext) { const index = `${DEFAULT_INDEX}-${context.workspaceId}`; return semanticSearchClient.search({ query, index });}RBAC for Agents
Section titled “RBAC for Agents”| Role | Create Agents | View All Agents | Edit Others | Delete |
|---|---|---|---|---|
| Admin | ✅ | ✅ | ✅ | ✅ |
| Analyst | ✅ | Own only | Own only | Own only |
| Viewer | ❌ | Own workspace | ❌ | ❌ |
Role-based tool access
Section titled “Role-based tool access”| Role | Available Tools |
|---|---|
| Viewer | None (cannot create agents) |
| Analyst | semantic_search, opensearch_query, get_scan_results, analyze_logs |
| Admin | All tools including future write/external categories |
Rate Limiting
Section titled “Rate Limiting”Rate limits are enforced per workspace at the Backend API layer:
| Tier | Agents | Executions/day | Tools/execution |
|---|---|---|---|
| Free | 2 | 50 | 5 |
| Pro | 20 | 500 | 20 |
| Enterprise | Unlimited | Unlimited | Unlimited |
When a rate limit is hit:
- Execution is queued (not dropped) if within 2x the daily limit
- Agent transitions to
pausedstate withrate_limitedreason - Discord notification sent to workspace admin
- Agent auto-resumes at midnight UTC
Cross-Workspace Visibility
Section titled “Cross-Workspace Visibility”System agents (type 1) are defined at the platform level but execute in per-workspace contexts. When a System Agent runs for workspace abc, it only sees abc’s data.
Admins can view execution logs across all workspaces via an internal admin endpoint (not exposed in the public API).
Data Retention
Section titled “Data Retention”| Data | Retention |
|---|---|
| Agent execution logs | 90 days |
| Agent configs | Permanent (until deleted) |
| Alert history | 30 days |
Retention policies are enforced by a nightly cleanup job on the Backend.
Audit Trail
Section titled “Audit Trail”All agent CRUD operations are logged to the Logrite audit trail:
{ "timestamp": "2026-03-02T08:15:00Z", "action": "agent.create", "workspace": "acme-corp", "details": { "agentId": 42, "agentName": "Payment Error Monitor", "toolsAllowed": ["semantic_search", "opensearch_query"] }}See Audit Logs for how to query the audit trail.