Docs/ AI Assistant/ Overview

AI Assistant Overview

A built-in AI assistant that can inspect, manage, and debug your server -- directly from the dashboard, Claude Desktop, or any MCP-compatible client.

What is the AI Assistant

sh0 ships with a built-in AI assistant powered by Claude (Anthropic). It has direct access to your server via 103 tools -- it can list apps, debug deployments, restart containers, analyze code in a sandboxed environment, and more.

Unlike generic AI chatbots, the sh0 assistant understands your server context. It knows which apps are running, their health status, recent deploy logs, resource usage, and configuration. Every response is grounded in real data from your infrastructure.

Tip
The same AI that built sh0 itself now helps you manage it. Claude has deep knowledge of Docker, deployment pipelines, networking, and server administration.

Three Ways to Use It

The AI assistant is accessible through three interfaces, all sharing the same 103-tool backend:

  1. Dashboard Chat -- The /ai page in your sh0 dashboard. Built-in, no setup needed beyond an API key. Full conversation history stored locally in your browser.
  2. Claude Desktop / Claude Code -- Connect via MCP (Model Context Protocol). Your sh0 server becomes a tool provider that Claude can call directly from the desktop app or CLI.
  3. Any MCP Client -- Cursor, Windsurf, custom agents, or any tool that speaks MCP. Point it at your sh0 server's MCP endpoint and it gains all 103 tools automatically.

103 Tools Across 5 Categories

Every tool is classified by risk level. Read-only tools execute immediately. Write tools require standard permissions. Destructive tools require admin scope and a confirmation token.

Read (37 tools)

Observe your infrastructure without making changes. Available with any API key scope.

  • list_apps -- List all deployed applications with status
  • get_app -- Get detailed info about a specific app
  • server_status -- CPU, memory, disk, uptime, and sh0 version
  • get_app_logs -- Fetch build or runtime logs
  • get_app_env -- Read environment variables (values redacted)
  • list_databases -- List provisioned databases
  • get_database -- Database details, size, and connection info
  • list_domains -- All configured domains and SSL status
  • get_deploy_history -- Recent deployments with status and duration
  • list_backups -- Available backups and their timestamps
  • get_metrics -- Resource usage graphs and trends
  • list_cron_jobs -- Scheduled tasks and their run history

Write (44 tools)

Make changes to your infrastructure. Requires standard or admin API key scope.

  • restart_app -- Restart a running application
  • deploy_app -- Trigger a new deployment
  • set_env_var -- Create or update an environment variable
  • scale_app -- Change replica count
  • rollback_app -- Roll back to a previous deployment
  • sandbox_exec_command -- Execute a command in the AI sandbox

Destructive (2 tools)

Irreversible operations. Requires admin scope and a confirmation token from confirm_action.

  • delete_app -- Permanently delete an application and its data
  • delete_database -- Permanently delete a database and all its data

Sandbox (5 tools)

Full development environment in a sidecar container. Requires sandbox_enabled on the app. See AI Sandbox for details.

  • sandbox_exec_command -- Execute any shell command (install packages, clone repos, run apps)
  • sandbox_read_file -- Read files from app volumes
  • sandbox_list_processes -- List running processes in the app container
  • sandbox_check_connectivity -- Test network connectivity to databases and services
  • sandbox_status -- Check sandbox state

Meta (1 tool)

  • confirm_action -- Generates a one-time confirmation token for destructive operations. The AI must explain what it intends to do and receive user approval before proceeding.

Three Claude Models

Choose the model that fits your task. All three are available on every plan.

ModelSpeedCostBest For
HaikuFast~$0.002/conversationQuick status checks, simple queries, listing apps
SonnetBalanced~$0.005/conversationDebugging, multi-step operations, recommended default
OpusThorough~$0.009/conversationComplex debugging, architecture analysis, code review in sandbox

Safety Architecture

The AI assistant is designed with multiple layers of protection to prevent accidental or unauthorized changes:

  • Scoped API keys -- Each key is assigned a scope: read, standard, or admin. The AI can only call tools within the key's scope.
  • Risk classification -- Every tool is tagged with a risk level. Read tools are safe. Write tools require standard scope. Destructive tools require admin scope plus a confirmation token.
  • Confirmation tokens -- Before executing a destructive operation (delete app, delete database), the AI must call confirm_action, which presents a clear description to the user and requires explicit approval.
  • Audit logging -- Every tool call is logged with the timestamp, tool name, parameters, API key used, and result. Admins can review all AI activity from the dashboard.
Warning
Give your AI API key the minimum scope it needs. For monitoring and debugging, a read-scoped key is sufficient. Only use admin scope if you need the AI to delete resources.

Credits

AI usage is billed through a prepaid credit system:

  • Credit packs -- Available in $5, $10, $25, $50, and $100 increments.
  • No expiration -- Credits never expire. Use them at your own pace.
  • Per-conversation billing -- Each conversation deducts credits based on the model used and tokens consumed.
  • BYOK (Bring Your Own Key) -- Business plan users can supply their own Anthropic or OpenRouter API key for zero-markup pricing.