skein.nexus skein is pronounced “skane”

A computer with a complete, replayable memory.

A skein is a sandbox with one door. Everything that comes in is signed or proven, and everything a program does inside is kept as a history you can replay, branch and merge, the way you work with a git repository. What it does depends on the apps you install, and it runs the same on any host: a server, a laptop or a browser tab.

One door, guarded by the skein’s keys. Programs inside write to a graph that never overwrites anything.

What it is: three parts

The sandboxPrograms run with no side doors.

A skein runs ordinary programs compiled to WebAssembly: a shell, git, JavaScript, Python, or a model deciding what to do next. They get no hidden disk, network or clock. Every step is metered, and any step can be run again with exactly the same result.

The sandbox

Keys and the doorIt has an identity and a wallet.

Each skein has its own identity keys and its own Bitcoin wallet. Messages come in signed by their sender, Bitcoin data comes with its proof, and anything the skein asks the outside world for comes back as a signed message from the service that fetched it. You always know who sent what and what was paid.

Keys and the door

The graphNothing is overwritten.

Every file, message, transaction and step is stored as a record addressed by its hash, so it can’t change once it’s written. Git repositories and Bitcoin proofs sit in the same graph. You can pick any point as a head, branch from it and merge back.

The graph
One door means a complete record.If something reached the skein, it came through the door, so it’s in the graph along with who sent it.
A complete record means replay.The sandbox has no hidden inputs, so running a step again from the record gives the same bytes.
Replay means branching is cheap.Any point in the history is a full state. Start from it, try something else, and merge back what works.

What a skein does depends on the apps its owner installs: a shell, a wallet, an overlay, a website. Each app is a tree of programs installed under its own name, and writes only there.

A skein acts on its own: it answers messages, runs scheduled jobs, and pays and gets paid, with no model involved. When a language model decides a skein’s next step, these pages call that skein an agent. The model is one driver among several.

What you can do with it

Skein is open source and being built now. These pages describe the design as settled; what is built so far is on the What is built page. The code is at github.com/shruggr/skein.

What it is · 1 of 3

The sandbox: a computer with no side doors

A skein runs programs the way any computer does. What’s different is what the programs don’t get: no disk, network, clock or randomness of their own. Everything a program can read comes from the skein’s history, so anything it does can be run again and checked.

What runs inside

Programs are ordinary WebAssembly compiled against the standard WASI interface, so they’re written for WASI, not for skein. Anything that compiles to plain WASI can run: Rust, C, Zig, Go.

A userland is itself an app, the shell. A skein that installs it can run:

  • a bash-compatible shell with coreutils, grep, sed, awk, find, diff and jq;
  • real git (2.55): commit, branch, merge, log, diff;
  • JavaScript (QuickJS, with a small Node shim) and Python 3.14.

What’s missing, and what takes its place

A normal program has
A skein program gets instead
A disk
Files and folders from the graph. A working directory is a git tree, named by its hash.
The network
Nothing direct. To reach outside, a program sends a signed message and waits. The answer arrives as a new entry in the history and wakes it again.
A clock
The time the current input arrived, plus the work done since (1 unit of work = 1 clock tick). Time never runs backwards and replays exactly.
Randomness
A stream derived from the hash of the current input. It’s repeatable, so it’s never used for secrets. Secrets are made outside, where the keys are.
Other processes
Only what it launches itself, inside the same sandbox, on the same meter.

Every step is metered

The sandbox counts the instructions every step executes (its “fuel”) and writes the count into the history. There’s a limit per step. Billing is then just a question you ask of the history, and anyone who replays it gets the same numbers.

Any step can be run again

A step’s inputs are all in the history: the entry that woke it, what it read, and what it had signed. Run it again and you get the same bytes out. So you check what a program did by re-running it, not by trusting a log that someone wrote about it.

The test suite replays every stored history into a fresh store, twice, natively and in headless Chrome, and requires identical results.

Where the sandbox runs

The kernel is written in Zig and runs on a server over wasmtime. The same kernel compiles to run in a browser tab, keeping its graph in the browser. A history written in the browser replays on the server, and the other way round.

Limits today. No package managers (npm, pip), no threads, no streaming pipes (each pipeline stage runs to completion), and no tar or gzip yet. Programs that need a native binary or an outside service reach it by message, as a separate party.
What it is · 2 of 3

Keys and the door

A skein is an identity. It has its own key pair, its own Bitcoin wallet, and one way to deal with the world: through a door where everything that crosses is signed or proven.

An identity of its own

Every skein has an identity key. People, programs and other skeins address it by that public key, and it authenticates them the same way: by key, never by name or account. A handle like @martha is only a way of finding the key.

Keys never enter the sandbox

Programs can ask for a signature, but they can never read a key. Signing is a request to a separate signer outside the sandbox, which sees a reference to a key and a 32-byte hash and nothing else. Each request and the signature that came back are written into the history, and signatures are deterministic, so replay matches exactly.

Where the keys actually live is up to whoever runs the skein: a hosting service’s key store, a hardware device, or your own wallet in a browser tab. The skein only ever sees public keys and the signatures it asked for.

