Run the demo
The quickest way to understand Algebrakit is to run it. The demo repo holds the same small application in four languages, roughly 300 lines each, and it works out of the box: no account, no API key, no configuration.
git clone https://github.com/algebrakit/demo
Pick your language
| Runtime | Run | SDK package | |
|---|---|---|---|
| TypeScript | Node.js 18+ | cd sdk/typescript && npm install && npm start |
@algebrakit/sdk |
| Python | Python 3.9+ | cd sdk/python && pip install -r requirements.txt && python server.py |
algebrakit-sdk |
| C# | .NET 8+ | cd sdk/csharp && dotnet run |
Algebrakit.Sdk |
| PHP | PHP 8.0+ | cd sdk/php && composer install && php -S localhost:3000 index.php |
algebrakit/sdk-php |
Then open http://localhost:3000.
The demos ship with a shared demo key baked in, so they run without configuration. That key works but is rate limited. For your own content and higher limits, create a free account and put your key in
.env(C# readsALGEBRAKIT_API_KEYfrom the environment).
What to look at
The app gives you thirteen exercises, split into primary and secondary education. Worth trying in this order:
- Solve a linear equation. Work it out in as many steps as you like, in whatever order. Try writing the equation the other way round, or making a deliberate mistake, and watch where the feedback appears.
- Ask for a hint. The hint is generated for the step you are on, not looked up from a list.
- Press Repeat on a randomised exercise. "Simplify a fraction", "Written subtraction" and "Acute or obtuse angle" build new numbers on every session.
- Press Check score. This calls
getSessionScorethrough the SDK and prints exactly what your backend would receive: marks earned, marks total, hints requested, errors made. - Watch the event log at the bottom of the page. Every action the student takes appears there as a learning event, which is the same data you would store in your own system.
A border marks where Algebrakit ends and the plain demo HTML begins, so it is obvious which part of the page you would be writing yourself.
Each exercise also links to the testbench editor, to the authoring documentation for that question type, and to the relevant page here.
The formula editor on its own
If all you need is maths input, the repo has a separate demo for the editor without an exercise around it:
cd formula-editor && npm install && npm start
Then open http://localhost:3005. Type with the keyboard or use the palette; input is interpreted as mathematics, so 1/2 becomes a fraction, and you get back LaTeX you can store. Five kinds of input are covered: algebra, equations, matrices, fill in the blanks, and an arithmetic keypad for younger students.
The formula editor is free to use, including commercially, on the condition that you keep a visible credit to Algebrakit near it.
Next
You have seen it work. Your first exercise does the same four steps in your own code.