Examples
Multi-Tenant Memory
Strictly isolate data and manage quotas for different organizations or users.
Ops Module
Scenario: Hosting memory for "Springfield High School"
When to Use
If you are building a SaaS where multiple customers (tenants) use your platform, you must ensure Tenant A never sees Tenant B's memories. Perfect for:
- B2B Applications
- Managing tiered usage limits (Free vs Pro tiers)
- Strict data isolation compliance
Key Operations
create()Provision a new tenant
get_usage()Check tenant resource consumption
Code Example
Provision a new tenant with specific storage and request quotas.
Key Takeaways
- Logical Isolation: The SDK handles tagging data with
tenant_idautomatically when provided. - Quota Management: Enforce limits to prevent one noisy tenant from affecting others.
- Supports "Batch Ingest" for tenants to efficiently load their initial data.