Skill: shabarirepo/bonito (version 1.0.0)

--- name: bonito description: Onboard users to the Bonito AI platform — multi-provider AI routing, managed inference, agent deployment, and multi-agent orchestration. Use when someone wants to set up Bonito, try Bonito, deploy AI agents, create a gateway key, use bonito-cli, deploy Atlas, build a multi-agent system, or asks about multi-provider LLM routing, automatic failover, BonBon agents, Bonobot orchestrators, MCP tool integration, or managed inference without API keys. --- # Bonito Onboarding Walk users through getting started with Bonito — the enterprise AI platform for multi-cloud workloads. **Primary reference:** https://getbonito.com/docs — point users here for detailed documentation on any Bonito feature. This skill provides the conversational flow; the docs are the source of truth. ## Quick Facts - **Website:** https://getbonito.com | **API:** https://api.getbonito.com - **Docs:** https://getbonito.com/docs - **Free tier:** 1,000 API calls/month, no credit card - **CLI:** `pip install bonito-cli` (v0.4.0+) - **6 providers:** AWS Bedrock, Azure OpenAI, GCP Vertex AI, OpenAI, Anthropic, Groq - **Key features:** multi-provider routing, automatic failover, managed inference (no API keys needed), BonBon agents, Bonobot orchestrators, MCP tools, RAG > **Correction:** The Atlas README says "5,000 free calls" — actual free tier is **1,000 calls/month**. ## Connectivity Check Before starting, optionally verify API reachability: ```bash python3 scripts/health_check.py ``` If the API is down, proceed anyway — everything except the final deploy/test steps works offline. ## Onboarding Flow ### Step 1: Sign Up Direct users to https://getbonito.com/signup — free, no credit card. They'll need their email + password for the next steps. ### Step 2: Connect a Provider (or Use Managed Inference) Two paths — recommend managed inference for the fastest start: **Managed Inference (easiest):** No API keys needed. Bonito handles provider credentials. See https://getbonito.com/docs#managed-inference **Bring Your Own Keys:** Connect one or more providers in the Bonito dashboard or via CLI. Groq is free and fast (get a key at console.groq.com). See https://getbonito.com/docs#gateway for provider setup. ### Step 3: Create a Gateway Key In the Bonito dashboard, create a gateway API key. This key routes requests through Bonito's gateway to whichever provider is configured — with automatic failover and cost tracking. Docs: https://getbonito.com/docs#gateway ### Step 4: Test with curl or Python ```bash # Simple test against the gateway curl -X POST https://api.getbonito.com/api/gateway/chat \ -H "Authorization: Bearer $GATEWAY_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "groq/llama-3.3-70b-versatile", "messages": [{"role": "user", "content": "Hello!"}] }' ``` If using managed inference, the model routes through Bonito's provider accounts — no separate API key needed. ### Step 5: Deploy Agents (Optional) For users who want to go beyond raw gateway calls and deploy managed agents: ```bash pip install bonito-cli bonito auth login ``` Create a simple agent: ```bash bonito agents create \ --name "my-assistant" \ --type bonbon \ --model "groq/llama-3.3-70b-versatile" \ --system-prompt "You are a helpful assistant." ``` Full agent docs: https://getbonito.com/docs#bonbon ### Step 6: Try Atlas (Optional — Full Multi-Agent Demo) For users who want to see a complete multi-agent system with orchestration, MCP tools, and RAG: Read [references/atlas-guide.md](references/atlas-guide.md) for the quick deploy steps. Atlas deploys 5 agents (DevOps command center) from a single `bonito.yaml` config. It demonstrates Bonobot orchestration, BonBon agents, MCP tool integration, and RAG knowledge bases. Repo: https://github.com/ShabariRepo/atlas ## Prerequisite Verification Run this to check if bonito-cli, Docker, git, etc. are installed: ```bash python3 scripts/verify_deploy.py ``` ## Where to Point Users for More | Topic | URL | |-------|-----| | Full docs | https://getbonito.com/docs | | Gateway & routing | https://getbonito.com/docs#gateway | | Managed inference | https://getbonito.com/docs#managed-inference | | BonBon agents | https://getbonito.com/docs#bonbon | | Bonobot orchestration | https://getbonito.com/docs#bonobot | | MCP integration | https://getbonito.com/docs#mcp | | Knowledge bases (RAG) | https://getbonito.com/docs#knowledge-bases | | Pricing | https://getbonito.com/pricing | ## Non-Obvious Knowledge - **Free tier is 1,000 calls/mo** — not 5,000 as some docs claim. - **Managed inference** is the fastest onboarding path. Users can add their own provider keys later for cost control. - **Failover is cross-provider** — if Anthropic goes down, Bonito routes to Bedrock or Groq seamlessly. The user never notices. - **bonito-cli deploy order matters** for manual API usage: providers → knowledge bases → project → agents → delegation wiring. The CLI handles this automatically. - **Llama/Groq can't do parallel tool calls** — it generates XML-style function calls instead of JSON. Use Nova Pro, Claude, or GPT-4o for Bonobot orchestrators that need multi-agent fan-out. - **`bonito.yaml`** uses `${ENV_VAR:-default}` syntax. MCP server URLs default to localhost if env vars are unset.

