Use Confidential AI with Pi

Pi is an open-source, terminal-based coding agent that lets you bring your own models. Add Privatemode as a provider and every prompt and response is encrypted end-to-end through confidential computing. So your codebase stays private even when you reach for a frontier-scale model.

Pi coding agent logo

Introduction

Use Pi for AI-assisted coding without exposing your source code

screenshot of the pi-terminal

Bring-your-own-model coding in the terminal

Pi is a minimal, open-source agent harness that runs in your terminal and connects to any OpenAI- or Anthropic-compatible provider. It has become a favorite in the local-model community: developers running Ollama, LM Studio, or vLLM who want their code to stay well protected on their own hardware.

Privatemode gives you frontier models without giving up privacy

Privatemode exposes an OpenAI-compatible API backed by large open models running inside confidential computing environments. Add it as a provider in Pi and your prompts, code, and AI responses are encrypted end-to-end. The same privacy you expect from a local model, but with models far too large for a local setup.

Hardware-enforced, not just policy

The Privatemode proxy runs locally on your machine and encrypts all data before it leaves. On the server side, inference runs inside hardware-isolated confidential computing environments (AMD SEV / Intel TDX together with Nvidia Confidential Computing). The proxy verifies server integrity through remote attestation before every session. Your code is never stored and never used for model training.

Benefits

Why use Privatemode AI with Pi?

Privacy that scales past your local GPU

The local-model community reached for Pi to keep code on their own hardware. Privatemode extends that same guarantee to models that won’t fit locally. You get bigger, faster models without sending your source code to a cloud provider.

Drop-in provider, no workflow changes

Pi already supports custom providers through ~/.pi/agent/models.json.

Point it at the Privatemode proxy with the openai-completions API and keep the Pi workflow you know.

Open and verifiable on both ends

Pi is open source, and so is the Privatemode proxy and server, with reproducible builds and remote attestation before every session. You can verify exactly what runs on your machine and inside the enclave.

How to get started

Set up Pi to use Privatemode

Five steps take an existing Pi setup from cloud or local models to fully encrypted inference through Privatemode.

1. Install Pi

Install the Pi coding agent by following the official quickstart guide.

2. Get a Privatemode API key

Create a Privatemode account and generate an API key. You’ll pass it to the proxy in the next step.

3. Start the Privatemode proxy

Run the local Privatemode proxy with your API key. It encrypts every request before it leaves your machine and serves an OpenAI-compatible endpoint at http://localhost:8080/v1. For details visit the documentation.

4. Add Privatemode to your Pi models.json

Adjust the provider block in ~/.pi/agent/models.json and point it to the privatemode proxy. Pi reloads the file whenever you open /model, so there’s no need to restart your session.

5. Start coding with Pi

Start pi in your project, run /model, and choose kimi-latest or gpt-oss-120b. Every message is now encrypted end-to-end.

FAQ

Frequently asked questions about Pi with Privatemode

Privatemode offers a range of models running inside confidential computing environments with full encryption. See the model overview.