Skip to main content
Alchemy is a runtime for fast, isolated, strongly typed compute functions. It is built by Galaxy, written in Go, licensed under Apache 2.0 and developed in the open on GitHub. A function is an OCI image plus a contract. Alchemy builds the image into a root filesystem once, boots it once and snapshots the microVM, then starts new microVMs from that snapshot and keeps them warm between calls. You can bring your own image, or write a handler in Python, TypeScript, Go or Rust and let Alchemy build it on one of its runtime images.

Why Alchemy

  • Isolation per call. Every invocation runs in its own Firecracker microVM, under Firecracker’s jailer, in its own cgroup and as its own unprivileged user. See Isolation for what a warm microVM keeps between calls.
  • Typed contracts. Each version carries a contract, a JSON Schema or an Arrow schema for its input and output. Alchemy checks the input before any compute is acquired and the output before it reaches the caller.
  • Full lifecycle records. Every invocation is recorded with its status, attempts, timings and error, and everything the function writes to stderr is kept as its log.

How it fits together

The server accepts functions and invocations over a ConnectRPC API and a plain HTTP invoke endpoint, and queues every invocation in a NATS JetStream stream. Hosts own the KVM machines and take invocations from the queue whenever they have a free slot, so a busy fleet makes calls wait rather than fail. A host builds a function’s root filesystem the first time it takes one of its invocations, and a supervisor inside each guest runs the function. PostgreSQL stores functions, versions and finished invocations, and NATS carries everything between servers and hosts, so any number of servers run side by side and nothing is written to the database while a call runs. The web UI ships inside the server binary and as the npm module @galaxy-io/alchemy-ui for apps that mount it. Read Architecture to follow an invocation through these pieces.

Where to go next

Quickstart

Run Alchemy locally, create a Python function and invoke it.

Write a Python function

Write a handler, give it a contract and call it over HTTP.

Concepts

Functions, versions, contracts, invocations and how isolation works.

Deployment

Run the server and hosts on Kubernetes with KVM nodes.

Installation

The Helm chart and the published container images.

API reference

Every RPC on the API and the HTTP invoke endpoint.

Join the Slack community

Ask questions, report what breaks, and hear about releases before they land.
Alchemy is pre-1.0. The API, the protos and the chart values may still change between releases.