How tensorlakeai/tensorlake works
Tensorlake is a cloud platform and multi-language SDK for stateful microVM sandboxes, durable cloud filesystems, and serverless function orchestration for agentic applications. The principal sandbox workflow is to create or claim a sandbox, wait until it is ready, use it to run commands and manipulate files, then snapshot or terminate it. Separate SDK capabilities cover deploying and executing applications, Document AI, and artifact storage. The graph combines README-documented product flows with source-index relationships; several unsampled subsystems are included by their tree paths, with uncertain wiring omitted.
Main entry points: main.rs CLI commands · sandbox/client.py Python sandbox client · sandbox.py Sandbox operations · filesystem/client.py Cloud filesystem
Components 23
CLI
- CLI commands
crates/cli/src/main.rs - Sandbox commands
crates/cli/src/commands/sbx - Auth context
crates/cli/src/auth/context.rs
Sandbox SDK
- Python sandbox client
src/tensorlake/sandbox/client.py - Sandbox operations
src/tensorlake/sandbox/sandbox.py - TypeScript client
typescript/src/client.ts - Native worker bridge
typescript/src/native-worker-client.ts - Native sandbox binding
typescript/src/native-sandbox.ts
Application Runtime
- Function interface
src/tensorlake/applications/interface/function.py - Application manifests
src/tensorlake/applications/remote/manifests/application.py - Remote application runner
src/tensorlake/applications/remote/runner.py - Executor server
src/tensorlake/function_executor/server.py - Allocation blob manager
src/tensorlake/function_executor/allocation_runner/blob_manager.py - TypeScript executor
typescript/src/function-executor/service.ts
Cloud APIs
- Rust cloud SDK
crates/cloud-sdk/src/client.rs - Sandbox API
crates/cloud-sdk/src/sandboxes/mod.rs - Sandbox images
crates/cloud-sdk/src/sandbox_images.rs - Cloud filesystem
src/tensorlake/filesystem/client.py
Additional SDKs
- Document AI
src/tensorlake/documentai/client.py - Artifact ingest
crates/cloud-sdk/src/artifact_storage/ingest.rs
Other components
- Developer
- Tensorlake cloud
- Object storage
Connections 29
- Developer → CLI commands: runs commands
- CLI commands → Auth context: resolves auth
crates/cli/src/main.rs - CLI commands → Sandbox commands: dispatches
crates/cli/src/main.rs - Sandbox commands → Rust cloud SDK: manages sandboxes
- Developer → Python sandbox client: creates sandbox
- Python sandbox client → Sandbox operations: connects
src/tensorlake/sandbox/client.py - Python sandbox client → Tensorlake cloud: requests sandbox
- Sandbox operations → Tensorlake cloud: runs and transfers files
- Sandbox operations → Tensorlake cloud: snapshots state
- Developer → TypeScript client: uses SDK
- TypeScript client → Native worker bridge: dispatches calls
typescript/src/client.ts - Native worker bridge → Native sandbox binding: forwards calls
typescript/src/native-worker-client.ts - Native sandbox binding → Tensorlake cloud: manages sandboxes
- Rust cloud SDK → Sandbox API: exposes operations
crates/cloud-sdk/src/client.rs - Sandbox API → Tensorlake cloud: sends API requests
- Sandbox images → Tensorlake cloud: manages images
- Developer → Cloud filesystem: writes file trees
- Cloud filesystem → Tensorlake cloud: publishes metadata
- Cloud filesystem → Object storage: transfers file data
- Developer → Function interface: defines functions
- Function interface → Application manifests: describes application
src/tensorlake/applications/remote/manifests/application.py - Application manifests → Remote application runner: configures execution
- Remote application runner → Tensorlake cloud: runs remotely
- Executor server → TypeScript executor: serves executor protocol
- TypeScript executor → Function interface: loads functions
typescript/src/function-executor/service.ts - Allocation blob manager → Object storage: handles output blobs
- Developer → Document AI: uses document APIs
- Developer → Artifact ingest: pushes artifacts
crates/cloud-sdk/src/artifact_storage/ingest.rs - Artifact ingest → Tensorlake cloud: uploads chunks
crates/cloud-sdk/src/artifact_storage/ingest.rs