Skip to content

Multi-Tenancy for Agents

Every agent is owned by a workspace and can only access that workspace’s data.

  1. Agent creation — workspace_id is extracted from the JWT at creation time and stored immutably
  2. Tool calls — All tool calls include workspace_id in the request context. OpenSearch queries are automatically scoped to tenant-suffixed indexes
  3. Execution logs — Execution records are stored with workspace_id and filtered in all API responses
  4. Agent Runner — Fetches agents per-workspace; each execution runs in a workspace-scoped context
// Tool calls always include workspace context
async function callSemanticSearch(query: string, context: AgentContext) {
const index = `${DEFAULT_INDEX}-${context.workspaceId}`;
return semanticSearchClient.search({ query, index });
}
RoleCreate AgentsView All AgentsEdit OthersDelete
Admin✅✅✅✅
Analyst✅Own onlyOwn onlyOwn only
Viewer❌Own workspace❌❌
RoleAvailable Tools
ViewerNone (cannot create agents)
Analystsemantic_search, opensearch_query, get_scan_results, analyze_logs
AdminAll tools including future write/external categories

Rate limits are enforced per workspace at the Backend API layer:

TierAgentsExecutions/dayTools/execution
Free2505
Pro2050020
EnterpriseUnlimitedUnlimitedUnlimited

When a rate limit is hit:

  • Execution is queued (not dropped) if within 2x the daily limit
  • Agent transitions to paused state with rate_limited reason
  • Discord notification sent to workspace admin
  • Agent auto-resumes at midnight UTC

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).

DataRetention
Agent execution logs90 days
Agent configsPermanent (until deleted)
Alert history30 days

Retention policies are enforced by a nightly cleanup job on the Backend.

All agent CRUD operations are logged to the Logrite audit trail:

{
"timestamp": "2026-03-02T08:15:00Z",
"action": "agent.create",
"actor": "user:[email protected]",
"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.