Skip to main content
Pi is a lightweight, terminal-based coding harness. It keeps its core intentionally minimal while allowing users to extend it with TypeScript extensions, skills, prompt templates, themes, and Pi packages. Follow the steps below to connect Pi with a model hosted on SambaCloud.

Prerequisites

Before you begin, ensure you have:
  • A SambaCloud account and API key
  • Node.js and npm
  • A POSIX shell on macOS, Linux, or WSL

Setup

1

Install Pi

Install Pi globally with npm:
Verify that Pi is installed:
2

Configure SambaNova as a provider

Create the Pi agent configuration directory if it doesn’t exist yet:
Create ~/.pi/agent/models.json with the SambaNova provider configuration:
3

Configure your SambaNova API key

Create ~/.pi/agent/auth.json with your SambaNova API key:
Replace your-sambanova-api-key with the key from your SambaCloud portal.
4

Start using SambaNova models

Run Pi with your configured SambaNova provider and model:
You can use any model configured in ~/.pi/agent/models.json, for example:
Pi settings

Available models

The SambaNova provider configuration above includes the following models:
To use a different model, add its model ID to the models array in ~/.pi/agent/models.json, then run Pi with that model:

Troubleshooting

If pi isn’t found after installation, verify that the npm global installation directory is on your PATH:
Then verify the installation:
If ~/.pi/agent/models.json doesn’t exist, create the configuration directory first:
If the SambaNova API key isn’t being recognized, verify that ~/.pi/agent/auth.json exists and contains the correct provider name and API key:
Make sure the provider is named exactly sambanova:
If requests fail because the configured model isn’t available, verify that the model ID is listed in ~/.pi/agent/models.json and matches the model ID passed to Pi:

Additional resources