A wallet inside

The wallet (the BRC-100 interface) is an app that runs inside the sandbox. Its coins and transactions are records in the graph like everything else. It builds and signs transactions (through the signer) and checks incoming payments against their proofs before it accepts them. Block headers, proofs and transaction status live in one chain app that the wallet and every overlay read.

The door: what crosses, and how it’s proven

A skein runs on a host. The host runs the kernel, holds the keys, and provides, or points to, the transports and services the skein’s tables name: a web proxy, a mailbox, libp2p, a broadcaster, timers. A skein moved to another host that provides the same things runs the same, with the same history.

A skein has no server of its own. The host carries packages in over whatever transports the skein’s dispatch table names: HTTP, a mailbox, libp2p. Each package is written to the history as it arrived, and the program the table names for it runs on it. For HTTP that program is the front door, which checks mutual authentication (BRC-103/104) before anything else sees the request.

What crosses
How you can check it later
A message
Signed by its sender. The signed request is kept with the message, so who sent it can be verified from the record alone, years later.
A payment
A transaction with its ancestry and Merkle proofs (BEEF), checked against block headers when it arrives.
Block headers and proofs
Prove themselves: each header must chain back to Bitcoin’s genesis with valid proof of work, and each proof must hash up to a header.
A peer-to-peer message
Signed by its publisher (libp2p), and re-verifiable from the record.
Something the skein asked for
The skein asks a service, a web proxy or a timer, and waits. The service may be its host’s or anyone’s, since it is only an address in the skein’s book. The reply is written into the history, signed by whoever answered.
A transaction’s status
Arcade, the service the skein broadcast to, reports back as the transaction is accepted and mined.

Everything that arrives is written

Every request that reaches the skein is written as it arrived, reads and handshakes included, the way a web server keeps an access log. A read changes nothing else. A handshake writes the session, so it survives a restart. How long old reads are kept is a pruning question.

Why this matters

  • Every record has an author you can check.
  • Payments are proven, not claimed.
  • A skein can hold money and do things with it, and you can see exactly what it signed and why.
What it is · 3 of 3

The graph: history you can branch

Everything a skein holds is one graph of records, each named by the hash of its contents. Nothing is edited in place. A change is a new record that points at the one before it.

Named by content

A record’s name is a fingerprint of what’s in it. The same content always gets the same name and is stored once. Change one byte and it has a new name. Git works this way, and so does Bitcoin: a transaction’s ID is the hash of the transaction.

That’s why the graph can hold both. A folder’s name in the graph is its git tree ID, so a repository is already part of the graph. A transaction’s name is its txid, and a block header’s is its block hash.

What’s in it

  • Files and folders, as git objects.
  • Messages that came through the door, with their signatures.
  • Steps programs took, with the work they cost, what they read, and what they had signed.
  • Bitcoin records: transactions, block headers and the Merkle proof nodes between them.
  • Links between them: which step started which, which transaction spends which output. You can ask “what spent this coin?” or “what did this message lead to?”.
  • The skein’s own tables: which program each kind of message goes to (the dispatch table) and how to reach each key it knows (the address book), each a chain of changes like everything else.

One small record at the top points at all of it, so the whole state of a skein has a single hash. Two skeins that took in the same inputs have the same hash.

Searchable by how things connect

Because every record links to what it came from, the graph can be searched by those links, not just by text. From a message you can find the conversation it belongs to, the steps it set off, the files those steps changed and the payments they made. From a coin you can find what spent it and why.

That changes what a model working in a skein can see. It isn’t limited to its current chat log. It can see every conversation the skein has had, how each connects to the others, and the work and money that came out of them: the whole graph, not a transcript. Programs in the skein follow these links, and the same view can be handed to a model as a tool.

Records only ever point backwards. A head is a named pointer to one of them; branching is making another.

Heads, branches and merges

Things that change over time (a conversation, a running task, a project’s files) are chains: a first record and a series of updates, each pointing at the one before. A pointer to the first record means “as it is now”; a pointer to an update means “exactly this version”.

A head is a named pointer into the history, like a git branch. It moves only when something deliberately moves it. Because old records never change, any earlier point is still there to start from.

Every head belongs to one app, and its name says which: wallet/… is the wallet’s. An app can move only its own heads. Any program can read any record whose hash it holds.

Where branching works

Files

Named heads point at file trees, and real git runs inside: branch, three-way merge, conflicts.

Conversations

Each turn names its parent turn, so a fork is simply a new turn that names an earlier parent.

A whole skein

Its state is one hash, so a checkpoint can be packed up and restored on another host. Starting a new skein from another’s earlier point, or merging two skeins, is not decided.

Why this matters

  • Auditing is reading, not reconstructing: the history is the state.
  • Two states compare by one hash, and syncing means copying the records the other side is missing.
  • Trying something risky is cheap: branch, try it, keep what works.
What you can do

Watch a model work, turn by turn

