A backend language where the worst case is known before it ships.
Write your routes, data, and rules in TypeScript. Aleph counts what every route can read, write, and compute, rejects what’s unbounded, and runs the rest on shared infrastructure.
Built for agents. Run on Rust.
Why Aleph
Less flexibility, on purpose.
General-purpose languages let an app do anything. So every app needs its own isolated runtime, like a Lambda function, a Docker container, or a VPS, plus its own review and its own guardrails, and someone has to set up and maintain all of it.
Aleph makes the opposite trade. It gives up some flexibility for shared building blocks for what every backend needs, predictable behavior, and code that’s trusted by default. When agents write the code, that trade matters more than ever: a narrow language is easy to check and hard to get wrong. How Aleph programs work
Usage limits
Aleph knows what your code can use before it runs
Aleph code is declarative. A route isn’t a program that can do anything. It’s a fixed plan of queries, loops, and writes, each with a known maximum size. So Aleph can count, before a single request runs, the most work any piece of logic can ever do: the rows it reads, the rows it writes, the operations it runs, and the memory it uses.
- CountedEvery route, trigger, and job gets its worst-case usage, computed from its code.
- CheckedCode that could use too much, like a query that reads too many rows or a loop with no end, doesn’t build. A meter enforces the same limits while it runs.
- SharedNo app can take the CPU, memory, or database that other apps need, so many apps can run safely in one process, on one database.
- CheaperServers and databases aren’t set aside for each app and left idle, so each app costs far less to run.
Guardrails
No query can read too much
Every query has a limit, and Aleph multiplies them out: a page of 20 posts with 5 comments each is at most 120 reads, before a single request runs.
So the natural way to return a long list is the right one: a page and a cursor. Ask for everything at once and it’s rejected before it ships, with the line to change. The same limits are enforced while it runs, so a limit is a guarantee, not a guess.
Guardrails
No loop can run away
There’s no unbounded while loop and no recursion. Every loop runs over a list with a known maximum size, or declares its own maximum, so even a loop inside a loop has a worst case Aleph can count.
That’s why one app can’t burn the CPU that other apps share: code that could doesn’t build.
Still flexible
Bounded, not basic
The limits are on usage, not on what you can build. Beyond routes and queries, the same language calls external APIs, reacts to changes, pushes updates to clients in real time, sends email, and runs schedules, queues, webhooks, and multi-step workflows that can wait for days.
Every one of them is checked the same way: triggers and schedules get a worst-case usage, and their effects go out only after they commit.
How Aleph programs work: how state is managed, what the usage limits count, and what the language leaves out.
How it works
You write the logic. The platform runs it.
- Describe your app in TypeScript. Routes, who can call them, the data, and the queries. No server, ORM, or auth library to set up.
- Aleph compiles it into a manifest. Data, not code: exactly what each route can do, and the most it can ever use.
- A platform runs the manifest. One small, open-source core interprets it, so your code never runs in production.
Because of those guardrails, many apps can run in the same process and share the same database, and a platform pays for capacity once instead of once per app.
Advantages
What the trade buys you
Safe to share, so cheap to run
A backend usually gets its own isolated runtime (a Lambda, a container, or a VPS), its own database, and its own cache, sized for its busiest hour and idle the rest of the day. It needs them to itself because, in a shared setup, one runaway query or one bug can hurt everyone.
Aleph rules both out. It counts what every route can use and refuses any that could take more than its share, and there’s no expression that names another app’s data, so cross-app access can’t be written at all. Apps can safely share servers and a database, and you stop paying for idle capacity.
That changes the price, too. A platform doesn’t have to set aside servers and a database for every app it hosts, so it can offer apps built with Aleph much better pricing than a dedicated deployment. How sharing works
Write TypeScript, run on Rust.
Your TypeScript never runs in production. It compiles to a manifest, and the manifest doesn’t care what executes it. Today that’s aleph-core, a small engine written in Rust.
So you get the Rust runtime’s benefits without writing Rust: no garbage-collection pauses or JIT warm-up, steady latency under load, and memory that stays small enough to pack thousands of apps into one process. A new version of your app is a manifest loaded in milliseconds, not a container booting, so there are no cold starts.
The same core runs as WebAssembly in the CLI and in aleph dev, so what you test locally is exactly what runs in production. And because the manifest is an open spec, a platform can swap in a faster engine, or a different language, without you changing a line. Running Aleph
Correct by default
Every request runs as one serializable transaction. Events, emails, and jobs go out exactly once, and only after it commits.
There are no half-written states to clean up, no retry logic to write, and no message that was sent for a change that never happened.
Change it without fear
Every schema change is compared with what’s deployed and classified as safe, needing a backfill, or breaking. Breaking changes are blocked until they’re deprecated properly, whoever wrote them.
Additive changes ship right away. Anything that could break data already stored waits for a proper deprecation, so stored rows always fit the schema.
Built for agents
A small, typed vocabulary means there are no architecture, infrastructure, or library choices for an agent to get wrong.
When it does slip, the checker names the route, the line, and the bound, so the agent fixes its own mistake before anyone reviews it.
Build a first app in five minutes
Write one file, check it, test it, and serve it locally.