Users You Don't Manage
Multi-tenant from day one. Every user gets isolated access, scoped permissions, automatic. No user management code required.
On this page
Single-player AI is easy. Your AI, your credentials, your data. But the moment you want to serve multiple users, everything changes.
SystemPrompt is multi-tenant from the ground up. Every user gets isolated access with scoped permissions. You don't write user management code. You ship AI products.
The Problem
Building multi-user AI products requires:
- User isolation: User A can't see User B's data
- Permission scoping: Different users have different capabilities
- Resource boundaries: Quotas, rate limits, usage tracking per user
- Data segregation: Database queries must filter by user/tenant
Most teams bolt multi-tenancy onto single-tenant architectures. The result: data leaks, permission bugs, and months of security fixes.
The Solution
SystemPrompt provides tenant-aware infrastructure:
Automatic User Isolation
Every request includes tenant context:
# services/agents/assistant.yaml
security:
oauth2:
scopes: ["user:{{user_id}}"]
isolation: per_tenant
Database queries automatically filter by tenant. API responses only include tenant-scoped data. Cross-tenant access is architecturally impossible.
Scoped Permissions
Define what each user can do through OAuth2 security schemes:
# services/agents/welcome.yaml
card:
securitySchemes:
oauth2:
type: oauth2
flows:
authorizationCode:
authorizationUrl: "http://localhost:8080/api/v1/core/oauth/authorize"
tokenUrl: "http://localhost:8080/api/v1/core/oauth/token"
scopes:
anonymous: "Public access"
user: "Authenticated user access"
description: "OAuth 2.0 authentication"
security:
- oauth2: ["anonymous"]
Users receive tokens with specific scopes. Agents and tools enforce those scopes. No manual permission checks in your code.
User Management via CLI
Manage users without building admin panels:
# List users
systemprompt admin users list
# Create user with specific scopes
systemprompt admin users create --email user@example.com --scopes read,write
# Update permissions
systemprompt admin users edit user@example.com --add-scope admin
# View user details
systemprompt admin users show user@example.com
Tenant-Aware Agents
Agents operate within tenant boundaries:
# services/agents/assistant.yaml
name: assistant
tenant_aware: true
security:
oauth2:
scopes: ["tenant:{{tenant_id}}"]
When a user talks to the assistant, it can only access that user's data. The same agent code serves all tenants with automatic isolation.
Why This Matters
Ship to Customers, Not Just Yourself
Single-player AI tools are demos. Multi-tenant AI tools are products.
- SaaS AI products: Every customer gets their own isolated AI assistant
- Team tools: Engineering, sales, support each get scoped access
- Enterprise deployments: Departments can't see each other's data
Security by Architecture
You can't accidentally leak data between tenants:
- Database queries include tenant filters at the ORM level
- API endpoints validate tenant ownership before returning data
- File storage is tenant-scoped
- Audit logs are tenant-segregated
Compliance Ready
Multi-tenant isolation helps with:
- GDPR data separation requirements
- SOC 2 access control controls
- HIPAA data segregation
- Enterprise security questionnaires
What You Skip
| Without SystemPrompt | With SystemPrompt |
|---|---|
| User table design | Built in |
| Permission system | Built in |
| Tenant filtering logic | Automatic |
| Data isolation bugs | Architecturally prevented |
| Admin panel for users | CLI commands |
| Cross-tenant security audits | Not needed |
Getting Started
Multi-tenancy is enabled by default. To customize:
# View tenant configuration
systemprompt admin config show tenancy
# Create a new tenant
systemprompt cloud tenant create --name "customer-a"
# Assign user to tenant
systemprompt admin users edit user@example.com --tenant customer-a
See the Multi-Tenancy Reference for detailed configuration options.