When a skein talks to a language model, every request, every answer and every tool the model uses becomes a record in the graph. You can read back any turn, re-run what the tools did, and start again from any earlier point.

The model is outside the sandbox

Inference isn’t part of skein. A model provider is another party with its own identity, reached by message like anyone else. The conversation loop inside the skein sends a request; the answer comes back through the door as a signed message and wakes the loop up.

The model and how hard it thinks are chosen per request. Any OpenAI-compatible provider works behind the inference peer, and a skein with no model at all is just as useful.

The conversation loop is an app of its own, the chat app; a shell is another.

What gets kept, each turn

  • The prompt: the system prompt from the skein’s own files, and the user’s message.
  • The answer: the text, the model’s reasoning, the tool calls it made, which model answered, how long it took and the tokens it used.
  • Each tool call as its own step in the sandbox. A shell command runs there, and the folder it leaves behind is a tree with its own hash.
  • The signed reply from the inference provider, and the work each step cost.

Only new turns are sent to the provider. Each turn is a record with a hash, and the provider keeps the ones it has seen, so a long conversation doesn’t get re-sent in full every time.

Each turn names its parent. Following the parents back gives the whole conversation; naming an earlier parent starts a branch.

What that lets you do

  • Read back exactly what the model was shown and what it said, including its reasoning.
  • See the files the model saw and changed at every step, because each is a tree with a hash.
  • Re-run any tool step from the record and get the same result.
  • Look across conversations, not just this one. Every chat the skein has had is in the same graph, linked to the steps, files and messages it produced, so the model’s context can be the whole graph rather than one log.
  • Branch from any turn and try a different prompt or model, leaving the original intact.
What the record can’t do is make the model deterministic. Re-running a tool step reproduces it exactly; asking the model again may give a different answer. That’s why the model’s answer is kept as a signed message rather than recomputed.
What you can do

Give every agent, and every person, a skein

One skein per agent means each agent has its own keys, wallet, mailbox, files and history. People can have one too, even if all it does is hold their mail.

An agent’s skein

An agent is a skein with the chat app installed and a model behind it. Its personality and instructions are ordinary files in its tree (SOUL.md, IDENTITY.md, a skills/ folder), deployed into it by message. It has a handle, an address, a wallet and a mailbox. Anyone who knows its key can message it; whether it answers depends on its dispatch table, which says which senders may reach which program.

A person’s skein

A person’s skein needs no model. A mailbox skein has only the front door and a mailbox, and holds that person’s mail so other skeins always have somewhere to deliver. There’s no central mail server: every mailbox is its own skein. Registering one is a signed request from your wallet.

Finding each other

Messages go to keys. Handles (@martha) are how you find a key and its address, through the BRC-169 discovery lookup. Each skein keeps its own address book of keys it knows how to reach.

What you can do

Let skeins work with each other, in the open

Skeins message each other exactly the way you message them. There’s no separate channel for machines, so everything between them is signed and kept, on both sides.

One way of talking

One skein asks another something with the same kind of message a person would send. The reply comes back to the thread that asked, and only if it comes from the key the question went to. Each side keeps its own record of the exchange.

A person can ask one agent, which consults another over several back-and-forth hops, and the answer comes back to the person.

Broadcast, too

Skeins can also join peer-to-peer networks (libp2p). A message accepted from a topic is written as a record that re-verifies from its publisher’s signature. A rejected one is refused and kept in the history; a repeat is ignored.

Shared Bitcoin services

An overlay is an app: the overlay engine plus your own topic managers and lookup services, installed under one name. It takes transactions for its topics at /<handle>/<app>/submit, keeps the ones its rules admit, answers lookups, and shares what it admitted with peers over libp2p. If no topic admits a transaction, only the request is recorded. BSV-21 tokens and 1Sat Ordinals collections are the first overlays being written for it.

Paying each other

A skein’s wallet can receive a payment and make one, and a payment can ride on any message: to pay for work, or to pay for delivery to a mailbox.

Why the record matters here. Programs that message each other and hold money should be inspectable. Every message between them is signed, every step is kept, nothing can be deleted or rewritten, and any step can be re-run.
What you can do

One graph over all your work

Skein started with a plain problem. One project lives in several repositories on several machines, and every coding assistant keeps its own history and memory. None of it connects. A skein is one place where all of it can live together, whoever did the work.

Why it fits

  • Repositories are already part of the graph, because folders are stored as git trees. Importing a directory gives you its tree hash, and real git runs inside.
  • Every change arrives by a signed message or is made by a recorded step, so the history says who or what made it: you, a script, or an agent.
  • Named heads track where each line of work is, and nothing earlier is ever lost.
  • The same record serves a person reading back what happened and a program looking for context.

No model required

Many skeins won’t run a model at all. A skein that just keeps files, runs scheduled jobs, holds a wallet or indexes some data is a complete skein, and it still acts on its own. The model is one kind of driver among several.

Where this stands. The pieces exist: importing trees, git inside, heads, signed changes. The everyday workflow (keeping your working repositories and your assistants’ sessions flowing into your skein) is the direction, not a finished tool.
What you can do

