Your application needs somewhere to put its working data. Start an S3 test endpoint without Docker, keep an agent's files, or save an edit without a connection. Stow supplies local object storage, file history and portable checkpoints. Embed it in Go or WebAssembly, or connect your S3 client to a native endpoint.
Start S3 for a test, keep files beyond a disposable task, or work with local data when the network drops.
01 / CI & integration tests
CI is waiting for a storage container.
A test needs to upload a file. First comes Docker setup, an image pull, service startup and a readiness check. Storage adds another service to start, wait for and tear down on the runner.
With Stow Start the packaged native process from your test. The helper handles readiness and cleanup, with a private bucket for each run. No Docker daemon or storage image required.
An agent edits files on a disposable machine. Before that machine goes away, you need to keep the result, inspect what changed, and move saved work to the next host.
With Stow Prepare a task workspace, checkpoint its files, and export a verified archive before cleanup.
Start S3 from your test, save an agent workspace, edit locally in the browser, or cache upstream objects. Open a walkthrough to see what Stow changes and how to set it up.
CI & integration testsStart S3 from the test. Skip the Docker setup.
The problem Your CI job needs an S3 endpoint before the tests can start. Pulling a storage image, starting its container, wiring the service, waiting for readiness and cleaning it up all add setup work and startup time to the job.
With Stow Use the native binary included with the npm package. withStow starts a loopback endpoint, waits for readiness and cleans up after the callback. Your test uses a real S3 client without a Docker daemon, storage image or CI service definition.
A native process, a ready client, automatic cleanup
The session starts the packaged server on loopback and waits until it is ready. Store an artifact, read it back, and let the callback clean up—even if it throws. Each run also gets a private bucket and generated credentials, so parallel tests can use the same object keys. Pass s3 and bucket to your application's storage code.
TypeScript creates the bucket automatically. Python creates it explicitly. Go uses an embedded object runtime without an HTTP server.
Setup: install the TypeScript package from npm with its native binary. Python uses a source checkout. A session is a separate server process, isolated from your cloud environment and bounded by its own quota.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40"""Store an artifact in a disposable S3 bucket and read it back.
make build
export STOW_BIN="$PWD/bin/stow-s3"
python examples/stow-recipes/start_small.py
The application code takes an S3 client and a bucket and does not know Stow
exists. Only the ``with_session`` block is Stow-specific. A Python session
starts a private loopback server and cleans it up; it does not create a bucket,
so the example names one and creates it.
"""import json
from stow_s3 import with_session
defpublish_report(s3, bucket, report):
"""Ordinary application code: any S3 client and bucket will do."""
s3.put_object(
Bucket=bucket,
Key="reports/latest.json",
Body=json.dumps(report).encode(),
ContentType="application/json",
)
response = s3.get_object(Bucket=bucket, Key="reports/latest.json")
try:
return json.loads(response["Body"].read())
finally:
response["Body"].close()
report = {"service": "checkout", "ok": True, "duration_ms": 128}
with with_session() as session:
s3 = session.s3_client()
bucket = session.new_bucket_name()
s3.create_bucket(Bucket=bucket)
print("stored reports/latest.json:", json.dumps(publish_report(s3, bucket, report)))
s3.close()
Create your bucket explicitly · cleanup on exit Python API ↗
Go · embedded runtime
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50// Store a report in an embedded object runtime and read it back.//// go run ./examples/stow-recipes/go/start-small//// This is the embedded Go runtime: it stores objects in process with no HTTP// server and no S3 client. Use a scoped TypeScript or Python session when the// application already speaks S3.package main
import (
"context""encoding/json""fmt""log"
stow "github.com/chester-hill-solutions/stow-s3/pkg/stow"
)
funcmain() {
if err := run(); err != nil {
log.Fatal(err)
}
}
funcrun()error {
ctx := context.Background()
store, err := stow.Open(stow.Options{Backend: stow.BackendMemory})
if err != nil {
return err
}
defer store.Close()
if err := store.CreateBucket(ctx, "reports"); err != nil {
return err
}
report := map[string]any{"service": "checkout", "ok": true, "durationMs": 128}
body, err := json.Marshal(report)
if err != nil {
return err
}
if _, err := store.PutObject(ctx, "reports", "latest.json", body, stow.PutOptions{ContentType: "application/json"}); err != nil {
return err
}
object, err := store.GetObject(ctx, "reports", "latest.json")
if err != nil {
return err
}
fmt.Println("stored reports/latest.json:", string(object.Data))
returnnil
}
Name a data directory and the objects survive the session. The server stops; the directory is yours; the next session on it reads what the previous one wrote.
keep-artifacts.mjsTypeScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34// Keep the artifacts: the same round trip, but the objects outlive the session.//// make build// STOW_BIN=./bin/stow-s3 node examples/stow-recipes/keep-artifacts.mjs ./artifacts//// The only change from start-small.mjs is naming a data directory and a bucket:// withStow(...) becomes openStow({ dataDir, bucket }). A named directory selects// the filesystem backend, so the bytes survive close, and a fixed bucket name// lets the next session find them.import { GetObjectCommand, PutObjectCommand } from"@aws-sdk/client-s3";
import { openStow } from"@chester-hill-solutions/stow-s3";
const dataDir = process.argv[2] ?? "./artifacts";
const bucket = "artifacts";
// First session: write the artifact, then stop the server.const first = awaitopenStow({ dataDir, bucket });
await first.s3.send(newPutObjectCommand({
Bucket: bucket,
Key: "notes/design.md",
Body: "# Design\n\nFirst draft.\n",
ContentType: "text/markdown",
}));
await first.close();
console.log(`wrote ${bucket}/notes/design.md; server stopped`);
// Second session on the same directory: the caller-owned data is still there.const second = awaitopenStow({ dataDir, bucket });
const stored = await second.s3.send(newGetObjectCommand({
Bucket: bucket,
Key: "notes/design.md",
}));
console.log("read back after reopen:", JSON.stringify(await stored.Body.transformToString()));
await second.close();
One option changes memory-backed scratch into filesystem storage. Pass a fixed bucket so the reopened session finds the same objects.
Re-run a processing stage
Workers read input objects by key and write results. Keep both and a stage can be inspected or rerun. Your application owns the queue and the retries; Stow is not a durable job queue.
processing-stage.mjsTypeScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24// One unit of work: read an input key, write its result under results/.asyncfunctionclassifyOne(s3, key) {
const source = await s3.send(newGetObjectCommand({ Bucket: bucket, Key: `inputs/${key}` }));
const category = categorize(await source.Body.transformToString());
await s3.send(newPutObjectCommand({
Bucket: bucket,
Key: `results/${key}.json`,
Body: JSON.stringify({ input: key, category }),
ContentType: "application/json",
}));
return`${key} -> ${category}`;
}
// The application builds the queue and runs two workers over it. Stow does not// schedule this or retry it; if a worker fails, the application retries the key.asyncfunctionrunWorkers(s3, keys) {
const queue = [...keys];
constworker = async () => {
for (let key = queue.shift(); key !== undefined; key = queue.shift()) {
console.log(awaitclassifyOne(s3, key));
}
};
awaitPromise.all([worker(), worker()]);
}
A conditional write compares the ETag you read with the object's current ETag and refuses the write if they differ, so two writers cannot clobber one another. A create-only write is refused when the store cannot confirm the object is absent, so it never replaces bytes it could not read.
conditional-write.mjsTypeScript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56// Reject a stale update: overwrite only the version you actually read.//// make build// STOW_BIN=./bin/stow-s3 node examples/stow-recipes/conditional-write.mjs//// A conditional write compares the object's current ETag with the one you pass// and refuses the write if they differ. Two writers can read the same version;// the second update is rejected instead of silently overwriting the first.import { GetObjectCommand, PutObjectCommand } from"@aws-sdk/client-s3";
import { withStow } from"@chester-hill-solutions/stow-s3";
awaitwithStow(async ({ s3, bucket }) => {
const created = await s3.send(newPutObjectCommand({
Bucket: bucket,
Key: "config.json",
Body: '{"version":1}',
}));
// The first writer updates the version it read.await s3.send(newPutObjectCommand({
Bucket: bucket,
Key: "config.json",
Body: '{"version":2}',
IfMatch: created.ETag,
}));
// The second writer still holds the original ETag, so its update is refused.// The refusal has to be the precondition failure and not some other error:// a request that failed for another reason has proved nothing about the// write it was supposed to make.let rejection;
try {
await s3.send(newPutObjectCommand({
Bucket: bucket,
Key: "config.json",
Body: '{"version":3}',
IfMatch: created.ETag,
}));
} catch (error) {
rejection = error;
}
if (!rejection) thrownewError("the stale update was accepted");
if (rejection.name !== "PreconditionFailed" && rejection.$metadata?.httpStatusCode !== 412) {
throw rejection;
}
console.log("stale update rejected:", rejection.name, rejection.$metadata?.httpStatusCode);
// The version that was saved is still the one that is stored. A refusal is// only worth anything if the object it refused to replace is intact.const stored = await s3.send(newGetObjectCommand({ Bucket: bucket, Key: "config.json" }));
const retained = await stored.Body.transformToString();
if (retained !== '{"version":2}') {
thrownewError(`the stored object is ${retained}, want the version that was saved`);
}
console.log("retained:", retained);
});
Agent workspacesKeep the result when the checkout is gone.
The problem An agent's changes live in a task directory, alongside inputs and generated files. Deleting the checkout or replacing the host can discard the files needed to review or continue the work.
With Stow Declare the inputs, prepare a workspace, pause its writers and capture a checkpoint. Export the saved files before disposal. Your host still owns agent execution, permissions and restart.
1. Declare the task checkout
In a fresh directory, save this as task.json. Git fetches the URL first; Stow resolves the local clone's HEAD and prepares a separate detached checkout.
Your host starts the agent in the returned working directory and controls its process permissions. Expiry requires a collection call; it does not delete the workspace automatically. Git input limits and cleanup.
2. Fetch and prepare
Replace the URL and branch. These commands use Git, Stow, and jq to read the returned IDs.
prepare.shShell
1
2
3
4
5
6git clone --depth 1 --branch main \
https://github.com/your-org/your-repo.git source-repo
mkdir -p tasks
stow-s3 workspace prepare --manifest task.json > task-ready.json
jq -r .working_directory task-ready.json
# Run your agent in that directory.
3. Save the result, then dispose
Stop the agent's writers, then checkpoint and export before cleanup. The archive is kept; the task directory and its internal checkpoints are removed.
Browser editingSave locally. Sync when you choose.
The problem A user keeps editing after the connection drops. Sending every save straight to the server leaves the app to handle unsent edits, local history and a remote file that may have changed.
With Stow Save file stages locally and keep undo/redo available. Sync a selected stage when connected; a changed remote version is reported as a conflict for your app to resolve.
Edit offline, then sync a saved stage
This is a simulation: data stays in this tab, and reload clears it.
Run the demo below to try WASM, IndexedDB, and S3.
Switch offline.
Edit and save a stage.
Undo or redo.
Reconnect, then sync.
1 retained stage
Simulated remote object
Pending file0
After reconnecting, choose Sync to publish the selected stage.
The initial stage matches the simulated remote.
Run the real browser demo
WASM, IndexedDB, offline reload, undo/redo, explicit sync, and remote conflicts.
A private local S3 fixture supplies the remote.
The real file-history API retains whole-file stages; project revisions share unchanged content. Browsers can evict local storage. Sync detects remote conflicts; your app chooses how to resolve them. Limits and recovery.
Local read cacheRead retained files when upstream is unavailable.
The problem A local tool needs objects from S3 to do its work. Without a retained copy, an upstream outage or a disconnected host turns a read into a blocked task.
With Stow Fetch through a filesystem cache or prewarm specific keys before going offline. Cached objects remain available within the cache's limits and TTL; an uncached key still needs upstream.
1. Start the disk cache
Install the native server, configure upstream credentials in your environment, and replace the endpoint and bucket below. These demo credentials are for the local endpoint.
The disk layer retains up to 2 GiB with a 24-hour TTL. Stow revalidates cached objects online. Offline reads require retained bytes. Upstream credentials and offline setup.
2. Put a small memory cache in front
Install @aws-sdk/client-s3 and lru-cache. Save this as read-assets.mjs and run it with Node. Replace the image key with an object already in your upstream bucket.
The app owns the memory cache. Its byte budget counts retained payloads, not total process memory. Use versioned keys or invalidate memory entries when content changes.
The next machine needs more than a Git checkout.
An unfinished task can include input data, generated files and edits that were never committed. Capture those files in a checkpoint, export a verified archive, and adopt it into a new workspace.
Call the object engine directly from Go, Node or a compatible WebAssembly host. Embedded API →
Native S3
Use familiar SDKs with memory or filesystem storage. Conditional requests, multipart uploads and presigned URLs. S3 compatibility →
Browser projects + workers
Shared content, atomic revisions, range reads and bounded streams over durable browser storage. Workers and streams →
S3 read-through cache
Fetch upstream objects, prewarm keys and use retained bytes offline. Select run-through explicitly. Cache guide →
Embedded runtime defaults: 64 MiB and 10,000 objects. Scoped sessions have their own limits; read your instance's capabilities. Stow manages storage; your host owns execution and sandbox enforcement. The native service supports development and controlled private deployments. Supported operations and limits.
Measured on Railway
Agent storage, measured.
Stow, MinIO, S3Proxy and RustFS: compare S3 server startup, first write, transfer, quarantine and memory.
Development snapshot2026-10-19
Ready to work
Median · whiskers show observed range
ms↓ Lower is better
Stow28.1125.28–41.63
RustFS124.284.57–196.7
MinIO248.5218.8–538
S3Proxy1,0201,003–1,138
01,0002,000
Time to first write
Median · whiskers show observed range
ms↓ Lower is better
Stow44.4136.42–63.76
RustFS180.3154.6–251.4
MinIO263.4231.5–558.5
S3Proxy1,1291,095–1,237
01,0002,000
Fresh S3 server processes with empty data directories. Startup ends on authenticated readiness; first write includes bucket creation and a 4 KiB PUT over target loopback. Nine launches per product; 10 ms readiness polls. Images and binaries are already present. This measures storage server startup, not an agent’s full startup.
AMD EPYC 9655P 96-Core Processor. One target at a time; separate generator. Each S3 server uses the same resource ceilings and client workflows. Filesystem and memory backends are compared separately. Bars use a linear scale from zero; ranges describe observed samples.
These peers expose S3-shaped blob storage. The workloads exercise bucket creation, PUT, GET and DELETE; they do not establish full S3 feature parity. Durability guarantees differ: Stow filesystem publishes with rename and fsync; S3Proxy’s filesystem adapter differs; RustFS uses one drive with strict durability.
These are exploratory development measurements. Image downloads, deployments, browser startup, cold OS caches, real scanners, flagged-file promotion, replication and failover are unmeasured. Some target runs reach the CPU ceiling; the fixed generator and concurrency can also constrain rates.
Free and open source. Install the TypeScript client and its matching native binary from npm (0.4.4), or get the v0.4.4 native downloads from GitHub Releases. See the v0.4.4 release notes. Linux and macOS on x64 and ARM64 are supported. The Go module is published. The Python client is not yet published to PyPI; use a source checkout for Python.
Add the TypeScript client
npm install @chester-hill-solutions/stow-s3@0.4.4
Add the Go module
go get github.com/chester-hill-solutions/stow-s3/pkg/stow
No daemon, no root, loopback-only, one data directory.
A committed save survives a killed process (0.4.3): workspace resume
reopens the work. Run the corpus against your own adapter.