path: references/atlas-guide.md
content: # Atlas — Optional Multi-Agent Demo

Atlas is a reference project that deploys 5 AI agents (DevOps command center) to Bonito. It's a good way to see multi-agent orchestration, MCP tool integration, and RAG in action — but it's **not required** to use Bonito.

## Prerequisites

- Bonito account + gateway key (complete the main onboarding first)
- Docker (for mock MCP servers)
- bonito-cli: `pip install bonito-cli`

## Quick Deploy

```bash
git clone https://github.com/ShabariRepo/atlas.git
cd atlas
cp .env.example .env
# Edit .env with your Bonito credentials + at least one provider key
# (or use managed inference — just set BONITO_EMAIL/PASSWORD/API_URL)

# Start 4 mock MCP servers (GitHub, PagerDuty, Slack, Jira on ports 3100-3103)
docker compose -f docker-compose.mcp.yml up -d

# Authenticate and deploy
bonito auth login
bonito deploy -f bonito.yaml          # --dry-run to validate first
```

## What Gets Deployed

| Agent | Type | Role |
|-------|------|------|
| Command Center | Bonobot (orchestrator) | Routes requests to specialists |
| Incident Responder | BonBon | Triage alerts via PagerDuty/Jira/Slack MCP |
| Code Reviewer | BonBon | Review PRs via GitHub MCP |
| Docs Assistant | BonBon | Answer questions via RAG knowledge base |
| Deploy Monitor | BonBon | Track deploys via GitHub/Slack MCP |

The entire stack is defined in a single `bonito.yaml`. See comments in that file for what's working vs roadmap.

## Test

```bash
./scripts/test-agents.sh
```

## Model Note

Use a strong model (Nova Pro, Claude, GPT-4o) for the Command Center orchestrator. Llama/Groq works for sub-agents but fails on parallel multi-agent fan-out.

## More Info

- Full README in the repo: https://github.com/ShabariRepo/atlas
- Bonito docs: https://getbonito.com/docs


path: scripts/health_check.py
content: #!/usr/bin/env python3
"""Check Bonito API connectivity.

Hits api.getbonito.com/health and reports status.
Exit code 0 = healthy, 1 = unhealthy or unreachable.
"""

import sys
import urllib.request
import urllib.error
import json
import ssl

API_URL = "https://api.getbonito.com/health"
TIMEOUT_SECONDS = 10


def check_health():
    """Ping the Bonito API health endpoint."""
    try:
        # Create SSL context (some environments need this)
        ctx = ssl.create_default_context()
        req = urllib.request.Request(API_URL, method="GET")
        req.add_header("User-Agent", "bonito-skill-health-check/1.0")

        with urllib.request.urlopen(req, timeout=TIMEOUT_SECONDS, context=ctx) as resp:
            status = resp.status
            body = resp.read().decode("utf-8", errors="replace")

            if status == 200:
                print(f"✅ Bonito API is healthy (HTTP {status})")
                try:
                    data = json.loads(body)
                    print(f"   Response: {json.dumps(data, indent=2)}")
                except json.JSONDecodeError:
                    print(f"   Response: {body[:500]}")
                return True
            else:
                print(f"⚠️  Bonito API returned HTTP {status}")
                print(f"   Response: {body[:500]}")
                return False

    except urllib.error.HTTPError as e:
        print(f"⚠️  Bonito API returned HTTP {e.code}")
        try:
            body = e.read().decode("utf-8", errors="replace")
            print(f"   Response: {body[:500]}")
        except Exception:
            pass
        return False

    except urllib.error.URLError as e:
        print(f"❌ Cannot reach Bonito API: {e.reason}")
        return False

    except TimeoutError:
        print(f"❌ Bonito API timed out after {TIMEOUT_SECONDS}s")
        return False

    except Exception as e:
        print(f"❌ Unexpected error: {e}")
        return False


