Skip to the content
Back to Nymbot

Knowledge base Code

Running code on a server

When code needs more than your device can give it — another language, packages from the internet, more time — Nymbot can run it on a server of its own, in a container made for that one run.

What is a server run

A server run starts a fresh container, puts your code in it, runs it, sends back what it printed and destroys the container. You see the most it can cost before it starts, and you pay from your Pro balance for the time it actually ran.

There are two ways in: Run on server on a code block, and server runs that Nymbot asks for while it works in a repository.

For quick Python or JavaScript that needs nothing from the internet, the free sandbox on your device is usually enough.

Running a code block

Python, JavaScript, TypeScript, shell, Go, Rust, Java and Dart code blocks in a reply have a Run on server button, whenever server runs are available. It opens a sheet showing:

  • the image the code will run on,
  • a time limit to choose: 1, 5 or 15 minutes,
  • the most the run can cost, in Pro credits, for that time limit,
  • and, if the chat has files attached, a box to include them. They go only if you check it.

Press Run and the output streams in under the code block as it arrives: what it printed, the exit code, how long it ran, any files it wrote (each with a Save button), and what it was charged.

Stop ends the run at any point. The server is shut down right away and you pay only for the time it ran. Stopped before the server started, it costs nothing.

In an Anonymous Mode chat the run is paid from the throwaway key's Pro credits, and attached files are never included.

Languages and images

Each language runs on an image, a ready-made system with the tools that language needs. Bigger images run on bigger servers and cost more per minute.

ImageUsed forWhat it containsServer
PythonPythonPython 3.12 with pip, venv, build tools and git; numpy, pandas and pytest already installed0.5 CPU, 4 GB memory
Node.jsJavaScript, TypeScriptNode.js 22 with npm, pnpm and yarn, plus Python 3, make and a C++ compiler0.5 CPU, 4 GB memory
PolyglotShell, Go, Rust, Javabash, C and C++ build tools, Python 3, Node.js, Go, Rust with cargo, and Java 171 CPU, 6 GB memory
FlutterDartFlutter 3.32 and Dart2 CPUs, 8 GB memory

What it costs

Server time is billed in steps of 10 seconds, from asking for the server to shutting it down, with 10 seconds as the least a run can cost. The rate is what the server of that size costs Nymbot, plus a margin, converted to Pro credits at the current Bitcoin price.

  • The price is shown up front, as a maximum. It is the whole time limit at that rate. You are never charged more, and a run that finishes early costs less.
  • The maximum is held while the run is going. When it ends, the actual charge is taken and the rest is released.
  • A run that fails to start is free.
  • Spending caps apply. A run that could go past a chat's spending cap asks first, the same way a reply does.

Because the price follows the Bitcoin price, it can move between the moment you see it and the moment you press Run. If it went up, nothing runs: the sheet opens again with the new price for you to check.

Server runs in a repository

In a chat with a repository connected, the Server runs chip lets Nymbot ask to run commands against your code, such as installing the dependencies and running the tests after a change. It is off until you turn it on, per chat.

Each time the model wants to run something, the reply pauses and shows a card with the image, the full command, the time limit and the most it can cost, plus which repository when the chat has several. Nothing runs until you answer:

  • Allow once runs that one command. It runs against the repository with the edits the reply has made so far, and the model gets back the exit code, the end of the output and the list of files the command changed. Then the reply carries on.
  • Decline runs nothing and costs nothing. The reply carries on without it.

Every run asks. Each one is charged separately from the reply, and the reply lists the runs it made and what each cost. If a run could go past the chat's spending cap, it is refused before you are asked.

Files a command changes on the server stay there and are thrown away with the container. They are not written to your repository. Changes to the repository come only from the reply's own edits.

What is isolated

  • A fresh container for every run. Nothing is shared with another run or another person, and the container is destroyed when the run ends, whether it succeeded or failed.
  • No internet except package registries. The container can download from the places packages come from: PyPI, npm and yarn, pub.dev and Google's storage for Flutter and Dart, the Go module proxy, crates.io, Maven Central, and GitHub for git dependencies and release downloads. It can only download. It cannot send anything to them or reach any other address.
  • Only what you chose goes in. The code, the files you included, or the repository's files. Your keys, your git token and your chats never enter the container.
  • Output is treated as untrusted. In a repository, what a run prints is shown to the model marked as outside data, and it is told never to follow instructions inside it.

Limits

  • One server run at a time for each key. Starting a second one while the first is still going is refused.
  • Time limits of 1, 5 or 15 minutes for a code block. A repository run can ask for up to 15 minutes, or 20 on the Flutter image.
  • Up to 1 MB of code, and up to 200 attached files totaling 20 MB.
  • A repository of up to 60 MB, packed.
  • Up to 256 KB of output. Anything past that is dropped, and the run says so.
  • Up to 200 files, 8 MB in all, handed back to save.

Server runs can be switched off for maintenance, as a whole or one image at a time. When they are off, the Run on server button and the chip are not shown.

The Tasks pane

In a repository chat, the checklist button at the top of the chat opens its Tasks pane. It lists what each turn did, newest first: the files it read and edited, commits, changes staged for your review, and every server run with its command, image, time, cost and exit status. A server run waiting for your approval can be allowed or declined from the pane, the same as from its card, and a running reply can be stopped there. The outline stays with the chat after the work finishes.