Beam (beta9)
github.com/beam-cloud/beta9- Category
- Developer Tools
- Rank
- No. 984Tools index
- Pricing
- Open Source
- Type
- TOOL
- Use case
- Models: Train & Run
- Interfaces
- Client SDK
- GitHub
- 1.8k stars
- Latest release
- worker-0.1.819
- Date
About
Beta9 is the open-source control plane behind Beam, a serverless runtime for GPU inference, sandboxes, and background jobs. It provides fast, sub-second container cold starts through a custom container runtime and embedded content-addressable storage, supports both gVisor and runc, exposes a Python SDK, and can be self-hosted on any Kubernetes cluster via a Helm chart as an alternative to Modal.
What it does
Beta9 runs your Python functions, web endpoints, job queues and throwaway code sandboxes on remote containers that start when called and shut down when idle. You tag a function with the hardware it needs, such as a GPU type, CPU and memory, and a command-line tool ships it. Underneath, a Go gateway accepts requests and schedules work, and workers launch the containers while sharing a cache of image content across machines, so a fresh container does not pull its whole image before starting. Beam sells the same engine as a hosted GPU service.
Why it's ranked here
Few open projects put this much of the serverless GPU stack in one repository: scheduler, container workers, a distributed image cache, a Python SDK, a CLI and an MCP server (Model Context Protocol, the standard AI assistants use to call tools). The code backs a paid product and shows it: graceful cache draining, disk eviction thresholds, workspace-scoped auth on every app route, and a benchmark harness for container startup time. The AGPL license and a README written around the hosted service keep it from being an easy self-host pick, which is what holds it back.
What's good
The SDK is quick to learn. One decorator turns a function into an autoscaling endpoint or a retrying task queue, and the same package exposes sandboxes for running model-generated code. The CLI notices when a script or agent is driving it instead of a person and skips the interactive sign-in prompt, failing with an error that says how to authenticate. The MCP server retries only tools the gateway marks read-only, so a dropped connection cannot fire a deploy twice. Startup speed has its own benchmark suite in the repository, so the headline claim can be checked.
Tradeoffs
The license is AGPL version 3: modify the engine and offer it to others over a network, and you must publish your changes. Check that against company policy. The README quickstart sends you to sign up for Beam's cloud, and self-hosting gets one sentence; the repository's setup target builds a local development cluster on k3d, with its Helm install line commented out. The sub-second cold start figure is a README claim. The Go build pulls in AWS, Oracle Cloud, Tailscale, gVisor and Kubernetes libraries, so building from source is heavy. The pip package is named beam-client while the SDK source lives in a package called beta9.
How to use it well
Best fit: a Python team shipping GPU inference, background jobs or sandboxes for agent-generated code, which either pays for Beam's hosted GPUs or has people ready to run Kubernetes. Start on the hosted service to judge the developer experience, then run the bundled startup benchmark against your own cluster before committing to self-hosting. Plug the MCP server into a coding agent if you want it to deploy and inspect services directly. It does not cover distributed model training: nothing in the SDK's public exports targets multi-node training jobs.
Technical notes+
Two Go binaries: cmd/gateway/main.go and cmd/worker/main.go are thin entry points that load a typed AppConfig and VictoriaMetrics metrics; the worker runs only the cache server when CACHE_SERVER_ONLY is set, and derives GOMAXPROCS from the worker CPU env because, per its comment, Go does not read cgroup CPU quotas (go.mod declares go 1.25.7). pkg/cache/server.go wraps a content-addressed Store with a Redis metadata store by default, a disk monitor that evicts down to a watermark while honouring a protected set, 4MB stream chunks, gRPC defaults of a 4MB stream window, 32MB connection window and 1024 concurrent streams, keepalive pings permitted without streams, and a draining flag that rejects reads and writes during rollout. pkg/api/v1/app.go registers echo routes behind auth.WithWorkspaceAuth (delete uses the strict variant), lets cluster-admin tokens cross workspaces, classifies apps running, idle or stopped from Redis container counts and Postgres deployment counts fetched in parallel with errgroup, and caps the activity endpoint at 100 app ids over 24 hourly buckets. sdk/src/beta9/__init__.py defers importing each public export until first access through a module-level getattr hook. sdk/src/beta9/cli/main.py is click-based and skips the first-auth prompt under CI or a non-TTY stdin. sdk/src/beta9/mcp/server.py is a stdio proxy posting each JSON-RPC message to the gateway's /api/v1/mcp (protocol 2025-03-26), with a 120s timeout, 660s for create_database, three retries only for tools annotated readOnlyHint, and an eight-thread pool for tool calls. The Makefile setup target uses k3d plus kustomize with the helm install commented out, builds runner images for Python 3.8 to 3.12 plus micromamba, runs go test over pkg for test-pkg, and exposes startup, sandbox and cache benchmark targets plus a k6 load test; it also hardcodes an internal staging EKS cluster ARN. benchmarks/startup.py times container startup through the gateway HTTP API on k3d or k3s, building a CLIP image over grpcurl. go.mod pulls gvisor, beam-cloud go-runc and clip, hanwen go-fuse, geesefs, client-go, tailscale, the AWS and OCI SDKs and goose migrations. docs/datamodels/backend.md diagrams workspace, token, volume, deployment, task, stub and object tables. LICENSE is the GNU AGPL v3 text.
Observed
- License
- GNU Affero General Public License v3 (LICENSE)
- Languages
- Go gateway, worker and cache; Python SDK and CLI
- Install surface
- pip install beam-client for the client; self-host via Makefile targets on k3d and kustomize
- Interfaces
- Python SDK, click-based CLI, stdio MCP server, HTTP and gRPC gateway
- Container runtimes
- gVisor and a runc fork both declared in go.mod
- Worker platforms
- Linux amd64 and arm64 images (Makefile)
- Python runtimes
- Runner images for Python 3.8 through 3.12, plus micromamba variants (Makefile)
- Tests and benchmarks
- Go package tests via make test-pkg, SDK tests via make sdk-tests, startup benchmark in benchmarks/startup.py
- Hosting model
- Same engine sold as the managed Beam cloud; README quickstart requires a Beam account
Read from README.md, go.mod, Makefile, LICENSE, cmd/gateway/main.go, cmd/worker/main.go, pkg/api/v1/app.go, pkg/cache/server.go, sdk/src/beta9/__init__.py, sdk/src/beta9/cli/main.py, sdk/src/beta9/mcp/server.py, docs/datamodels/backend.md, benchmarks/startup.py.
Tags
Tech Stack
Comments (0)
No comments yet
Editorially curated, with community endorsements as a secondary signal. Corrections welcome.