Nothing to install
Start a Sage.js session in your browser
The WebAssembly app runs locally in Chromium, Firefox, and WebKit, with an offline-capable, receipt-verified mathematics runtime.
Free, open-source research mathematics · GPL-3.0
Open Sage.js instantly at app.sagejs.org, explore its agent-first numerical laboratory, or install it locally for native desktop performance. Sage.js implements Python and Sage semantics on JavaScript; it does not embed or invoke CPython.
Start using Sage.js
Sage.js is research software at a very early stage. Expect missing functionality and rough edges, and please report what you discover. It is free software, fully open source, and licensed under GPL-3.0.
Nothing to install
The WebAssembly app runs locally in Chromium, Firefox, and WebKit, with an offline-capable, receipt-verified mathematics runtime.
Downloads the native release for your platform and verifies its SHA-256 checksum.
curl -fsSL https://sagejs.org/install.sh | sh
Linux x64/arm64 · signed and notarized Apple Silicon macOS · Linux needs curl, xz, and libatomic.so.1
Download the standalone ZIP, verify its neighboring SHA-256 file, extract it, and run sagejs.exe. No WSL or separate Node installation is needed.
v0.8.0 early alpha · unsigned unless the release reports Authenticode signing; Windows SmartScreen may ask you to confirm this new publisher
Installs the command line and JavaScript embedding package, including its native executable for the current platform.
npm install -g @sagemath/sagejs@0.8.0
For an application: pnpm add @sagemath/sagejs, then import createSage directly from @sagemath/sagejs. The session uses the same full native mathematics runtime as the command line.
sagejs and sagepythonsagejs --install-jupyter-kernel adds Sage.js to JupyterLab, CoCalc, nteract, or another Jupyter client—without requiring Python or the jupyter command.
Use Sage.js in your software
Sage.js is not limited to its command line or this demo. A Node
application can create an isolated native session, keep
definitions between evaluations, stream output, enforce
timeouts, and close it when finished. Websites can self-host
the same worker-isolated WebAssembly runtime used by
app.sagejs.org.
import { createSage } from "@sagemath/sagejs";
const sage = await createSage();console.log((await sage.evaluate("factor(370309)")).repr);
Transparent native build
A single bootstrap command initializes submodules, installs the pinned JavaScript dependencies, downloads verified native dependency bundles when available, builds Sage.js, and tests the standalone executable. A system GMP installation is not required.
git clone https://github.com/sagemathinc/sagejs.git && cd sagejs && pnpm bootstrap
All platforms: Node.js 25.5+ (Node 26 recommended), pnpm 11.9+, Git, Python 3, CMake, and a C/C++ toolchain.
Debian/Ubuntu: sudo apt-get install build-essential cmake git python3 m4 xz-utils
Apple Silicon: Xcode Command Line Tools plus Homebrew node pnpm m4 xz.
Windows x64: Git, Python 3, CMake, and Visual Studio 2022 Build Tools with Desktop C++, clang-cl, and the ClangCL toolset. Native Windows is used directly—no WSL, MSYS2, or MinGW.
Budget: allow 15–30 minutes on Linux/macOS and 30–60 minutes for a cold Windows build, plus roughly 6–8 GB of working disk. Verified prebuilt native dependencies usually make subsequent builds substantially faster.
Implementation map
Status says whether something works, confidence says how strongly it is tested, and scope says how much of the mathematical surface is present.
Competitive audit
Scope denominators, independent comparison systems, representative workflows, and performance cases are tracked separately. Open Competitive audit on any capability to see its proposed unit of completion and a stable gap ID suitable for parallel work.
Measured performance
| System | Operation | Proof semantics | Median |
|---|
Matching notebook cells
Choose an example to reveal it inside its capability.
Capability data could not be loaded. Please reload or view the repository copy.
Priorities
Priority is independent of maturity: mature foundations still need optimization and broader interfaces.
How quality is judged
SageMath is the default behavioral specification. Intentional differences are documented and tested.
PARI/GP, Magma, Oscar, Hecke, and Nemo provide independent answers and performance reference points.
Focused regressions, exhaustive small cases, randomized differential tests, and benchmarks support maturity claims.
Algorithms should be understandable and changeable by mathematicians and agents, with native kernels where speed matters.