1
Curious builder0 XP earned · 300 to level 2
0 daysFinish a lesson to begin
Badge collection0 of 6 unlocked
51 small wins to finish your pathNext question →
Design a multi-tenant platform where customers can deploy their own agents (code execution, tools, memory).
30-second answerSay your answer out loud first, then reveal.

Key areas
- Compute isolation: untrusted, model-generated code must never run on shared hosts unsandboxed. Use microVMs or gVisor per session; CPU/memory/time limits; ephemeral filesystems; destroy after the run.
- Network: deny by default; egress through a proxy with per-tenant allow-lists. This blocks data exfiltration and abuse such as crypto-mining or attacks from your IPs.
- Data isolation: tenant ID enforced at the storage layer (separate indexes or row-level security), not just in app code. Test for cross-tenant leakage.
- Secrets: a vault, injected at the tool gateway; never in prompts, logs or sandbox env vars unless required.
- Fairness and quotas: per-tenant concurrency limits, token budgets, rate limits at the model gateway, priority queues.
- Reliability: durable execution for long runs; retries; regional failover.
- Observability and billing: per-tenant traces, cost metering (tokens, compute seconds, tool calls), anomaly alerts.
- Governance: audit logs, data retention controls, abuse detection, an emergency kill switch per tenant or agent.
Trade-offs to discuss: microVM cold-start latency vs isolation strength (warm pools help); shared vs dedicated vector indexes (cost vs isolation); letting tenants bring their own model keys.
Related
Slow is fine. Stopping is the only problem.