THUNDER / BUILT FOR AI
The database for AI
context, state, and results.
Give your application fast access to the data it needs again. Store large values, route each key to its owning core, and keep acknowledged writes through restarts.
Self-hosted on your infrastructure. Check requirements
- Read substantial records by key
- Keep a context bundle or serialized result in one value. For 512 MiB values, configure a 4 GiB arena per reactor and allow headroom for concurrent work.See memory sizing
- Route work to the owning core
- The client sends each key directly to the reactor that owns its shards and memory. Request execution stays local to that owner.Explore key routing
- Keep acknowledged writes through restarts
- Each write’s journal record reaches disk before acknowledgement. Your application can retrieve saved context, state, and results after restarting.Read the durability model
messages/session-042/001summaries/session-042/004sources/case-018/v2Your application reloads the saved messages and continues the conversation.
CONVERSATION HISTORY
Continue with the history you saved.
Keep conversation records beyond a single request. Fetch messages, summaries, or attachments by key when the next request arrives; your application chooses what to send to the model.
Try a conversation recordMessage ordering, context selection, and access stay in your application.
Implementation notes
Store messages individually or in bounded batches. Keep conversation ordering and references in application-managed metadata. Key names are identifiers; they do not create a searchable conversation index.
Generate summaries in your application or model, then store the result. Your application handles concurrent writers, authorization, retention, and deletion. Thunder does not provide automatic TTL expiry.
View the write/read example ↗AGENT STATE
Carry work across
steps and workers.
Give the next worker a saved point to continue from. Write the checkpoint and tool-result references, then retrieve that revision when your application resumes the task.
- 01 / WORKER A
Save the checkpoint.
Write revision 003 with the next step and references to the tool results.
set(key, checkpoint) - 02 / THUNDER
Journal, then acknowledge.
The write’s journal record reaches disk before the client receives acknowledgement.
The application can now pass the key. - 03 / WORKER B
Read the saved revision.
Retrieve the checkpoint, validate it, and let the application choose the next action.
get(key)
agents/run-007/rev-003validate_batchTool-result reference tools/run-007/resultsThunder stores the checkpoint. Your application controls scheduling, retries, and recovery.
Write a checkpointImplementation notes
Write a versioned checkpoint and wait for acknowledgement before passing its key to the next worker. Your application controls restoration, scheduling, concurrent writers, and retry behavior.
RAG SOURCES
Retrieve the source
behind an answer.
Your retrieval layer finds the relevant identifiers. Thunder returns the matching source content—records, transcripts, code, or documents—so your application can assemble the model’s context.
Search and ranking stay in your retrieval layer.
sources/case-018/v2Customer reported a delayed export after importing a large collection of records.
Retrieved by key.
Selected as context by your application.
sources/call-009/v1“The export finished, but the completion notification never arrived.”
Retrieved by key.
Selected as context by your application.
sources/code-011/v3await writeExport(records); await notifyUser(exportId);
Retrieved by key.
Selected as context by your application.
Keep source content and versions available independently of how your application searches.
Store a source recordImplementation notes
Keep stable source identifiers and versions in your retrieval index. After relevance selection, fetch the matching objects from Thunder and assemble only the context your model needs.
Keep index updates, source updates, and deletion coordinated in your application. Storing embedding bytes does not provide vector similarity search. Your application handles authorization, provenance, and context selection.
Connect your retrieval application ↗GENERATED OUTPUTS
Use the result again.
Quarterly report
Quarterly report ready for review.
results/run-007/reportA later request reads the saved report.
No new generation is needed while the result remains valid.
Retrieve an existing output when it is still valid, instead of generating it again. Store reports, generated media, embedding bytes, and serialized batches for later requests or other workers.
- 01Generate and store the result.
- 02Keep its key with the application record.
- 03Read the saved output when it is needed.
Your application decides when a result is still valid and when to replace or delete it.
Implementation notes
A SET needs two in-arena copies of its value. Budget resident arena RAM, process overhead, network transfer, and disk capacity for the size and concurrency of your actual workload.
Wait for acknowledgement before giving the next worker the output key. Media processing, tensor operations, GPU transfer, scheduling, and object deletion remain application responsibilities.
Plan memory and storage ↗CONNECT YOUR APPLICATION
Run your first AI storage example.
Start a server, connect a client, and read back the record you wrote.
Set up Thunder- 01 / START THUNDER
Run it on your infrastructure.
Linux kernel 6.8+, Docker Compose v2, and 4 GiB of arena RAM plus overhead for the default setup.
Requirements & setup - 02 / CONNECT A CLIENT
Choose Python or Node.js.
Install the client below. Run from your release-kit directory using the CA file created during server setup.
Client documentation - 03 / WRITE & READ
Check the returned record.
The code compares the returned bytes, checks the record schema, and prints the selected field.
Verify the server first
Save a generated report, then retrieve and check its contents.
Complete Python example
Run from your configured release-kit directory after starting Thunder. The CA file must match your server.
pip install thunderstrikeimport json
from thunderstrike import Thunderstrike
with open("docker/tls/ca.crt") as ca:
ca_pem = ca.read()
db = Thunderstrike(
"127.0.0.1:7380",
tls_server_name="localhost",
tls_ca_pem=ca_pem,
)
key = b"results/run-007/report"
snapshot = {
"schema": 1,
"format": "text/plain",
"content": "Quarterly report ready for review."
}
payload = json.dumps(snapshot).encode("utf-8")
db.set(key, payload)
stored = db.get(key)
if stored != payload:
raise RuntimeError("Stored bytes did not match")
state = json.loads(stored)
if state.get("schema") != 1:
raise ValueError("Unsupported record schema")
print(state["content"])Complete Node.js example
Run from your configured release-kit directory after starting Thunder. The CA file must match your server. Save the example as an ES module (.mjs).
npm install @shortsqueeze/thunderstrikeimport { readFileSync } from "node:fs";
import { ThunderstrikeClient } from
"@shortsqueeze/thunderstrike";
const db = await ThunderstrikeClient.connect({
endpoints: ["127.0.0.1:7380"],
tlsServerName: "localhost",
tlsCaPem: readFileSync("docker/tls/ca.crt"),
});
const key = Buffer.from("results/run-007/report");
const snapshot = {
"schema": 1,
"format": "text/plain",
"content": "Quarterly report ready for review."
};
const payload = Buffer.from(JSON.stringify(snapshot));
await db.set(key, payload);
const stored = await db.get(key);
if (!stored || !stored.equals(payload)) {
throw new Error("Stored bytes did not match");
}
const state = JSON.parse(stored.toString("utf8"));
if (state.schema !== 1) {
throw new Error("Unsupported record schema");
}
console.log(state.content);Quarterly report ready for review.After you run the example against your server.
Generated outputs example selected. The complete code is ready to copy.
Your application manages indexing, concurrent writers, access, and record lifecycle.