Your own slice of Bitcoin, indexed and proven

Today, shared indexers and gateways answer questions about your coins and transactions for free. A skein keeps that information for you, in your own graph, with the proofs attached.

What it holds

Transactions under their txids, block headers under their block hashes, and only the Merkle proof nodes that connect your transactions to those headers. Proofs merge for free: two proofs from the same block share their nodes, because the nodes are named by their hashes.

Headers must chain back to Bitcoin’s genesis block with valid proof of work before they’re accepted. Payments are checked against them when they arrive. Consensus rules are current, including Chronicle.

One app per skein keeps this chain state, the chain app. The wallet and every overlay read it rather than keeping copies. You hand it a transaction with its ancestry and proofs (a BEEF): it records it, broadcasts it if it isn’t mined yet, and answers as the transaction is accepted and mined.

Settlement you can read

Every transaction is unproven, proven or rejected, and that status is worked out from the graph rather than stored as a flag. If a transaction is rejected, everything that spent from it is affected too, by following the “spends” links. A chain reorganisation reverts the proofs it invalidates.

Walk it

Each skein has an explorer that walks the graph: from a block header to its Merkle root, down the proof to a transaction, and on to whatever spends it.

Why keep your own

Your records don’t depend on a service staying up or staying honest. The proofs travel with the data.

Headers arrive from a feed. A transaction’s status and its proof come back from the Arcade the skein broadcast to. Headers and proofs check themselves against the chain; a status is Arcade’s word, and stays provisional until the proof arrives.

What you can do

Start from a commit, run anywhere

A skein boots from a tree of files: its programs, its configuration and its own documents. That tree can come from a folder, a git tree, or a repository published on chain. After that, the same skein can run on a server or in a browser tab.

The system tree

Programs live in bin/ as WebAssembly, and configuration lives in etc/: the dispatch table’s first rows (which sender may reach which program, by message box, web path or peer-to-peer topic) and which Bitcoin feeds to follow. Anything else in the tree is the skein’s own files. The skein’s first record (its genesis) names that tree by hash, so what it started from is fixed forever.

Apps on top

A genesis can be bare: the kernel’s tables and the owner’s admin rows, nothing else. Apps go in on top. Each app is its own repository, and the owner installs it into a running skein. The install shows the rows the app asks for and sends them only once the owner approves. A skein installs only what it uses: no web server, no peer-to-peer, no chain app if nothing needs them.

Where the tree comes from

  • A folder on disk, hashed into git objects. It gets the same hash as git write-tree.
  • A tree already in a store, by its hash.
  • A chain packet: Bitcoin transactions carrying a repository (via gib), plus their proofs, verified offline. A repository published on chain and a clone of it produce the same store.

Released apps and snapshots are deployed on chain as Bitcoin transactions, so a genesis or an install can point at an outpoint as well as a git commit. When the code comes from the chain, who published it and which version ran are both part of the record.

Same skein, different machines

The kernel runs natively on a server and also compiles for the browser. A history written in either replays in the other. A checkpoint (a skein’s state, packed with everything it references) can be restored on a second host under the same identity.

Running one

Where a skein runs

A skein runs on a host. The host can be a server running many skeins, your own machine, a browser tab, or an application with the kernel built in. The skein and its history are the same on each.

What every host does

It runs the kernel. It holds the keys and signs what the skein asks it to sign, outside the sandbox. It keeps the store. And it provides, or points to, the transports and services the skein’s tables name: HTTP, a mailbox, libp2p, a web proxy, a broadcaster, timers. A service may be the host’s or anyone’s; to the skein it is only an address in its book. The host decides nothing and routes nothing inside the skein: the skein’s own dispatch table does that. So a skein can move between hosts.

A multi-skein host

One process, one master secret, many skeins. Each skein’s identity key and its libp2p key are derived from that secret inside the process, so no secret is passed between tools. Each skein has its own address, its own store and its own libp2p node. This is what a service operator runs.

The command line

One skein on your own machine, run by the same host code. It is for development and for personal use.

The browser

The kernel runs in a tab, in a Worker, with IndexedDB as the store and your wallet as the signer. Mail that arrives while the tab is closed waits in the skein’s mailbox, and timers fire when the tab is next open. Peer-to-peer runs over js-libp2p, with bootstrap nodes we provide.

Embedded in an application

The kernel linked into a standalone application, which supplies its own signer and transports.

Technical

Architecture

A deterministic WASI machine over a content-addressed graph. It has three layers: one kernel (the machine, its four tables and the signer), the apps that run on it, and the hosts that drive it from outside.

The host judges nothing and routes nothing. The kernel’s dispatch table routes, and everything that matters is decided by programs inside the kernel and written to the store.

Kernel

The machine: store, log, scheduler, the WASI implementation and skein’s own imports, over wasmtime (C API, statically linked). It keeps four tables: objects (blocks by hash), heads (each with an owner), the dispatch table, and the address book. The owner’s admin messages change them, and the kernel does that itself; no program can. One implementation, kernel-zig, which also compiles to wasm32-freestanding for the browser. CLI: skein-kernel serve | replay | shell | dump | fuel.

