lix
Lix v0.6 SDK was releasedRead the announcement →

An embeddable version
control system for AI agents.

Give agents branches, checkpoints, semantic diffs, and rollback without dealing with Git internals.

RustPythonGo
@lix-js/sdk · v0.6.0
import { openLix, SqliteBackend } from "@lix-js/sdk";

const lix = await openLix({
  backend: new SqliteBackend({ path: "app.lix" }),
});

const main = await lix.activeBranchId();

await lix.fs.writeFile("/orders.xlsx", bytes);

const original = await lix.fs.readFile("/orders.xlsx");

const draft = await lix.createBranch({ name: "Explore" });
await lix.switchBranch({ branchId: draft.id });

await lix.fs.writeFile("/orders.xlsx", draftBytes);

await lix.switchBranch({ branchId: main });

const merge = await lix.mergeBranch({
  sourceBranchId: draft.id,
});

const changes = await lix.execute(
  "SELECT schema_key, count(*) AS count FROM lix_change GROUP BY schema_key"
);
Just a Library
no daemon, no protocol, no remote
ACID
across state, blobs, and history
semantic diffs
per-entity, not byte-level
SQL API
history is a query
§01 / why we built it

Git wasn't designed
to be embedded.

AI agents are creating an explosion in version-control demand: isolated workspaces, branchable explore steps, reviewable changes, rollback. They need versioning as infrastructure, not as a CLI.

Teams reach for Git - and end up managing a sidecar that was never meant to live inside their app:

-repository directories on disk
-working trees + checkout per worker
-locks & packfiles
-garbage collection
-LFS for blobs
-process calls & shell-outs
-protocol servers
-two-phase commits with the rest of your data

Lix is built the other way around. Sessions, not worktrees. A SQL engine you embed, with semantic diffs and branches as first-class state - backed by infrastructure you already run.

§02 / what's inside v0.6

What you get with Lix.

01

Importable library.

Import, open, run. Programmatic and in-process - no daemon, no protocol, no remote. In-memory by default; bring your own SQLite, Postgres, S3, or Cloudflare backend if needed.

import { openLix, SqliteBackend } from "@lix-js/sdk";

const lix = await openLix({
  backend: new SqliteBackend({ path: "app.lix" }),
});
02

ACID transactions.

One transaction covers your data, the blobs it references, and the change row that records the edit. No two-phase commit between three systems.

await lix.transaction(async (tx) => {
  await tx.fs.writeFile("/spec.docx", body);
  await tx.fs.writeFile("/spec.png", img);
});
03

Parallel sessions. No worktrees.

Each agent gets its own session and version without Git-style multi-checkout worktrees. Lix commits through the backend transaction layer, not per-agent repo directories or shell-out coordination.

const agent1 = await lix.create_session("copy");
const agent2 = await lix.create_session("pricing");
const agent3 = await lix.create_session("qa");

await agent1.fs.writeFile("/landing.md", copyDraft);
await agent2.fs.writeFile("/plans.json", priceModel);
await agent3.fs.writeFile("/checks/report.json", testRun);

await agent1.commit();
await agent2.commit();
await agent3.commit();
04

SQL interface.

Agents can answer complex questions in one query instead of rereading whole files. Burn fewer tokens, get faster responses, and ground reviews in structured changes - not raw bytes.

Which orders changed status in this branch?

Executing SQL
const rows = await lix.execute(
  `
  SELECT
    f.path,
    lix_json_get_text(c.entity_pk, 0) AS row_id,
    c.snapshot_content AS change
  FROM lix_change AS c
  JOIN lix_file AS f
    ON f.id = c.file_id
  WHERE c.schema_key = 'xlsx_row'
    AND f.path = '/orders.xlsx'
  ORDER BY c.created_at DESC;
  `
);
05

Bring your own backend if needed.

Start in memory, then plug Lix into the infrastructure your app already runs: SQLite, Postgres, S3 object storage, Cloudflare storage, or your own backend adapter.

SQLite
Postgres
S3
Cloudflare Workers
Supabase
const lix = await openLix({
  backend: new SqliteBackend({ path: "app.lix" }),
});
§03 / what teams build with lix

What you can build.

v0.6 ships the engine.
new shapes land in every release.

agents/

AI agent filesystems

Isolated workspaces, branchable explore steps, semantic change history, and rollback when a run goes sideways.

openLix()branch()session()diff()
db/

VCS for Postgres & SQLite

Time-travel and branchable schemas on top of an existing database. Reviewable migrations. Diffable rows.

postgres()diff(rows)merge()
apps/

Apps with version control

Add branches, review, rollback, and history to editors, CMSs, design tools, internal ops apps, and AI-native products.

branch()history()revert()
review/

Review for machine changes

Surface what an agent actually changed at the entity level. Approve, request edits, or revert by symbol - not by patch.

diff()history.entity()revert()
§04 / roadmap

Roadmap.

now / v0.6

Lix SDK

  • Importable SDK
  • ACID transactions across state, blobs, and history
  • Parallel sessions and versions
  • Semantic changes via SQL
  • Pluggable backend interface

v0.7

Lix CLI

  • CLI for creating, inspecting, and scripting Lix files

v0.8

file plugin API

  • File plugin API for DOCX, XLSX, CAD, PDF, and code

v0.9

merge conflicts

  • Merge conflicts as first-class citizens

v0.10

working changes

  • Working changes and checkpointing
install

Get started
in a minute.

Install. Open a Lix with the default in-memory backend. Write something, branch it, query its history. Plug in Postgres or S3 when you outgrow it.

MIT · TypeScript · Node, Deno, Bun, Tokio, edge runtimes.
# 1 · install
$ npm install @lix-js/sdk

# 2 · open
import { openLix } from "@lix-js/sdk";
const lix = await openLix();

# 3 · write & commit
await lix.fs.writeFile("/hello.json", payload);

# 4 · branch & ask
const b = await lix.branch("draft");
const diff = await lix.diff({ from: "main", to: b });