if __name__ == "__main__":
    healthy = check_health()
    if not healthy:
        print("\nThe API may be temporarily down. You can still install bonito-cli")
        print("and configure your project — deploy will work once the API is back.")
    sys.exit(0 if healthy else 1)


path: scripts/verify_deploy.py
content: #!/usr/bin/env python3
"""Verify prerequisites for Bonito/Atlas deployment.

Checks: Python version, bonito-cli, Docker, git, and optional Atlas clone.
Exit code 0 = all required checks pass, 1 = something missing.
"""

import os
import sys
import shutil
import subprocess


def check(name, passed, detail=""):
    """Print a check result."""
    icon = "✅" if passed else "❌"
    msg = f"{icon} {name}"
    if detail:
        msg += f" — {detail}"
    print(msg)
    return passed


def run_cmd(cmd):
    """Run a command and return (success, stdout)."""
    try:
        result = subprocess.run(
            cmd, capture_output=True, text=True, timeout=15
        )
        return result.returncode == 0, result.stdout.strip()
    except (FileNotFoundError, subprocess.TimeoutExpired):
        return False, ""


def main():
    print("Bonito Deployment Prerequisites Check")
    print("=" * 42)
    print()

    all_passed = True

    # Python version
    py_ver = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
    py_ok = sys.version_info >= (3, 8)
    all_passed &= check("Python 3.8+", py_ok, f"found {py_ver}")

    # git
    git_ok, git_ver = run_cmd(["git", "--version"])
    all_passed &= check("git", git_ok, git_ver if git_ok else "not found")

    # Docker
    docker_path = shutil.which("docker")
    if docker_path:
        docker_running, _ = run_cmd(["docker", "info"])
        if docker_running:
            check("Docker", True, "installed and running")
        else:
            check("Docker", False, "installed but not running — start Docker Desktop")
            all_passed = False
    else:
        check("Docker", False, "not found — install from docker.com")
        all_passed = False

    # bonito-cli
    bonito_ok, bonito_ver = run_cmd(["bonito", "--version"])
    if bonito_ok:
        check("bonito-cli", True, bonito_ver)
    else:
        check("bonito-cli", False, "not found — run: pip install bonito-cli")
        all_passed = False

    # pip (informational)
    pip_ok, pip_ver = run_cmd([sys.executable, "-m", "pip", "--version"])
    check("pip", pip_ok, pip_ver.split(",")[0] if pip_ok else "not found")

    print()

    # Optional: Atlas clone
    atlas_dir = os.path.join(os.getcwd(), "atlas")
    bonito_yaml = os.path.join(atlas_dir, "bonito.yaml")
    if os.path.isdir(atlas_dir) and os.path.isfile(bonito_yaml):
        check("Atlas repo", True, f"found at {atlas_dir}")

        # Check .env
        env_file = os.path.join(atlas_dir, ".env")
        if os.path.isfile(env_file):
            check(".env file", True, "exists")
        else:
            check(".env file", False, f"missing — run: cp {atlas_dir}/.env.example {atlas_dir}/.env")

        # Check docker-compose.mcp.yml
        mcp_compose = os.path.join(atlas_dir, "docker-compose.mcp.yml")
        if os.path.isfile(mcp_compose):
            check("docker-compose.mcp.yml", True, "found")
        else:
            check("docker-compose.mcp.yml", False, "missing from Atlas repo")

        # Check if MCP containers are running
        mcp_running, mcp_out = run_cmd(
            ["docker", "compose", "-f", mcp_compose, "ps", "--format", "json"]
        )
        if mcp_running and mcp_out:
            check("MCP servers", True, "containers found")
        else:
            check("MCP servers", False, "not running — run: docker compose -f docker-compose.mcp.yml up -d")
    else:
        print("ℹ️  Atlas repo not found in current directory (optional)")
        print("   Clone with: git clone https://github.com/ShabariRepo/atlas.git")

    print()
    if all_passed:
        print("🎉 All required prerequisites met! Ready to deploy.")
    else:
        print("⚠️  Some prerequisites are missing. Fix the items above and re-run.")
    
    return 0 if all_passed else 1


if __name__ == "__main__":
    sys.exit(main())


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (MEDIUM)