
Swiftward
Controls what AI agents are allowed to do, such as sending a payment or using a tool, and proves every decision they make. Both parts can now run on X2 to handle very high load.
Communityswiftward.dev
Your coding agent can write an app in an afternoon. Then a deploy restarts a worker halfway through, and you are the one counting rows to find what ran twice.
X2 by AlgoX2™ is a platform for building durable, reliable apps. It holds your events, runs your code next to them, and gives every service the same stream. After a restart, your code picks up exactly where it left off, with nothing lost or duplicated.

Swiftward

Canvas
Exchange
Click counts
Exchange

Swiftward

Canvas

Canvas
Exchange
Click counts

Swiftward
Click counts

Swiftward

Canvas
Exchange
Can't reach the server
Trying again…
/public/fleet/pos
Fleet
A dozen vans are out on deliveries. Each position they send is appended to one ordered log.
The host crashes. The map loses its server, and nothing more is appended.
The host is started again. The log carries on at the next offset, with nothing lost or duplicated.
The whole tracker is a sliver of one X2 node. One node handles 5 million messages a second.
The same node has room for many more apps beside it.
A dozen vans are out on deliveries. Each position they send is appended to one ordered log.
The host crashes. The map loses its server, and nothing more is appended.
The host is started again. The log carries on at the next offset, with nothing lost or duplicated.
The whole tracker is a sliver of one X2 node. One node handles 5 million messages a second.
The same node has room for many more apps beside it.

One X2 node
Fleet
The team behind AlgoX2 built Algo M2, a matching engine with a 16-microsecond round trip, and then NYSE Pillar, the New York Stock Exchange's trading platform. Pillar handles more than $100 billion in trades a day across 7 regulated exchanges.
Backed by $18 million from Bessemer Venture Partners, Fin Capital, Cota Capital, and other institutional investors and angels.
Each event has a number, set by the service that sends it. If the service sends it again, X2 sees the same number and keeps the first.
Your program starts inside X2, beside the data it reads. As it works, it saves checkpoints: its state and how far it has read.
After a crash, your program starts again from its last checkpoint. It reads only what came after, so every event counts once.
Billing, analytics and anything you add later read the same events in the same order. Each uses X2's client or the Kafka or NATS client it already has.
That is one X2 node. An app that starts on one machine can grow a long way before it needs a second.
X2Featured app
A dozen vans are out on deliveries, each sending its position to X2.
A program inside X2 spots when a van enters or leaves a delivery area.
Four services read that from the same X2, each with its usual client.
After a restart, it carries on where it stopped. No duplicates to clean up.
Without X2
With X2
| Without X2 | With X2 |
|---|---|
|
|
| Support, the tracking page, reports and delivery records each add a system. | All four read from the same X2, and each keeps the client it already uses. |
| When one server isn't enough, each system turns into a cluster. | One X2 node runs the whole tracker and still has room to grow. |
| Each cluster keeps its own record of how far it got. | X2 keeps a single record of how far everything got. |
| Your agent can write the glue code. After a crash, you make six records agree. | After a crash, there is nothing to make agree. Your database stays where it is. |
On your machine
Start Fleet on a local X2, send it vehicle positions, and read them back with the tools you already have.
Linux (x86_64 and arm64), in Docker, Podman or Kubernetes.
gh auth refresh -s read:packages
gh auth token | docker login ghcr.io -u <your GitHub user> --password-stdin
bash <(curl -fsSL https://raw.githubusercontent.com/algox2/x2sdk/main/x2sdk/bin/x2sdk-start)x2sup -temp -daemon -ui # returns once the instance is ready
x2clisamp_fleet -start
samp_fleet -sim | mosquitto_pub -l -h 127.0.0.1 -p <mqttport> -t public/fleet/pos
kcat -b 127.0.0.1:<kafkaport> -C -t public.fleet.pos
redis-cli -p <respport> GET public.vehicle:1
samp_fleet -stopApps built on X2. The samples come with the SDK to read, run and copy from.

Controls what AI agents are allowed to do, such as sending a payment or using a tool, and proves every decision they make. Both parts can now run on X2 to handle very high load.
Communityswiftward.dev

A vector editor where several people draw in one room at once, and anyone can go back to an earlier version. Behind the page there is no server code, only X2.
Communitycanvas.void.engineering
A small exchange with two matching engines running side by side. Kill one while orders are coming in. The other carries on, and every trade is on the tape once.
Sample
Counts clicks per page, the same way you'd count API calls for a bill. Crash it halfway and count again. You get the same number. About 160 lines of C++.
Sample
Insert an order into Postgres, then read that customer's new total. Normally that takes a connector, an event log, a stream job and a second connector. Here it's about 250 lines of C++.
Sample
“Any product with high load comes to this architecture in the end. X2 is that architecture, ready to use. It was the fastest event log we tested, and after kill -9 no decision was lost or made twice.”
X2 is a platform for building durable, reliable apps, made by AlgoX2. Your code runs inside X2, next to its data. Every event goes on one ordered log and is applied once. After a crash, X2 restarts your code from its last checkpoint, with nothing lost or applied twice.
Not yet, if Postgres and Redis do the job today. You need X2 when your app starts to need a queue, a workflow engine and recovery code as well. Adopting X2 before you build those costs less than replacing them later. To try it, you need one machine and your existing Kafka or NATS client.
Their streams belong to one workflow or one key, and you read them through their SDK. X2's streams are shared across all your services, and your services read them with the Kafka or NATS clients they already use. If your work is a few workflows with their own state, one of the three is the better choice.
Correct means no event is lost and none is applied twice. Every event has one place in one ordered log, so a deterministic program gets the same result every time it reads the log. X2 doesn't check your business logic.
We check the protocols that keep X2 consistent through failures in TLA+, a model checker: choosing a leader, a server failing and restarting, moving work between servers. Most of these checks rerun on every code change. The checker has found real bugs, such as an election with two winners. We fixed each one, and the election fix has a test that kills servers to recreate the case.
Kill a server in the middle of a write: the others take over its work, and no record is lost or written twice.
No. X2 drops duplicates for you. A writer names the position of each message, so a retry lands on the same position and is dropped. Your program inside X2 numbers its output from its input position, so a restart doesn't write a result twice. Over the Kafka protocol, idempotent producers work and transactions don't.
No. X2 has no SQL and no joins, so your app keeps its Postgres. Your events, your lookups by key and the code that reacts to them go in X2. Anything you query with SQL stays in Postgres. The two connect by logical replication, in and out.
Yes. Stock Kafka, NATS and Redis clients connect to X2, so you don't rewrite a service to try it.
X2 has clients for C++, Python, Go, Rust, TypeScript and Java. Every client connects, publishes, reads a stream and follows it.
Partly. The client libraries, samples and docs are open source under Apache 2.0. The X2 server is not: it ships as binaries under the PolyForm Noncommercial license, and its source is not public. You can develop and test on it for free.
X2 is free to develop and test on, and free for noncommercial use. Commercial use needs a paid license.
A few jobs are better done elsewhere. Keep your database for SQL and analytics. Functions that start, send one message and exit, like AWS Lambda, aren't a fit. And there is no hosted X2 yet, so you run it yourself.
The SDK has a local X2, the docs, the tutorials and the samples.