Lix gives AI agents versions, branches, checkpoints, reviewable changes, rollback, merging, immutable history, and SQL-queryable context for non-code files like PDF, DOCX, XLSX, CSV, JSON, and agent-generated work.
- Runs in process. Import it as a library and run it inside your worker, service, CLI, or app. No daemon, no protocol.
- Works for any file format. Track changes as entities across files, structured data, and custom formats.
- Real-time multiplayer. Give agents and tools shared versions, branches, and live change history.
- Bring your own backend. Start in memory, then plug into SQLite, Postgres, S3, Cloudflare, or your own adapter.
- SQL interface. Agents can query history and changes without rereading whole files.
JavaScript ·
Python ·
Rust ·
Go
npm install @lix-js/sdkimport { openLix, SqliteBackend } from "@lix-js/sdk";
const lix = await openLix({
backend: new SqliteBackend({ path: "app.lix" }),
});
await lix.fs.writeFile("/notes/status.txt", new TextEncoder().encode("draft"));
const main = await lix.activeBranchId();
const draft = await lix.createBranch({ name: "Explore" });
await lix.switchBranch({ branchId: draft.id });
await lix.fs.writeFile(
"/notes/status.txt",
new TextEncoder().encode("ready for review"),
);
await lix.switchBranch({ branchId: main });
const changes = await lix.execute(
"SELECT schema_key, count(*) AS count FROM lix_change GROUP BY schema_key",
);AI agents are creating explosive demand for version control: isolated workspaces, checkpoints, versions, reviewable changes, and rollback.
Git works well for source code, but it cannot meaningfully track many non-code files by default. Agents increasingly operate on files where the useful diff is a spreadsheet cell, document clause, generated JSON property, CSV row, PDF section, or agent action.
Lix is built to make those domain-level changes queryable, reviewable, and mergeable.
How does Lix compare to Git? →
Import Lix and open it inside your worker, service, CLI, or app. No daemon, no protocol.
import { openLix, SqliteBackend } from "@lix-js/sdk";
const lix = await openLix({
backend: new SqliteBackend({ path: "app.lix" }),
});Write files, blobs, and history in one transaction.
const tx = await lix.beginTransaction();
try {
await tx.fs.writeFile("/spec.docx", body);
await tx.fs.writeFile("/spec.png", image);
await tx.commit();
} catch (error) {
await tx.rollback();
throw error;
}Give every agent its own isolated branch without creating Git-style multi-checkout worktrees.
const main = await lix.activeBranchId();
const copy = await lix.createBranch({ name: "Copy draft" });
const pricing = await lix.createBranch({ name: "Pricing draft" });
const qa = await lix.createBranch({ name: "QA draft" });
await lix.switchBranch({ branchId: copy.id });
await lix.fs.writeFile("/landing.md", copyDraft);
await lix.switchBranch({ branchId: pricing.id });
await lix.fs.writeFile("/plans.json", priceModel);
await lix.switchBranch({ branchId: qa.id });
await lix.fs.writeFile("/checks/report.json", testRun);
await lix.switchBranch({ branchId: main });Unlike Git's line-based diffs, Lix can track structured entities: XLSX rows, DOCX clauses, JSON properties, app records, and more.
const changes = await lix.execute(`
SELECT created_at, schema_key, entity_pk, snapshot_content
FROM lix_change
ORDER BY created_at DESC
LIMIT 20
`);For example, an agent edits an orders spreadsheet:
Before:
| order_id | product | status |
| -------- | -------- | ------- |
| 1001 | Widget A | shipped |
| 1002 | Widget B | pending |
After:
| order_id | product | status |
| -------- | -------- | ------- |
| 1001 | Widget A | shipped |
| 1002 | Widget B | shipped |
Git can only tell you the file changed:
-Binary files differLix can expose the row field that changed:
order_id 1002 status:
- pending
+ shippedRead more about semantic changes →
Agents burn fewer tokens and keep cleaner context when version-control questions are answered with SQL instead of whole-file rereads.
const rows = await lix.execute(`
SELECT created_at, schema_key, entity_pk, snapshot_content
FROM lix_change
ORDER BY created_at DESC
LIMIT 20
`);Every change, across every file and every branch, is a row in lix_change. Filter by branch, file, schema, or time without re-reading whole files.
Start in memory, then plug Lix into the infrastructure your app already runs.
SQLite ·
Postgres ·
S3 ·
Cloudflare Workers ·
Supabase
const lix = await openLix({
backend: new SqliteBackend({ path: "app.lix" }),
});Lix runs in-process inside your app.
It owns the version-control model: files, blobs, versions, history, transactions, and semantic changes. You plug it into whatever backend you need: in-memory, SQLite, Postgres, S3, Cloudflare, or your own adapter.
SQL is the query interface on top. Agents can ask what changed without rereading whole files.
┌─────────────────────────────────────────────────┐
│ Your runtime │
│ agent worker · server · CLI · app │
│ │
│ ┌─────────────────────────────────────────┐ │
│ │ Lix │ │
│ │ Filesystem · Versions · History · SQL │ │
│ └────────────────────┬────────────────────┘ │
│ │ │
└────────────────────────┼────────────────────────┘
▼
┌─────────────────────────────────────────────────┐
│ Backend │
│ SQLite, Postgres, S3, Cloudflare, custom │
└─────────────────────────────────────────────────┘
Read more about Lix architecture →
- AI agent filesystems - isolated workspaces, versioned explore steps, semantic change history, and rollback when a run goes sideways.
- Version control for Postgres & SQLite - time-travel and versioned schemas on top of an existing database. Reviewable migrations. Diffable rows.
- Apps with version control - add versions, review, rollback, and history to editors, CMSs, design tools, internal ops apps, and AI-native products.
- Review for AI-generated changes - surface what an agent actually changed at the entity level. Approve, request edits, or revert by symbol instead of patch.
v0.6: Lix SDK (current)
- Importable SDK
- ACID transactions across state, blobs, and history
- Parallel sessions and versions
- Entity-level change tracking, queryable via SQL
- Stable physical storage layout
- Pluggable backend interface
v0.7: Lix CLI
- CLI for creating, inspecting, and scripting Lix repositories
v0.8: file plugin API
- Finalized 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
- Getting Started Guide - Build your first app with Lix
- Documentation - Full API reference and guides
- Discord - Get help and join the community
- GitHub - Report issues and contribute