Free, open-source research mathematics · GPL-3.0

Research mathematics,
ready in your browser.

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

Use the browser app, or install it locally.

Early alpha · v0.8.0

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

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.

Open app.sagejs.org
01

macOS or Linux

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

02

Windows x64

Download the standalone ZIP, verify its neighboring SHA-256 file, extract it, and run sagejs.exe. No WSL or separate Node installation is needed.

Download the Windows ZIP

v0.8.0 early alpha · unsigned unless the release reports Authenticode signing; Windows SmartScreen may ask you to confirm this new publisher

03

npm and embedding

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.

View the package and quick start on npm

92–143 MiBcurrent standalone download, depending on platform
about 600–700 MiBinstalled size for both sagejs and sagepython
44–80 MiB temporarynative addons extracted on demand, then removed at process exit

sagejs --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

Embed a persistent mathematics session

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.

Node and browser embedding guide · npm package

import { createSage } from "@sagemath/sagejs";

const sage = await createSage();
console.log((await sage.evaluate("factor(370309)")).repr);

Transparent native build

Build the complete system from source

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

Capabilities and evidence

Status says whether something works, confidence says how strongly it is tested, and scope says how much of the mathematical surface is present.

Certified: exact semantics cross-checked Tested: focused regression coverage Prototype: useful, deliberately narrow Planned: designed or prioritized
Scope is independent of confidence. Broad surface covers most everyday workflows in that area; Substantial slice covers several coherent API families; Focused slice is deliberately narrower; Foundation exposes core building blocks for the next layer. Measured scores always state numerator, denominator, unit, reference, and audit date; ~ estimates are explicitly labeled expert workflow estimates. “Audit pending” is shown when no defensible denominator exists yet. Open Scope for the method and searchable API-family inventory.

Competitive audit

Every capability has a concrete next lane.

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.

primary gap lanes
existing benchmark suites
planned benchmark suites
comparison-system families

Priorities

The next research frontier

Priority is independent of maturity: mature foundations still need optimization and broader interfaces.

How quality is judged

Readable implementation. Independent truth.

01

Sage-compatible semantics

SageMath is the default behavioral specification. Intentional differences are documented and tested.

02

Multiple mathematical oracles

PARI/GP, Magma, Oscar, Hecke, and Nemo provide independent answers and performance reference points.

03

Evidence before labels

Focused regressions, exhaustive small cases, randomized differential tests, and benchmarks support maturity claims.

04

Readable research software

Algorithms should be understandable and changeable by mathematicians and agents, with native kernels where speed matters.