# TotalFusion 0.1 > Extends Total.js with other runtimes: call functions written in Python, Rust, Go and WebAssembly from Total.js and Node.js as plain async functions, and use them as actions, API endpoints and MCP tools for AI agents. Status: current. License: MIT. Full text in one file: https://totaljs.es/docs/totalfusion/0-1/llms-full.txt Source code: https://github.com/totaljs-es/totalfusion ## Guides - [Getting started](https://totaljs.es/docs/totalfusion/0-1/guides/getting-started.md) - [How it works](https://totaljs.es/docs/totalfusion/0-1/guides/how-it-works.md) - [Use cases](https://totaljs.es/docs/totalfusion/0-1/guides/use-cases.md): Each case says **what was run** and what was measured, so you can tell a result from an idea. All the numbers come from one machine (8 cores, macOS, Node.js 24), and they show orders of magnitude, not guarantees. - [Python](https://totaljs.es/docs/totalfusion/0-1/guides/python.md): Write functions in Python and call them from Node.js and Total.js as `async` functions. Python is the right choice when you need its ecosystem: machine learning, scientific computing, data processing, any library that only exists for Python. - [Rust](https://totaljs.es/docs/totalfusion/0-1/guides/rust.md): Write the functions in Rust, build a binary, and call it like the Python ones. A Rust worker is an **isolated process** that speaks the same protocol, so everything in this documentation applies to it as well: the pool, timeouts, cancellation, [binary data](/totalfusion/0-1/guides/binary-data/), [streaming](/totalfusion/0-1/guides/streaming/), [recycling and health checks](/totalfusion/0-1/guides/workers/#keeping-workers-healthy), Total.js actions, MCP tools and the `doctor`. - [Go](https://totaljs.es/docs/totalfusion/0-1/guides/go.md): Write the functions in Go, build a binary, and call it like the Python and the Rust ones. A Go worker is an **isolated process** that speaks the same protocol, so everything in this documentation applies to it as well: the pool, timeouts, cancellation, [binary data](/totalfusion/0-1/guides/binary-data/), [streaming](/totalfusion/0-1/guides/streaming/), [recycling and health checks](/totalfusion/0-1/guides/workers/#keeping-workers-healthy), Total.js actions, MCP tools and the `doctor`. - [WebAssembly](https://totaljs.es/docs/totalfusion/0-1/guides/webassembly.md): Call functions that were compiled to WebAssembly, from Node.js and Total.js, like any other runtime. What sets it apart is that **a WebAssembly module runs in a sandbox**: it cannot read or write files, it cannot open a connection and it cannot see your environment. The other runtimes run your code with your permissions; a module runs with none that you did not give it, and you do not give it any. It is also **one `.wasm` file that runs on any system**. - [Total.js 5](https://totaljs.es/docs/totalfusion/0-1/guides/total5.md): TotalFusion is an extension of Total.js: the functions of a worker are registered as **actions**, so everything Total.js does with an action (validation, permissions, API routes, FlowStream, MCP) works with them. Nothing in the framework is modified. - [Flow](https://totaljs.es/docs/totalfusion/0-1/guides/flow.md): Use your functions of Python, Rust, Go and WebAssembly as nodes of a **Total.js Flow**: draw the flow, set the function in the settings of the node, and the data of every message is the argument. TotalFusion brings seven components, in the group *TotalFusion* of the designer: - [Binary data](https://totaljs.es/docs/totalfusion/0-1/guides/binary-data.md) - [Streaming](https://totaljs.es/docs/totalfusion/0-1/guides/streaming.md): A Python function that **yields** is a stream: each `yield` reaches Node.js as soon as it happens. Generators can be `def` or `async def`. - [Working with the workers](https://totaljs.es/docs/totalfusion/0-1/guides/workers.md): A runtime is a **pool of worker processes** that Node.js supervises. They are started on demand (`workers` is the size of the pool), every call waits in a bounded queue (`maxQueue`) until a worker has room, and a worker that dies is replaced. A call is never repeated by itself. The options are listed in the [reference](/totalfusion/0-1/reference/reference/#options). - [Development and diagnosis](https://totaljs.es/docs/totalfusion/0-1/guides/development.md): Two things make the daily work easier: the workers are replaced when you change the code, and one command tells you what is wrong with the environment. - [Errors and cancellation](https://totaljs.es/docs/totalfusion/0-1/guides/errors.md): Every error is a `FusionError` with a stable `code`. - [Security](https://totaljs.es/docs/totalfusion/0-1/guides/security.md): TotalFusion runs your code in other processes. This page says what that protects and what it does not. - [Using TotalFusion with AI assistants](https://totaljs.es/docs/totalfusion/0-1/guides/ai.md): Two things are in this page: how to give an assistant (or an agent) what it needs to **write code that uses TotalFusion**, and how your functions become **tools that an agent can call**. Every file mentioned here is kept true by a test of the project (`tests/agents.test.js`). ## Reference - [Reference](https://totaljs.es/docs/totalfusion/0-1/reference/reference.md) ## Recipes - [1. A Python function as an API and as a tool for an AI agent](https://totaljs.es/docs/totalfusion/0-1/recipes/python-action-and-mcp.md): You will write one Python function, and Total.js will serve it as an **API endpoint** with validated input and as a **tool that an AI agent can call**. You will change the function while the application runs and see the new answer at once. It takes about ten minutes, and it needs nothing but Python itself: no libraries to install. - [2. Run the code of third parties in the sandbox of WebAssembly](https://totaljs.es/docs/totalfusion/0-1/recipes/wasm-sandbox.md): You will build the core of a plugin system: each customer of your platform writes the rule that prices their orders, and your Total.js application **runs it without trusting it**. You will see a module that tries to read your files, see your environment, write to your disk and open a connection, and fail at every attempt. You will see another that never returns, and how the application cuts it off and goes on. It takes about fifteen minutes. ## Changelog - [Changelog](https://totaljs.es/docs/totalfusion/0-1/changelog/changelog.md)