___________________________________________________________________________
/ \
| โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ |
| โ โโโโโโ โโโโโโ โโโโโโโโโโโโโโโโโโ โโโโโโโ โโโ โโโ โ |
| โ โโโโโโ โโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ |
| โ โโโโโโ โโโโโโโโโโ โโโโโโ โโโโโโโฆโโโโ โโโ โโโโโโ [ EST. 76 ] โ |
| โโโ โโโโโโ โโโโโโโโโโ โโโโโโ โโโโโโโโโโโ โโโ โโโโโโ โ |
| โโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโฆโโโโโโโโโโโโโโ โโโ โ |
| โ โโโโโโ โโโโโโโ โโโ โโโโโโโโโโโโโโโโโโ โโโโโโโ โโโ โโโ โ |
| โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ |
| ========================================================================= |
| โ
24-HOUR DETERMINISTIC AGENT RUNTIME โข ACID SANDBOX โข TIME-TRAVEL โ
|
\___________________________________________________________________________/
|| ||
โโโโโโโโโโโโโโ "DROP THE NEEDLE ON ANY FRAME" โโโโโโโโโโโโโโ
[ ๐๏ธ NOW PLAYING ON TRACK #01 ]
Stop letting autonomous agents trash your production database and burn $400 in runaway loops. JUKEBOX records every LLM prompt, token stream, MCP tool call, and filesystem mutation onto a cryptographic vinyl tape (.jbx)โgiving your agents BEGIN / COMMIT / ROLLBACK semantics and <1ms zero-cost time-travel replay.
Modern agent frameworks (LangGraph, AutoGen, CrewAI, OpenAI Agents SDK) are great at orchestrating prompts, but they treat side effects as fire-and-forget. When a 15-step agent workflow hallucinates on Step 12 after mutating three SQL tables and five local files on Step 8, "checkpointing the chat history" won't save you.
JUKEBOX (architected by Marius Carlsson) is a systems-level runtime written in Rust with Python bindings that brings database-grade ACID transactions and deterministic vinyl replay to any AI agent stack:
| Menu Item | What Goes In The Booth | Why Platform Engineers Love It |
|---|---|---|
| ๐ฟ Vinyl CAS Flight-Recorder | Every LLM request, streaming chunk, seed, tool input/output, and clock tick is hashed via BLAKE3 /BLAKE2b into a portable.jbx tape. |
Rewind & Replay 50-step agent runs in 0.4ms offline at**$0.00 API cost** . Share a failed.jbx file in a GitHub Issue like a core dump. |
| ๐ก๏ธ Shadow Booth (ACID Tool Sandbox) | Intercepts local file writes, shell commands, SQL queries, and Anthropic MCP calls inside a Copy-on-Write (CoW) WASI staging layer. | Side effects only hit the real world when your verifier calls tx.commit() . If an agent fails a safety check,tx.rollback() leaves zero trace. |
๐๏ธ Time-Travel Forking (Track B-Side) |
Drop the needle at Frame #9 of a failed production trace, swap gpt-4o forclaude-3-7-sonnet or tweak a system prompt, and resume. |
Steps 1โ8 resolve instantaneously from the Merkle tape; only Step 9+ hits the live network. Diff both timelines side-by-side. |
| ๐จ Anti-Skip Needle (Loop Circuit-Breaker) | Streaming semantic similarity & AST-diff monitor that watches inter-agent chatter and token burn velocity. | Automatically trips the breaker when two agents enter a polite recursive death spiralโsaving your cloud budget before the pager fires. |
git clone https://github.com/socrates6969/jukebox-os.git
cd jukebox-os
pip install -e .
python
import asyncio
from jukebox import Jukebox, SandboxPolicy, CircuitBreaker
jb = Jukebox(
tape_dir="./tapes",
sandbox=SandboxPolicy(filesystem="copy_on_write", mcp_mode="staged_acid"),
breaker=CircuitBreaker(max_cost_usd=0.50, max_semantic_repeat=3),
)
@jb.track(name="invoice-reconciliation-agent")
async def run_accounting_agent(customer_id: str, amount_usd: float) -> dict:
async with jb.transaction(tape_id="tr_8f92a1c4") as tx:
tx.record_agent_turn(
agent_name="planner",
message=f"Staging refund of ${amount_usd} for {customer_id}",
model="gpt-4o",
cost_usd=0.008,
)
tx.stage_file_write(
path="./tapes/staged_ledger_demo.json",
content=f'{{"customer": "{customer_id}", "refund_usd": {amount_usd}}}',
)
if amount_usd > 500.0:
await tx.rollback(reason="Refund exceeds $500 autonomous threshold")
return {"status": "ROLLED_BACK", "tape_id": tx.tape_id}
await tx.commit()
return {"status": "COMMITTED", "tape_id": tx.tape_id}
if __name__ == "__main__":
print(asyncio.run(run_accounting_agent("cust_9981", 420.00)))
python
from jukebox import Tape
tape = Tape.load("./tapes/tr_8f92a1c4.jbx")
b_side = tape.fork(
at_frame=3,
override_model="claude-3-7-sonnet-latest",
override_system_prompt="You are a strict SQL auditor. Never issue DELETE without a WHERE clause.",
)
print(b_side.replay_and_diff().to_markdown())
+-----------------------------------------------------------------------------------+
| APPLICATION & ORCHESTRATION LAYER |
| [ LangGraph ] [ CrewAI ] [ AutoGen ] [ OpenAI / Anthropic SDK ] |
+-----------------------------------------+-----------------------------------------+
| @jukebox.track / MCP Proxy
v
+-----------------------------------------------------------------------------------+
| ๐ JUKEBOX RUST CORE RUNTIME (libjukebox) ๐ฎ |
| |
| +-------------------------+ +-----------------------+ +---------------------+ |
| | ANTI-SKIP NEEDLE | | BLAKE3 MERKLE CAS | | OTEL GEN_AI | |
| | โข Cosine Loop Breaker | | โข Zero-Cost Replay | | EXPORTER | |
| | โข Token Budget Gate | | โข .jbx Binary Tape | | โข Spans & Metrics | |
| +-------------------------+ +-----------------------+ +---------------------+ |
| |
| +-----------------------------------------------------------------------------+ |
| | SHADOW BOOTH: TRANSACTIONAL WASI & CoW SANDBOX | |
| | [ Virtual CoW Filesystem ] [ SQL Savepoint Proxy ] [ MCP Stage Gate ] | |
| +--------------------------------------+--------------------------------------+ |
+-----------------------------------------|-----------------------------------------+
|
+--------------------+--------------------+
| |
[ VERIFIER PASSES ] [ VERIFIER FAILS ]
| |
v v
( ATOMIC WORLD COMMIT ) ( INSTANT ZERO-RESIDUE )
Writes flushed to Disk/API ROLLBACK & ALERT
bash
$ jukebox ls --tape-dir ./tapes
๐ JUKEBOX 24-HOUR FLIGHT RECORDER // LOCAL BOOTH TAPES ๐ฎ
------------------------------------------------------------------------------
TRACK ID AGENT NAME FRAMES COST STATUS
------------------------------------------------------------------------------
tr_8f92a1c4 invoice-reconciliation-agent 5 $0.0080 COMMITTED
$ jukebox replay ./tapes/tr_8f92a1c4.jbx
| Metric | Raw Framework (No Sandbox) | Docker Container Per Run | ๐ JUKEBOX Runtime |
|---|---|---|---|
| Runtime Interception Overhead | 0.00 ms (Baseline) |
+1,420.0 ms (Cold boot) |
+0.34 ms per frame |
| Replay Steps 1โ15 (Time-Travel) | 38,400 ms (Re-runs APIs) |
39,800 ms (Re-runs APIs) |
0.41 ms (93,000x faster) |
| API Cost on 10x Debug Replays | $1.84 |
$1.84 |
$0.00 (100% CAS Hit) |
| Side-Effect Rollback Latency | โ Impossible (Manual cleanup) | 640 ms (Container teardown) |
0.19 ms (CoW pointer drop) |
| Runaway Loop Detection | โ Only after max_iterations |
โ Only after max_iterations |
0.18 ms (Semantic AST trip) |
- Fork the Repo & Pull Up a Stool:
git clone https://github.com/socrates6969/jukebox-os.git
cd jukebox-os
pip install -e . pytest
pytest -v
- House Rules (Code of Conduct): Read ourCODE_OF_CONDUCT.md andCONTRIBUTING.md .