Apps and the SDK

Everything outside the kernel is an app, installed under its own name: the front door, the messagebox, resolve, the wallet, the chain app, the shell, the chat app, overlays, static sites. An app is a tree of programs with a manifest. It moves only heads under its own name, reads any record whose hash it holds, and a call to another app hands back hashes, not data. A skein installs only the apps it uses. All are written against skein-sdk, a Zig package. The handler programs are Zig, about 100–670 KB each.

Hosts

Whatever drives a kernel from outside: transports, providers, a store and the signer. A host appends what its transports carry in, holds a waiting client until its request’s thread comes to rest, answers the kernel’s signing requests, and carries out what the skein emits through its providers: a web proxy, a broadcaster, a waker, cron, a libp2p node. A provider may be the host’s or anyone’s; the skein knows it only as an address in its book. How a host holds keys, where it stores bytes and how it’s deployed are its own business. There’s a server host and a browser host, and the same history replays under either.

The kernel’s whole surface

admit
The one call in that writes: append a package as it arrived, then run the steps it drives.
answer
Wait until a request’s thread comes to rest, and return its answer. This is how a waiting web client gets its reply.
call
Run a program function over current state. No entry, no writes, not replayed; its fuel goes to the host’s ledger. Only for host-side reads that are not requests, such as the explorer’s pages.
wallet
Out: key operations, answered by the host’s signer. The one call recorded on the step.
emit
Out: committed messages for providers and peers, and broadcast transactions, carried by the host after the step ends.
Technical

Data model: git and Bitcoin in one graph

Every durable thing is a record: one IPLD object named by its CID. Git objects, Bitcoin structures and skein’s own records use different codecs and hashes, but they all live in one store and link to each other by CID.

Families of record

Family
Codec · hash · what the CID equals
skein
dag-cbor · sha2-256. Log entries, thread origins and updates, messages, head updates (with their owner), dispatch-table changes, app records, index nodes, the state record.
git
git-raw · sha1. A tree’s CID is its git object id. A scanned directory hashes identically to git write-tree.
bitcoin
bitcoin-block (0xb0) · dbl-sha2-256: CID = block hash. bitcoin-tx (0xb1): CID = txid. Exactly 64 bytes under bitcoin-tx is a Merkle node, whose CID is its Merkle hash.
raw
Wasm modules and the Python stdlib.

Links run from the newer record to the older one by CID, whatever the codec. Only transaction inputs add “spends” edges to the index.

Git mapping

A repository in a tree is an ordinary git repository, except that .git/objects is synthetic: each loose object is served on the fly from its git-raw record, and writes are inflated, sha1-checked and kept as records. No object is stored twice, and there are no packs. A deployed tree is its repository’s tree.

Bitcoin mapping

Headers decode to {version, previousblockhash → link, merkleroot → link, time, bits, nonce}; transactions to {version, vin: [{txid → link, vout, …}], vout, locktime}, with bitcoind’s field names. Proofs are held sparsely: receiving a BUMP (BRC-74) checks its root against the header at that height, then stores each node it reveals. Conflicting nodes and wrong roots are refused. A proofs map records txid → {block, depth, position}, and a proof is rebuilt by walking down from the header by the position’s bits. The chain app keeps this map under chain/, one copy for the whole skein.

Chains

Anything that changes is a chain: an origin (its identity) and updates carrying origin, prev and seq. Point at the origin for “as it is now”, at an update for “exactly this version”. Threads, heads, the dispatch table and the address book are all chains.

The index and the state record

The store is a key→bytes map plus one pointer. Each query the scheduler needs is its own Merkle search tree (fan-out ~32, canonical: the same pairs give the same root in any order): log, unique, chains, updates, threads, resting, sleepers, awaits, edges, heads. One skein-state record holds the log tip and every map’s root. Its CID is the instance’s single mutable pointer and a function of the log: same log, same state CID.

Cost: 2.5–7.5 new index nodes (0.6–4.2 KiB) plus ~1 KiB of state records per log entry. A store may forget what no head reaches, and the log before its last checkpoint.

Edges

The edges map indexes who points at what, derived from records a step keeps: launched-by, depends-on, resolves, record refs, and spends for kept transactions’ inputs. “Who spent txid:vout” is a prefix scan. Rejection propagates along spends, admits and derives-from.

Technical

The kernel and VM

A WASI machine where every input is a log entry and every value that didn’t come from the log is recorded. Replay is exact, and computation is metered by instruction count.

ABIs

Programs are WASI preview1 core modules or WASI 0.2 components (world skein:kernel/handler). The kernel tells them apart by the binary preamble and gives both one behaviour: 0.2 filesystem and io calls are answered by the preview1 implementation. Imports the kernel doesn’t answer (sockets, say) link as traps.

Syscalls

