Documentation · Connect a tool
Set up Pi
Pi is a terminal coding agent, and the one we recommend. One command adds Tenvor to it with the model, asks for your key at a hidden prompt, and keeps everything else you have set up.
What you need
Our recommended tool
We recommend Pi because it is lighter.
- A Tenvor API key, from the Console. See your first request.
- Bash, curl and Python 3.8 or newer, on macOS or Linux. On Windows, use WSL.
- Pi 1.1.0 or newer, but not Pi 2 yet. The setup was tested on Pi 1.1.0 and 1.2.0.
Pi does not ask before it acts
Pi reads, edits and runs commands as you, and it does not ask for approval before every tool call. Use a synthetic or non-sensitive project during the alpha. Keep it under version control. A coding tool sends your source, tool arguments, terminal output and chat history with each request, and requests are not yet encrypted on the node that runs them. Pi's own guide to running it in isolation covers containers and virtual machines.
Install Pi
If Pi is not installed, the setup says so and points you to pi.dev, where Pi's own install instructions are. It runs Pi's installer only if you answer y. The default is no, and nothing is installed without that answer. To install Pi yourself, follow the instructions on pi.dev.
Pi needs Node.js 22.19 or newer and npm. The setup checks for them before it offers the installer. If they are missing it stops and says so: Pi's installer offers to install them and asks first, and on some systems that asks for your sudo password. The setup itself never uses sudo.
The installer the setup runs is a copy Tenvor reviewed, and the setup checks it against its SHA-256 before it runs it. If the installer on pi.dev has changed since, the setup runs nothing and says so. The setup pins the installer script. It does not pin the Pi release or the npm packages that script then downloads.
Pi's installer shows its own menu and asks again before it installs. It puts Pi in your Pi folder and links the pi command into a folder on your PATH, which on a Mac may be Homebrew's folder. It asks before it edits a shell startup file, and pressing Enter there means yes.
Run the setup
Copy the command into your terminal. It downloads the launcher and runs it. Paste your key at the prompt that hides what you type. Never put the key in the command line.
curl -fsS https://tenvor.io/setup/pi.sh -o tenvor-pi.sh && bash tenvor-pi.shYou can also select the command and copy it manually.
You can read the Bash launcher and the Python helper first. The launcher checks the helper against its own pinned SHA-256 before it runs it. The launcher's own SHA-256 is ea69d9d9682864a991dfa641becc8d98ed4ffbc42d217bf9db82307fd0f06c29.
The setup reads the model's context window and output limit from the live public catalog when you run it, not from this page. If it cannot read the catalog, it stops and writes nothing.
What it changes
Everything is in Pi's folder, usually ~/.pi/agent, or the folder that PI_CODING_AGENT_DIR names. The setup copies models.json and settings.json beside themselves before it changes them. It does not keep a copy of auth.json, because that file holds keys. It replaces each file in one step. If a step fails, or Pi does not accept the result, it puts every file back.
| File | What it does |
|---|---|
models.json | Adds the tenvor provider and the chat-35b-moe model. The rest of the file, comments included, stays exactly as it was. |
auth.json | Adds your key, the way Pi keeps its own credentials. The file is readable only by you. |
settings.json | Makes tenvor/chat-35b-moe Pi's default model only if you have not chosen one. If you have, the file is left alone and the setup says so. |
.tenvor-pi-state.json | Records what the setup added, so that removing it undoes only that. |
extensions/tenvor-session-kv.js | A small Pi extension that lets Pi ask the node to keep one conversation warm (see Long sessions). Pi loads it by itself the next time it starts. The setup writes it only where no other file of that name is, and --no-cache-extension skips it. |
.tenvor-pi-cache-state.json | Records the extension, and the name of any temporary file the setup is about to create, so that updating or removing it touches only those. |
Nothing else in these files changes: your other providers, credentials and settings stay exactly as they are. If a file is not in a shape the setup can edit without risk, or already holds a tenvor entry the setup did not add, it stops and changes nothing. You can run the setup again at any time: if nothing has changed, it changes nothing and writes no backup.
When it finishes, the setup asks Pi whether it lists the model. If Pi does, the setup says it is set up. If Pi does not accept the change, the setup puts every file back and stops. If Pi runs but does not list the model, the setup leaves the files, says it is not confirmed, and exits with a non-zero status. The extension is added last, and only once Pi lists the model. If that step cannot finish, the setup says so in one line, and the model setup stands.
If your settings list enabledModels, Pi starts with the first model that matches the list, before the default. The command below always starts Pi with Tenvor.
Start Pi
The setup prints the exact command. You do not need to restart your terminal. It is usually:
pi --provider tenvor --model chat-35b-moeYou can also select the command and copy it manually.
The provider's base URL is https://orchestrator.tenvor.io/v1. If you had no default model, Tenvor is now Pi's default and plain pi starts with it too. If you had one, it is unchanged, and the command above still starts Pi with Tenvor.
Check that it works
Use a synthetic project. If Pi can switch providers or pick a model for you, turn that off for these checks: another provider's answer says nothing about Tenvor.
pi --provider tenvor --model chat-35b-moe --print "Say hello in one line."You can also select the command and copy it manually.
Read the reply
Pi prints one line. If it does not, run
pi --list-models tenvorandpi auth check --provider tenvor. The setup asked Pi the same two things when it finished, and told you what it found.Find the charge
Open the Usage page in the Console. The request is there as a charge, and in your spend for the day.
A configured URL, or a reply that says it is Tenvor, does not prove a request ran on Tenvor. A charge on the Usage page does.
Long sessions
The setup also installs a small Pi extension, tenvor-session-kv.js. It lets Pi ask the node to keep one conversation warm, so a follow-up can reuse its working state. It adds three request headers to requests for the Tenvor model and changes nothing else. If anything in it goes wrong, the request goes out without them. It is plain JavaScript, pinned by checksum, and part of the Python helper, so you can read it before you run anything.
A conversation stays warm while each request starts less than two minutes after the previous reply finished, and for at most fifteen minutes after its first reply finished. After that the next request is read in full again, and the conversation starts warming again from there. Reuse is never guaranteed. It changes no charge: all input is billed at the full rate today, and cached_input_tokens reads 0 on the receipt. What the node keeps, and for how long, is on the Trust page.
The extension was tested on Pi 1.1.0 and 1.2.0. It goes in extensions/tenvor-session-kv.js in Pi's folder. The setup never writes over a file of yours with that name, and that includes a file with the same contents: it leaves that file as it is, does not record it as its own, and does not delete it when you remove the setup. Pi would not load the extension from a folder that has its own index.js or index.ts, or a package.json that lists extensions, whatever it lists, because Pi then loads only what that names. The setup skips the extension in that case, and when the folder is a symlink, and says so.
To set up without the extension, add --no-cache-extension to the command. To remove it together with the rest of the setup, run bash tenvor-pi.sh --remove. To remove only the extension, delete extensions/tenvor-session-kv.js from Pi's folder, and add --no-cache-extension whenever you run the setup again: a plain run puts the file back.
While it works on the extension, the setup holds a lock file, .tenvor-pi-cache.lock, in Pi's folder and removes it when it finishes. If you run the setup twice at once, the second run waits up to 30 seconds, then skips the extension and says so. The exit status does not change.
Two limits apply to long sessions. A request over either is refused with HTTP 400 and the message dynamic request is invalid. See Find your error.
- A request may carry at most 256 messages. Start a new Pi session to continue.
- A request whose history has tool calls must still list the tools those calls used. A request with earlier tool calls and an empty tools list is refused, which is what happens if you turn tools off in the middle of a Pi session.
Replace your key
Run these commands in the folder where the setup command saved tenvor-pi.sh. If the launcher says the helper failed verification, it is out of date: download it again with the setup command above, then run the command you wanted.
To use a replacement key, replace it in the Console, then run the next command and paste the new key at the prompt. The old key stops working as soon as you replace it.
bash tenvor-pi.sh --rotate-keyYou can also select the command and copy it manually.
This runs the setup again with the new key. It replaces the Tenvor entry in auth.json and keeps no copy of the old key. It also brings the provider in models.json up to date with the live catalog. A plain rerun of the setup leaves a key you replaced yourself in Pi as you set it. --rotate-key writes the key you type over it.
Remove the setup
bash tenvor-pi.sh --removeYou can also select the command and copy it manually.
This removes only what the setup added to Pi on this machine. It takes the key out of auth.json and keeps no copy of it. If the setup made Tenvor your default model, it puts back the setting you had. If you edited a Tenvor entry yourself since, the setup leaves your edit in place and says so.
It also removes the cache extension, but only a file whose contents are still exactly what the setup recorded when it wrote it. A file that was already there before the setup stays in place, and the setup said so when it ran. A file that you changed since stays in place, and the removal says so and what to do: move or delete the file, then run the removal again. Until the file is gone, the setup keeps its record of the extension, so that running the removal again finishes the job.
The setup deletes its record of the extension only after it has checked that the extension file is gone and that nothing of its own is pending. If it cannot make that check, the record stays. It deletes a temporary file only if the record lists its name and the file holds what the setup wrote. A file that merely looks like one, or a listed name that holds anything else, stays in place, and so does the record.
The copies of models.json and settings.json that the setup made stay where they are. They hold no Tenvor key, and you can delete them. The setup does not uninstall Pi, and it does not revoke your key on Tenvor. To do that, use the API keys page in the Console.
Content checked . Live limits and prices can change.