Skip to main content
Agents

Pi

Run the Pi coding agent as a durable Rivet Actor.

@rivet-dev/pi runs the Pi coding agent in a Rivet Actor. The agent loop runs in the Actor. Pi’s file and shell tools run in a separate sandbox.

Each Actor holds one Pi session and saves it in its SQLite database, so a conversation survives sleep and restarts.

YOUR BACKENDSANDBOXESPi ActorShell + filesagent loop + SQLitePi ActorShell + filesagent loop + SQLitePi ActorShell + filesagent loop + SQLiteSleepingPausedTool callsModel callsModel provider

To get started, follow the Quickstart.

Configuration

The Pi Actor accepts every actor() option except db, which Pi uses for the session, and Pi’s session options, such as thinkingLevel, tools, and customTools. It also accepts:

OptionDescription
modelModel for a new session, as provider/modelId.
scopedModelsModels a client may switch to with setModel.
apiKeysAPI keys by provider. Defaults to the environment.
providersCustom providers, in the shape of Pi’s models.json.
credentialsLogins your application stores. See User Subscriptions.
sandboxWhere Pi’s file and shell tools run. See Sandboxes.
settingsPi settings for a new session.