Pure
Files, pipes, spawn, stdio, clock, random. Answered inside, deterministically, never recorded.
Recorded
wallet only: the signer. The request and answer are written as a record of the step; replay serves them from there, and a request that differs on replay is a divergence.
Reads
input, get by CID, head, edges. Global: any program reads any record it holds the CID of.
Writes
put, putblock, keep, advance. advance only moves heads under the program’s own app name.
Threads
launch, await (a record, a subject or another thread), deadline, call.
Out
emit: a signed message to a key in the address book, or a broadcast transaction. Sent when the step ends; the answer is a new entry.

Time

The host stamps each entry at admission. Inside a step, t = max(last + 1, stamp + fuel), one unit of fuel per clock tick: time never repeats, never goes back, and is recomputed exactly on replay. A shell and its children share one meter and one clock. Busy-waits end on their own. Sleep and deadlines are a message to the waker, whose answer wakes the thread. A recurring job is a schedule a program sends to the cron provider. There are no wake entries.

Randomness

SHA-256(key ‖ counter) blocks, key = SHA-256(entry CID ‖ thread CID). Python’s random, uuid4, QuickJS Math.random and git’s temp names all draw on it and replay identically. It’s predictable from public records, so secrets are made by the signer instead.

Fuel

wasmtime fuel is on for every step and summed across everything in it (handler, shell, children, nested calls). The limit is fuelPerStep (default 1012); running out ends the step errored, deterministically, and it’s never retried. Kernel calls and the front door’s request steps have their own limit (1010); a kernel call’s fuel is charged to the host ledger. skein-kernel fuel is the billing query. Overhead is 0–9%. In the browser, where V8 has no fuel, the kernel instruments each module to count its own, and the counts match wasmtime’s.

Replay

skein-kernel replay rebuilds a store from its log with no wallet or network. The equivalence suite replays 18 real histories twice, natively, instrumented and in headless Chrome, and requires identical dumps, fuel and explorer pages. Signatures are deterministic (RFC 6979), so they replay too. Crash recovery is replay at hydrate time: a cut-off step runs again.

Userland: the shell app

  • Shell: brush (bash-compatible, Rust) over uutils coreutils, plus find, xargs, diff, jq (jaq), sed, awk, tree and grep. Pipelines run stage by stage, with 64 MiB pipes.
  • git 2.55 in C via wasi-sdk: init to merge (three-way, conflicts), tag, fsck. No remotes, no packs. Commit dates come from the in-step clock, so commit IDs replay.
  • qjs (QuickJS-ng) registered as node with a sync Node shim, and CPython 3.14 with its stdlib mounted read-only. No npm, no pip, no sockets.
  • Size: 13.7 MB for the shell toolset, plus 19.1 MB for the script runtimes.

Browser build

The same kernel for wasm32-freestanding (2.4 MB) in a Worker, with IndexedDB as the store. It needs cross-origin isolation. It runs preview1 modules only. Peer-to-peer runs over js-libp2p, with bootstrap nodes we provide. Logs cross between browser and native in both directions.

Technical

Messages and network

The instance is an HTTP server. BRC-103/104 is the network, BRC-33 is the mailbox, BRC-169 is discovery, and every package that arrives is written as received.

The front door

Each instance has its own origin (<handle>.host, or /@handle). The host appends every request as received, and the kernel runs the front-door program on it as that request’s own thread: the BRC-103/104 handshake and the check of each message happen inside the VM. The host holds the client’s connection until the thread comes to rest. The caller is the identity key the session proved; there are no accounts. Answers are signed on the session through the signer.

Routes are http rows of the dispatch table: a path or prefix, who may call it ("session" for any BRC-104 session, a key, or "*" for an open route like an overlay’s submit), and the program function to call. etc/reads.json gates read routes by caller. A handler answers {status, type?, body, headers?, admit?}; {wait: true} if the answer depends on a thread still running; or {read: true} for a live read. admit lists the messages and events to route.

The persistence rule

Message arrives
Its request, as received, is one entry. The front door’s step routes the mail record it carries; that record keeps the signed BRC-104 request, so authorship verifies from the log with keys alone.
Read or poll
Its request entry, and nothing else moves. Growth is a pruning question.
Handshake
Its request entry. The step writes the session under the head frontdoor/sessions, so sessions survive a restart (they expire after a day).
Acknowledgement
Its request entry; the step admits an :ack event and the reader’s pointer moves.
Sending
Part of the sending step: the signed message it emitted, listed on the update. Not an entry. The answer is an entry.

The dispatch table

A body with replyTo resumes the thread awaiting that record, but only from the identity it was sent to. Otherwise it is routed by the dispatch table: one table of rows (transport, address, sender, program) for message boxes, web paths and libp2p topics alike, first match wins. A row is the permission. The table is a chain that only the kernel writes, on admin messages from the owner or a delegate. No match means it’s recorded and nothing runs.

