Multi-Tenant Setup
Akili is a multi-tenant platform where a single deployment serves all tenants. This guide covers creating tenants, configuring resource quotas, and working with tenant-scoped operations.
Creating a Tenant
Section titled “Creating a Tenant”Tenant creation is an admin-only operation that provisions all required infrastructure for a new tenant.
akili tenant create acme-corp --display-name "Acme Corporation"What Gets Provisioned
Section titled “What Gets Provisioned”When you create a tenant, the platform automatically provisions:
| Resource | What Is Created |
|---|---|
| PostgreSQL | Tenant row with RLS policies applied |
| Ceph RGW / S3 | Bucket prefix tenant-{id}/ |
| Redpanda | Base topic namespace {slug}.* |
| StarRocks | External Iceberg catalog tenant_{slug}_catalog |
| Resource groups | StarRocks resource group with default quotas |
The provisioning process takes a few seconds. During this time the tenant is in PROVISIONING state and cannot be used.
# Check provisioning statusakili tenant get acme-corp
# Output:# ID: 550e8400-e29b-41d4-a716-446655440000# Slug: acme-corp# Display Name: Acme Corporation# Status: ACTIVE# Created: 2026-03-16T10:00:00ZTenant Slug Rules
Section titled “Tenant Slug Rules”The slug is the human-readable identifier used in topic names, catalog names, and storage paths. It is immutable after creation.
- Must be lowercase alphanumeric with hyphens
- Must start with a letter
- Length: 3 to 63 characters
- Cannot be changed after creation (used in Redpanda topics and StarRocks catalogs)
Listing Tenants
Section titled “Listing Tenants”# List all tenants (admin only)akili tenant list
# As JSONakili tenant list --jsonTenant Lifecycle
Section titled “Tenant Lifecycle”Tenants progress through a defined state machine:
| State | Behavior | Transition Via |
|---|---|---|
PROVISIONING | Resources being created | Automatic after create |
ACTIVE | Fully operational | Automatic after provisioning |
SUSPENDED | Read-only, no new deployments or executions | akili tenant suspend |
ARCHIVED | No access, data retained per policy | akili tenant archive |
Suspending a Tenant
Section titled “Suspending a Tenant”Suspension makes the tenant read-only. Existing data remains accessible, but no new products can be created or deployed, and no pipelines execute.
# Suspend (requires --confirm)akili tenant suspend acme-corp --confirmUse cases for suspension:
- Billing issues requiring account hold
- Security investigation requiring freeze
- Planned maintenance on tenant-specific resources
Reactivating a Tenant
Section titled “Reactivating a Tenant”Restore a suspended tenant to full operation:
akili tenant reactivate acme-corpAll previously deployed products resume their schedules after reactivation.
Archiving a Tenant
Section titled “Archiving a Tenant”Archiving permanently disables a tenant. Data is retained according to the platform retention policy, then purged.
# Archive (requires --confirm, irreversible)akili tenant archive acme-corp --confirmResource Quotas
Section titled “Resource Quotas”Resource quotas prevent any single tenant from consuming disproportionate platform resources.
Default Quotas
Section titled “Default Quotas”| Quota | Default | Description |
|---|---|---|
max_products | 100 | Maximum data products |
max_connections | 20 | Maximum external connections |
max_storage_gb | 500 | Maximum S3 storage |
max_compute_cpu | 8 | Maximum concurrent compute CPU cores |
max_compute_memory_gb | 32 | Maximum concurrent compute memory |
Checking Quotas
Section titled “Checking Quotas”# View tenant details including quota usageakili tenant get acme-corp --jsonQuota Enforcement
Section titled “Quota Enforcement”Quotas are enforced at the service layer. When a tenant exceeds a quota, the API returns a 429 QuotaExceeded error:
{ "type": "QuotaExceeded", "title": "Product limit reached", "status": 429, "detail": "Tenant 'acme-corp' has 100/100 products. Delete existing products or request a quota increase."}Working with Tenant-Scoped Operations
Section titled “Working with Tenant-Scoped Operations”All CLI commands operate within the context of the authenticated user’s tenant. The tenant is determined by the tenant_id claim in the JWT token.
Switching Tenants
Section titled “Switching Tenants”If your user has access to multiple tenants, use different CLI profiles:
# Configure profiles for different tenantsakili config init --api-url https://api.akili.io --profile acmeakili config init --api-url https://api.akili.io --profile globex
# Authenticate each profileakili auth login <acme-token> --profile acmeakili auth login <globex-token> --profile globex
# Use a specific profileakili product list --profile acmeakili product list --profile globexTenant Isolation Verification
Section titled “Tenant Isolation Verification”You can verify tenant isolation by checking that operations are correctly scoped:
# Check authenticated identity and tenantakili status
# Output:# Akili Platform Status# OK API Health: alive# OK API Ready: ready# OK Auth: authenticated (dev@acme-corp.com)The tenant_id from your JWT is applied to every API request. There is no way to query or modify another tenant’s data through the CLI.
Onboarding a New Tenant
Section titled “Onboarding a New Tenant”A complete tenant onboarding workflow:
# 1. Create the tenant (admin)akili tenant create new-customer --display-name "New Customer Inc."
# 2. Verify provisioning completedakili tenant get new-customer
# 3. Create initial connectionsakili connection create \ --name customer-db \ --connector-type postgres \ --config '{"host": "db.customer.com", "port": 5432, "database": "main"}'
# 4. Test connectivityakili connection test customer-db
# 5. Initialize first data productmkdir customer-orders && cd customer-ordersakili init --name customer-orders
# 6. Edit manifests, validate, and deployakili validate .akili/akili product create --name customer-orders --namespace salesakili product deploy customer-ordersRelated
Section titled “Related”- Multi-Tenancy — isolation architecture and design
- Security Architecture — authentication and authorization
akili tenant— full CLI reference