Spindle Spindle for Browser

Open source · MIT · Spindle everywhere

An agent that lives wherever you work.

Spindle is a durable coding agent. Every step is a committed revision of the conversation, the files and the app state, so a run that is killed resumes where it stopped, a model request is never sent twice by accident, and going back restores all three at once. The same engine runs in your terminal, on your server, inside your app, and in your browser.

THE THREAD

Work is a thread of knots that stay tied.

A spindle spins thread. Spindle spins work into revisions: each one commits what the conversation said, what the workspace holds and what the app's state is, in one transaction. Nothing committed is ever edited after.

A session as a thread of revisions Five revisions in a row: a prompt admitted, a model request reserved and sent once, its reply recorded, the files a command changed committed, and the answer. A rewind adds a sixth revision equal to the third, with fresh identities. r1 promptadmitted r2 request reserved,then sent once r3 reply recordedbefore it is used r4 a command's filescommitted with it r5 the answer rewind to r3: conversation, files and state together, as a new revision …
Each knot holds the conversation, a content-addressed tree of the workspace and the app's JSON state. A request is reserved before it leaves and its reply recorded before it is used, so a restart always knows whether something happened, did not, or cannot be known.
01 — PRINCIPLES

Five rules, enforced by the store, not by convention.

  1. One revision holds everything.

    Conversation, workspace and app state commit together. Go back, and all three come back: no files left over from a future that was undone.

  2. Sent at most once.

    Every model request is reserved before it leaves. A crash, a kill or a dropped connection never quietly sends it again, and never quietly bills you twice.

  3. Unknown is said, not guessed.

    When a request's fate cannot be known, Spindle tells you so. Continue never resends it; Retry sends it once more, on your word.

  4. The store decides; hosts act.

    A portable decision driver, with no network and no clock, says what a turn needs next. Whatever hosts it performs the effect and hands the answer back.

  5. Sessions move.

    A session is a directory, or one file. Export it from one host and go on in another: from your terminal to your browser and back, history and unknowns included.

02 — WHAT IT IS

An engine you can trust with an interruption.

Is: durable

Kill it mid-turn. Every committed step is still there, and continuing resumes the turn where it stopped.

Is: embeddable

A Rust crate, a JSON-RPC process, an HTTP host, or WebAssembly inside your JavaScript app. Same rules in each.

Is: yours

Runs on your machine with your provider keys. Keys are read per request and never written into a session.

Is not: a hosted service

There is no Spindle cloud. Requests go from your host to the provider you chose.

Is not: magic exactly-once

It cannot unsend a request or refund a charge. It tells you when one may have happened.

Is not: a sandbox beyond its word

Commands run in a bubblewrap sandbox where Linux allows; otherwise Spindle says so, or refuses if you required it.

03 — SPINDLE EVERYWHERE

One core. Any host.

Native or embedded, every host runs the same driver over the same store. They differ only in who performs the effects: the native binary does it itself; an app (or the browser extension) does it for the WebAssembly package.

Spindle's hosts around one core Four hosts at the top: your terminal, your server, your app and your browser. Each connects to the same core, the decision driver and the store, which hands effects to the host that runs it: model providers and command runners. Your terminalspindle new, say, continue Your serverspindle serve · phone · /v1 Your appJSON-RPC · HTTP · wasm Your browserSpindle for Browser Decision driver + store revisions · objects · attempts · receipts · rewind effects, performed by the host: model providers · command runners · app tools · tasks
The decision layer builds without native code: it compiles to WebAssembly, which is how the browser extension carries Spindle whole.
Terminal

A CLI that survives you.

spindle new, say, continue, retry, rewind. Sessions are directories you can inspect, export and move.

Server

Your agent, on your phone.

spindle serve runs a mobile web UI and an HTTP API on loopback, paired per device, behind your own HTTPS proxy.

App

Durability as a library.

Drive sessions over JSON-RPC or HTTP, or run the WebAssembly package in Node or a browser worker, with app tools whose calls keep stable ids across crashes.

04 — BUILT ON SPINDLE

The first product: Spindle for Browser.

Spindle's durability and embeddability, carried whole into the browser. No server, no host required: threads, a Linux, your keys and your files, all inside the browser. Tested on Chrome, Edge and Brave.

Spindle for Browser

An agent that lives in your browser.

Spindle keeps your conversation and workspace together, helps recover saved progress after interruptions, and lets you export the session when you want to move. In the browser, threads keep going with the panel closed and read your tabs once you switch that on.

See Spindle for Browser →
05 — GET STARTED

From source, in a minute of typing.

Rust 1.89 or newer and a C compiler; on Linux, bubblewrap for sandboxed commands.

git clone https://github.com/SiliconState/Spindle.git
cd Spindle/spindle
cargo build --release --locked -p spindle-store --features cli --bin spindle

./target/release/spindle login deepseek          # or any provider: spindle providers
./target/release/spindle --dir ../demo new --provider deepseek --isolation required \
  "Create a small command-line calculator with tests"
./target/release/spindle --dir ../demo continue  # after any interruption

Experimental, single-operator software. Spindle cannot unsend a request, refund a charge, or undo what a command did outside its workspace. Read the security notes before giving it real work.