Mailboxes, delivery, discovery

  • Messagebox program: BRC-33 send/list/ack (JSON or BRC-231 CBOR). An instance’s own boxes keep no list: admission is the acknowledgement, and the log is the queue.
  • Mailbox instances: an outside identity (a person, the inference peer, a browser tab) gets an instance with only the front door and messagebox. There’s no separate messagebox host.
  • Delivery: an emitted message to a mailbox key is delivered by its own thread. The messagebox program acts as a BRC-103/104 client of the recipient’s messagebox, and each HTTP exchange is a message to the web proxy (the fetch provider). Its sessions are kept under the head outbound. The address book (head peers) maps key → transport (mailbox, libp2p, local) and address. Transient failures are retried; an unknown key is “no route”.
  • Discovery (BRC-169) is a program, not core: manifest, then handle → identity key and messagebox, each lookup a message to the web proxy.

One way out: emit and the providers

A step never talks to the network. It emits a signed message to a key in the address book, ends waiting, and the answer is an entry that steps it again. Providers are recipients with keys of their own: fetch (a web proxy), waker, cron and libp2p. Each answers with a signed message. A provider may be the host’s or anyone’s: it is a row in the address book. A broadcast is an unsigned event that the broadcaster queues and retries; the proof comes back as an event, and status reports come from the Arcade the skein broadcast to.

Inference protocol

The chat app’s loop sends {model, thinking?, tools?, parent?, nodes}, where nodes are only the turn records new since the last request, each with its CID and parent. The inference peer stores nodes per sender, walks back to the root and sends the engine the whole chat. If it lacks a node it answers {missing: [cid]} and the loop resends once. The completion arrives as mail with replyTo, and resumes the thread.

libp2p

The host runs a libp2p node (GossipSub with strict signing) for each instance whose dispatch table has libp2p rows, and follows the table live as apps are installed. Each topic message or stream frame is appended as a request and the front door judges it; an accepted message admits what a web submission would. A rejected one is refused and kept in the history; a repeat is ignored. Outbound is a message to the libp2p provider: publish, dial, send, close. The peer key is separate from the identity key and never holds funds.

A transaction submitted over pubsub persists exactly what POST /submit persists, and overlays gossip what they admitted and its proofs (<topic>, -admit, -proof).

Technical

Wallet and overlays

The wallet is split in two: the keys stay outside with the host’s signer, and wallet state lives inside as records. One chain app owns the chain state under chain/; the wallet and each overlay keep their own records under their own names and read it.

The signer

The kernel holds no keys. Key operations (get public key, sign, encrypt/decrypt, HMAC, verify) are requests to the host’s signer, which might be a hosting service’s key store, a hardware module, or the user’s own BRC-100 wallet in a browser tab. A signing request carries a key reference and a 32-byte hash, nothing else. How keys are made, stored and derived is the host’s business and outside the skein.

The wallet program

programs/wallet, built on the SDK’s wallet library over bsvz, compiled to wasm. Operations include headers, internalize (BRC-100 internalizeAction on Atomic BEEF), proof, createAction, signAction and list. The builder picks the largest spendable outputs first, sends change to a fresh BRC-29 key, and returns Atomic BEEF with ancestry back to proven transactions. It matches go-sdk’s ProtoWallet byte for byte on shared test vectors. It is an app: a skein that needs no wallet doesn’t install one.

SPV and headers

The anchor is the network’s genesis header, a constant. Every header must link, meet its proof-of-work target and carry the most work. Difficulty adjustment and timestamps aren’t checked, by decision. A payment validates synchronously or fails. A signing-only wallet needs no headers; the full chain (~72 MB) lives only in an instance fed by a header service. Chronicle rules are on by default.

The chain app

One app holds the chain state (headers, transactions, proofs, spends, broadcasts) under chain/, and nothing else writes it. Its interface is ingest a BEEF. What arrives proven (its proofs check against the headers) is recorded and the caller answered at once. What arrives unproven is recorded and broadcast, and the caller is answered on each change: accepted, proven, rejected. Every unproven transaction it holds has a broadcast registered, so the proof is the answer to that broadcast. Headers from a feed and proofs from the broadcaster come in as plain events and validate themselves inside. Status reports come from the Arcade the skein broadcast to, and stay provisional until there’s a proof. The chain app is the only thing that broadcasts, and the host judges nothing.

Settlement

Unproven, proven or rejected is computed, never stored. Rejection bubbles through spends edges; reorgs revert proofs. Settlement is state to read, not an event to push. Threads fork, they don’t replay: a rejection reaches a thread as a new input, and history stays.

Overlays are apps

An overlay is the overlay engine (shruggr/skein-overlay) plus its own topic managers and lookup services, installed under one name, with its wiring derived from config.overlay and shown to the owner at install. It serves BRC-22/24 at its base URL /<handle>/<app> (/submit, /lookup, open). Submit decodes the BEEF once into the step’s write cache, hands it to the chain app, and asks topic managers identify(tx: cid, …). Nothing persists unless a topic admits, apart from the request itself; otherwise it answers 200 with an empty STEAK. A transaction is admitted on the first of an accepted status or a validated proof. Lookup services keep their own maps and get admitted/spent/rejected hooks. Each overlay keeps its state under its own name, so two overlays can run on one skein.

