Synapse Cell
Receipted Wasm execution for bounded AI-generated logic.
151.8× lower p50 latency than E2B on the latest AX102 simple eval run. Cryptographic receipts. Self-hosted. Canadian-built.
Cell is a WebAssembly-native sandbox for executing bounded AI agent tool calls: eval functions, policy gates, reward functions, and small generated logic. While Firecracker-based sandboxes give agents a full Linux computer, Cell focuses on fast Wasm execution with a receipt you can verify after the fact.
Why it exists: Canadian AI builders and automation teams need a way to show clients what an agent executed. Cell returns a SHA-256 receipt for every execution so you can recompute whether the returned fields were modified.
pip install "synapserun[local]"
synapse doctorInstalled proof path:
pip install "synapserun[local]"
synapse doctor
synapse demo assurancesynapse doctor checks that the installed native local backend is current enough to return receipt-bearing execution results. The demo then runs a bounded policy gate locally, verifies the receipt, rejects a tampered receipt, and replays the receipt bundle.
from synapse.cell import Cell
cell = Cell(api_url="local")
result = cell.run("print(2 + 2)")
print(result.stdout) # '4\n'
print(result.latency_ms) # ~1-2ms on the AX102 fast path
print(result.receipt) # CellReceipt(receipt_hash='a4f2...')
print(result.receipt.verify())
cell.kill()Zero configuration. No Docker. No API key. The Wasm runtimes ship inside the wheel.
# Before:
# from e2b_code_interpreter import Sandbox
# After:
from synapse.e2b_compat import Sandbox
sbx = Sandbox(api_url="local")
result = sbx.run_code("print('hello')")
print(result.stdout) # 'hello\n'Measured head-to-head against live E2B API. Rerun the benchmark before using the number in a launch or sales claim.
| Workload | Cell p50 | Cell p99 | E2B p50 | Speedup (p50) |
|---|---|---|---|---|
| Simple eval (print, arithmetic) | 1.334ms | 7.7317ms | 202.559ms | 151.8× |
| Math heavy (10K loop sum) | 1.1873ms | 55.3216ms | 196.8904ms | 165.8× |
| File I/O (100KB write/read, deep probe) | 68.5863ms | 130.7224ms | 197.5103ms | 2.9× |
| Memory per sandbox | ~1 MB | — | ~133 MB | Separate density claim |
Methodology: 100 runs, 10 warmup discarded, --sandbox-timeout-secs 3600. Latest canonical live E2B comparison: 2026-05-15 on AX102 at commit b9e6eb1f639599d1da02cbf00a035528c7886303. Cell via local release-mode PyO3 path; E2B via e2b-code-interpreter SDK Pro tier. See benchmarks/METHODOLOGY.md and benchmarks/PYTHON_COVERAGE_AUDIT_2026-05-15.md.
Hardware: AMD Ryzen 9 7950X3D, Ubuntu 24.04.
Reproducible: python3 benchmarks/e2b_apples_to_apples.py --runs 100 --warmup 10
Separate AX102 corpus evidence at commit 59c8dc7: 35/35 declared claim-candidate bounded policy/eval/validation/redaction/rubric/automation snippets stayed on the fast path with verified receipts and p95 under 5ms, including a moderate 4-worker CPU contention run. That is not a broad Python or persistent Linux workspace claim.
The speed advantage is structural. Wasm has no kernel to boot. Firecracker-based platforms are stronger when you need a full Linux workspace; Cell's advantage is the small Wasm fast path with receipts.
- Python 3.12 (CPython-WASI) — broad Python fallback with bundled stdlib modules
- JavaScript (QuickJS-WASI) — ES2023, closures, typed arrays
- Low-ms fast path — bounded arithmetic/string and JSON/list policy snippets transpile to .syn, skipping CPython entirely
- Streaming —
cell.run(code, on_stdout=callback)with real-time SSE
- Create / kill locally; pause / resume / snapshot on the HTTP gateway where configured
- Persistent state is a gateway/Pro feature; do not treat local PyO3 as persistent Python parity
- Volumes (persistent cross-sandbox storage)
- Templates (custom sandbox configurations)
- Metadata, env vars, timeout control
- Filesystem —
cell.files.read/write/list/exists/make_dir/rename/remove - Git —
cell.git.clone/commit/push/pull/checkout/status(21 methods) - PTY —
cell.pty.create(on_data=...)for interactive terminals - CLI —
synapse sandbox create,synapse sandbox run,synapse template build
pip install "synapserun[local,langchain]" # LangChain tool + local runtime
pip install "synapserun[local,crewai]" # CrewAI tool + local runtime
pip install "synapserun[local,openai-agents]" # OpenAI Agents SDK + local runtime
pip install "synapserun[local,autogen]" # AutoGen executor + local runtime
pip install "synapserun[local,llamaindex]" # LlamaIndex tool + local runtime
pip install "synapserun[local,all]" # Everything + local runtime- SHA-256 receipt chain — every execution produces a cryptographic receipt
- Receipt verifier helpers — Python
result.receipt.verify()/verify(require_signature=True)(synapserun[crypto]) and TypeScriptverifyReceipt(receipt) - Receipt bundles and replay —
synapse receipt create|inspect|verify|replaycreates portable audit artifacts for bounded executions - Evidence packets —
synapse evidence report <bundle.json> --out evidence.htmlwrites self-contained reviewer reports without exposing full code/output bodies - AGPL + Apache 2.0 — inspect every line, self-host forever
- Self-hosted jurisdiction control — run on infrastructure you choose
- Audit-oriented — useful evidence for governed AI workflows; not a blanket compliance certification
The first product package is for Canadian AI builders: agencies, automation consultants, applied-AI startups, and internal innovation teams that need safer agent workflows for regulated or IP-sensitive clients.
- Cell Assurance Pack
- Sovereign Assurance Demo
- Vorsana / NanosTech Assurance Pack
- Self-Hosted Assurance Runbook
- Evidence Packets
- Customer Proof Loop
- Release Readiness Checklist
- Cell vs E2B vs Superserve
examples/sovereign_assurance_demo.pyexamples/nanotech_carbon_assurance_demo.pyexamples/receipted_eval.pyexamples/receipted_policy_gate.pyexamples/policy_gate_cell_code.pyexamples/receipt_tamper_check.py
| Mode | Command | When |
|---|---|---|
| Local | Cell(api_url="local") |
Development, CI, edge, embedded |
| Self-hosted | docker run ghcr.io/synapse-run/cell |
Production, fleet management |
| Managed | Cell(api_key="sk_...") |
Coming soon |
AI Agent → tool call → Synapse SDK → Wasm sandbox → result + receipt
│
No kernel boot
No container
Prewarmed local create p50: 0.42ms
Fresh-process cold total p50: 144ms
Fast exec p50: ~1-2ms
Cell uses wasmtime to execute sandboxed code. The gateway is a 12,000-line Rust binary that manages sandbox lifecycle, handles HTTP/WebSocket APIs, and produces cryptographic receipts.
# Option 1: Docker
export SYNAPSE_API_KEY="change-me"
export CELL_API_KEY="$SYNAPSE_API_KEY"
docker run -p 8002:8002 \
-e SYNAPSE_API_KEY \
-e CELL_API_KEY \
ghcr.io/synapse-run/cell
# Option 2: Build from source
cd gateway && cargo build --release --bin synapse-gateway --no-default-features
SYNAPSE_API_KEY="change-me" CELL_API_KEY="change-me" SYNAPSE_CELL_ONLY=1 ./target/release/synapse-gatewaycurl http://localhost:8002/v1/health
# {"status":"ok","service":"cell","version":"0.2.1rc1"}
SYNAPSE_API_KEY="$CELL_API_KEY" synapse demo assurance --api-url http://localhost:8002For the full container proof path, run scripts/self_host_gateway_smoke.sh or
follow docs/self-hosted-assurance-runbook.md.
Full OpenAPI 3.1 spec: gateway/openapi.yaml (27 endpoints)
Key endpoints:
POST /v1/cells— Create a sandboxPOST /v1/cells/{id}/exec— Execute codeGET /v1/cells/{id}/files/list— List filesPOST /v1/cells/{id}/exec/stream— SSE streaming executionPOST /v1/cells/{id}/pause/resume— Lifecycle managementGET /v1/health— Health check
cell/
├── gateway/ # Rust gateway (12K LOC)
│ ├── src/
│ │ ├── main.rs # HTTP server, WebSocket, rate limiter
│ │ ├── cell.rs # Sandbox lifecycle, Wasm execution
│ │ ├── cell_api.rs # REST API routes
│ │ ├── compiler.rs # .syn compiler
│ │ ├── transpiler.rs # Python → .syn transpiler
│ │ └── ...
│ ├── openapi.yaml # API spec
│ └── Cargo.toml
├── sdk/ # Python + JS SDKs
│ ├── synapse/ # Python SDK (9.6K LOC, 22 modules)
│ ├── js/ # TypeScript SDK
│ ├── tests/ # Test suite
│ └── pyproject.toml
├── benchmarks/ # Reproducible benchmarks
├── templates/ # Sandbox templates
└── docs/ # Documentation
See CONTRIBUTING.md. We use conventional commits (feat:, fix:, docs:, tests:, bench:).
- Gateway + SDK: AGPL-3.0 — use freely, contribute changes back
- Commercial License: Available for closed-source deployments
- Wasm Runtimes: Apache 2.0 (wasmtime)
- Website: synapserun.dev
- Documentation: synapse-run.github.io/cell
- npm: @runsynapse/sdk †
- PyPI: synapserun
- Security: SECURITY.md
† The npm scope @runsynapse/sdk was published before the synapserun.dev brand was canonicalized; a migration to @synapserun/sdk is planned for a future major release. The current package remains supported and active.
Built by Synapse Run, Canada 🇨🇦
Wasm-native. Sovereign. Self-hosted.