Docs/ AI Assistant/ Getting Started

AI Getting Started

Four steps to go from zero to a working AI assistant that knows your server inside and out.

Step 1: Purchase AI Credits

Navigate to sh0.dev/account/ai and purchase a credit pack. Packs are available in five sizes:

PackApprox. Conversations (Sonnet)
$5~1,000
$10~2,000
$25~5,000
$50~10,000
$100~20,000

All three Claude models (Haiku, Sonnet, Opus) are available on every plan. Credits never expire -- use them whenever you need.

Step 2: Create an AI API Key

On the same account page, click Generate AI Key. Your key starts with sh0_ai_ and is displayed only once.

Warning
Copy your API key immediately after generation. It cannot be retrieved later. If you lose it, revoke it and generate a new one.

When creating the key, select a scope:

  • Read -- Can only query data (list apps, view logs, check status). Safest option for monitoring.
  • Standard -- Can read and write (restart apps, deploy, set environment variables). Recommended for daily use.
  • Admin -- Full access including destructive operations (delete apps, delete databases). Use with caution.

Step 3: Configure Your Dashboard

Open your sh0 dashboard and navigate to Settings. In the AI section, paste your sh0_ai_ key.

The key is stored locally in your browser's localStorage. It is never sent to sh0's servers -- it is only used to authenticate directly with your sh0 instance's AI endpoint.

Note
Your conversations are stored locally in your browser. sh0 never stores or reads your chat history.

Step 4: Start Chatting

Open /ai in your dashboard. The AI automatically detects your server context -- running apps, resource metrics, sh0 version, and configuration. No manual setup required.

Type a question or command in natural language. The assistant will determine which tools to call, execute them against your server, and return the results with its analysis.

Choosing a Model

Select the model from the dropdown in the chat interface. Each model has different strengths:

ModelSpeedCost/ConversationRecommended For
Haiku~1-2s~$0.002Quick status checks, listing apps, simple questions
Sonnet~3-5s~$0.005Debugging failed deploys, multi-step operations, daily driver
Opus~8-15s~$0.009Complex root-cause analysis, architecture review, sandbox code analysis
Tip
Start with Sonnet for most tasks. Switch to Haiku for quick queries where speed matters more than depth, and to Opus when you need thorough analysis of complex problems.

Example Conversations

Here are some things you can ask the AI assistant:

  • "Why did my last deploy fail?" -- The AI fetches deploy logs, identifies the error, and suggests a fix.
  • "List all my apps and their status" -- Calls list_apps and presents a summary table.
  • "Generate a sh0.yaml for my Node.js project" -- Creates a deployment configuration based on best practices.
  • "Check if my database is reachable from my-app" -- Uses the sandbox to test network connectivity between containers.
  • "My app is using too much memory. Help me debug it." -- Checks metrics, inspects logs, and may analyze code in the sandbox.
  • "Restart my-api and watch the logs" -- Restarts the app and streams the startup logs to verify it comes back healthy.
  • "What changed in the last deploy of frontend?" -- Reviews deploy history and build logs to summarize changes.

BYOK (Bring Your Own Key)

Business plan users can bypass the credit system entirely by providing their own LLM API key. This gives you zero-markup pricing -- you pay the provider directly at their published rates.

Supported key formats:

  • Anthropic -- Keys starting with sk-ant-. Direct access to Claude models.
  • OpenRouter -- Keys starting with sk-or-. Access to Claude and other models via OpenRouter's unified API.

To configure BYOK, go to Settings in your dashboard and enter your provider key in the AI section. The key is stored locally in your browser, just like the sh0 AI key.

Note
BYOK keys are sent directly from your browser to the AI provider. sh0 acts as a proxy to inject your server context and tool definitions, but never stores or logs your provider key.