Skip to main content

Connect Pi

Use Pi with models and skills through Unity Gateway. The Unity Gateway CLI (ug) handles workspace sign-in and configuration, or you can configure the connection manually. Pi has no built-in MCP client, so MCP tools require a separate Pi extension.

Before you begin

You need your Databricks workspace URL and access to the models and skills you want to use. For manual setup, install Pi and have a Databricks personal access token.

For manual configuration, replace <workspace-hostname> with your Databricks workspace hostname and <databricks-pat> with your token. Use full model names available in your workspace, and merge configuration entries into existing files, keeping unrelated settings.

If your admin has already configured your device, follow your organization's setup instructions.

Use the Unity Gateway CLI

Install ug, then run this command from your project directory:

Bash
ug pi

Select your workspace and sign in when prompted. The command opens Pi with your gateway models configured. Start coding, or enter /model to choose another configured model.

Configure models manually

Install Pi, then merge this configuration into ~/.pi/agent/models.json:

JSON
{
"providers": {
"databricks-claude": {
"baseUrl": "https://<workspace-hostname>/ai-gateway/anthropic",
"api": "anthropic-messages",
"apiKey": "<databricks-pat>",
"authHeader": true,
"compat": {
"supportsEagerToolInputStreaming": false
},
"models": [{ "id": "system.ai.claude-sonnet-4-6" }]
}
}
}

Start pi and select the model with /model. Keep supportsEagerToolInputStreaming: false for Claude models through the gateway.

For other model families, add a provider with the corresponding API and base URL. Use the same apiKey and authHeader fields and list the model IDs available to you:

Models

api

baseUrl

GPT

openai-responses

https://<workspace-hostname>/ai-gateway/codex/v1

Gemini

google-generative-ai

https://<workspace-hostname>/ai-gateway/gemini/v1beta

Models

api

baseUrl

GPT

openai-responses

https://<workspace-hostname>/ai-gateway/codex/v1

Gemini

google-generative-ai

https://<workspace-hostname>/ai-gateway/gemini/v1beta

See Pi's model configuration documentation.

Add skills

Use the Unity Gateway CLI

Download published skills:

Bash
ug skills add

Choose your skills, then restart Pi. It reads the downloads from ~/.agents/skills/. Ask Pi to use a skill or invoke /skill:<name>, using the name in its SKILL.md.

Configure skills manually

For files you already have, place each complete skill folder in ~/.agents/skills/ or your project's .pi/skills/. See Pi's skills documentation.

MCP support

Pi has no built-in MCP client, and ug mcp add does not support Pi. Use downloaded skills; MCP services and the skill registry require a separate Pi extension. See Pi's extension documentation.

Unity Gateway skills are in Beta. See Govern skills for enablement and permissions.

Troubleshooting

A model request fails: Check the gateway URL, token expiration, model name, and permissions.

A downloaded skill is missing: Check that its complete folder contains SKILL.md in a supported directory. Re-run ug skills add with the same options to refresh downloaded skills.

For workspace sign-in or ug setup problems, run ug doctor.

Next steps