The @bsv/sdk broadcaster and resolver work against an overlay at an origin’s root, but they reject a base URL with a path, so skein does not use them for overlay apps.

Technical

Genesis and deployment

An instance’s first log entry, its genesis, names who it is and the tree it boots from. Everything after is a consequence of that entry and the ones that follow.

The system tree

bin/<name>.wasm | .cid | .json   programs
etc/config.json                   defaults, names, feeds, owner, libp2p, scopes
etc/dispatch.json                 rows: box | HTTP path | libp2p topic → program
etc/reads.json                    who may call read routes
SOUL.md, IDENTITY.md, skills/…    the instance's own files

Booting pre-fills the store and writes a genesis naming the tree; processing it sets head main and seeds the dispatch table: the owner’s four admin rows first, then the tree’s. The genesis also fixes the owner, the default limits, the owner’s mailbox and the providers in the address book. A genesis can be bare: the owner’s admin rows and nothing else, with every app installed on top.

Two sources, one loader

  • A directory, scanned into git objects, or a tree CID already in a store.
  • A chain packet: a BEEF bag plus a scope CID, verified offline for scope, hashes, completeness and, optionally, chain inclusion. Carriers are OP_FALSE OP_RETURN outputs with ordfs/dir (a gib directory manifest) or ordfs/patch. A gib commit and a clone of it yield the same store.

Released apps and snapshots are deployed on chain as Bitcoin transactions, so a genesis or an install can point at an outpoint as well as a git commit.

Checkpoints

A packet whose scope is a skein-state record is a checkpoint. It restores onto an empty store without rebuilding the index, as long as it runs under the same identity. A checkpoint of a skein with the shell app is ~88 MB, because it includes the shell and Python.

Deploying files vs booting

Booting sets up a new store. Deploying sends files into a running instance: an agent’s SOUL.md, IDENTITY.md and skills/ go in as an ordinary signed message from the owner to the kernel’s objects operation.

Installing an app

An app is a tree with etc/app.json: its programs, its configuration, what it provides and requires, the dispatch rows it asks for, and optional start and stop messages. skein-host install <repo | dir> --instance <handle> checks it and reads the rows aloud. Once the owner approves, it sends four kinds of admin message: objects (the tree and program records), head (<app>/app → the app record), dispatch (one per row; web paths under /<app>/), then start. An app writes only heads under its name. Uninstall sends stop and removes its rows. A set of apps that go together installs the same way, one app at a time.

Upgrades

An app upgrades by being installed again. Its state is kept, and rows the new version no longer asks for are removed. A change to the kernel’s log format (format 8) means a new store: older formats are refused, not migrated.

Technical

What is built

Status by area, as of 1 October 2026 (log format 8). “Built” means merged, with tests. This is the one page that says what is built; the rest of the site describes the design.

Kernel

built Zig kernel on wasmtime, both ABIs, fuel, fuel clock, deterministic random, replay, MST index, single state record, browser build, the four tables (objects, heads with owners, the dispatch table, the address book), admin operations in the kernel, write scope by app name. not yet Pruning; components in the browser build; js-libp2p in the browser, with our bootstrap nodes.

Userland

built Shell and tools, git, JavaScript, Python. not yet tar/gzip, packages, streaming pipes.

Network

built Front door stepped on every request, sessions as records, the dispatch table, mailbox instances, messagebox, address book, discovery, emit and providers (web proxy, waker, cron, libp2p, status), delivery threads, libp2p on every transport, overlay gossip. not yet Any authenticated HTTP endpoint as a recipient (#82); status reports signed by Arcade itself (the host relays them today).

Wallet and chain

built Signer interface, wallet program, SPV, sparse proofs, settlement, broadcast as an event, the chain app (ingest a BEEF, broadcast, an answer on each change). in progress The wallet under its own name, reading the chain app (#79). not yet Header catch-up, proofs on demand, certificates, payments carried on messages.

Overlay

built Overlays as apps, topic managers and lookup services on CIDs, libp2p gossip. in progress Each overlay’s state under its own name, two overlays per skein, the chain app as its proof check (#79). not yet SHIP/SLAP, GASP.

Apps

built Manifest, install and uninstall with approval, the app record under <app>/app, start/stop, the SDK’s app.serve; apps in their own repositories (static, overlay, chain). in progress Manifests in the dispatch-row shape (#79). not yet The shell and the chat app as two apps (#83); a genesis that states the capabilities it needs (#81); a bare genesis with every app installed on top.

Inference

built Inference peer, context deltas, turn records, tool steps. not yet Forking UI, the graph as a tool for the model, budgets.

Deployment

built System trees, reading chain packets, checkpoints, app upgrade by reinstall. not yet Publishing apps and snapshots on chain, booting or installing from an outpoint or a commit ID.

Graph ops

built Heads, git branches and merges, conversation parents, checkpoint restore. not yet Forking or merging whole instances.

Latest suites (main 2e55aa2): kernel 35/35, npm 155/155, equivalence all ok (18/18 histories identical, browser replays included). The tracker is issue #31.