$npx -y skills add AgamiAI/agami-core --skill agami-deployEARLY ACCESS (in testing) — usable today, but newer than the local single-player path; feedback welcome via a GitHub issue. Prepares a ready-to-run, self-hosted agami deploy bundle ON THE USER'S MACHINE so a team can stand up a shareable MCP server their Claude connects to. Conve
| 1 | # agami deploy — prepare a self-host bundle the user ships to their own host |
| 2 | |
| 3 | You are preparing a **deploy bundle** on the user's machine so they can stand up the multi-user agami |
| 4 | server (the HTTP MCP server with OAuth + admin) that their team's Claude connects to. The bundle pulls |
| 5 | the **published image** (`ghcr.io/agamiai/agami-core`) — there is **no repo to clone and nothing to |
| 6 | build**. You gather a few inputs, write the bundle locally, and hand off the cloud steps you can't do. |
| 7 | |
| 8 | The local mirror of this (single-player, no network, no auth) is `agami-serve` — if the user only wants |
| 9 | agami in their own Claude Desktop, point them there instead. |
| 10 | |
| 11 | ## HARD RULES (load-bearing — a deploy handles secrets) |
| 12 | |
| 13 | 1. **Never ask for the admin password (or any secret) in chat — not even temporarily.** The password is |
| 14 | typed by the **user** directly into the `agami.env` file (Phase 2 hand-off), exactly like `agami-connect` |
| 15 | does for DB credentials. You never see it. |
| 16 | 2. **Never put a secret on a Bash command line.** `prepare_deploy.py` takes only non-secret values; |
| 17 | `deploy_preflight` generates the signing secret *into the file*. Hosts render Bash calls in chat. |
| 18 | 3. **Username/password is the only auth this skill sets up.** Do **not** collect Google/Microsoft client |
| 19 | id/secret. Social login ships free but is a manual `agami.env` step — point the user at the in-repo deploy |
| 20 | README if they ask, and move on. |
| 21 | 4. **No signup, no license key, no LLM/embedding key.** None are required; don't ask for any. |
| 22 | |
| 23 | ## Conversation style |
| 24 | Tight and oriented. Print one-line progress markers (`✓ Bundle written to …`, `✓ agami.env validated`). |
| 25 | Be honest about what's the user's clicks (provision the VM, point DNS) vs what you automate. |
| 26 | |
| 27 | ## Phase −1: Plan-mode preflight |
| 28 | Run the detection logic from [`shared/plan-mode-check.md`](../../shared/plan-mode-check.md). This skill |
| 29 | writes files and may run Docker. If plan mode is active, refuse with: *"I can't prepare a deploy bundle |
| 30 | in plan mode — it writes the bundle + your agami.env and may run Docker. Switch to **Auto** or **Edit |
| 31 | Automatically** mode (Shift+Tab) and re-invoke me."* **DO NOT** write a plan file or call `ExitPlanMode`. |
| 32 | |
| 33 | ## Phase 0: Preflight |
| 34 | 1. **Resolve the environment** — `python3 "$AGAMI_PLUGIN_ROOT/scripts/connect_resolve.py"` prints JSON; |
| 35 | read `data.artifacts_dir` (the local model dir) and `data.interpreter.python3` (call it `$PY` — the |
| 36 | interpreter that has the agami-core package; use it for `deploy_preflight`). |
| 37 | 2. **Model present** — `<artifacts_dir>/<active_profile>/org.yaml` must exist. If there's no model yet, |
| 38 | stop and invoke `/agami-connect` first — the deployed server has nothing to serve without one. |
| 39 | |
| 40 | ## Phase 1: Gather the hard floor, then write the bundle |
| 41 | Ask only these (everything else is defaulted or generated). Prefer one compact exchange: |
| 42 | |
| 43 | 1. **Hostname** — "What address will your team connect to?" It must be a **hostname, not a bare IP** |
| 44 | (TLS + OAuth need a DNS name). → `PUBLIC_BASE_URL=https://<host>`. |
| 45 | - If they have **no domain / can't open ports**, offer the **Cloudflare tunnel** path (profiles |
| 46 | `bundled-db,tunnel`; they'll add `CLOUDFLARE_TUNNEL_TOKEN` to `agami.env`). The tunnel still needs a |
| 47 | domain on Cloudflare — it removes the public IP, not the name. |
| 48 | 2. **Admin** — first name, last name, work **email** (the email is the admin identity). |
| 49 | 3. *(only if they bring their own Postgres)* note it → use profiles `edge` (drops the bundled DB). The |
| 50 | managed `postgresql://…` URL is a **credential**, so do **not** collect it in chat — after the bundle |
| 51 | is written, the user sets `APP_DATABASE_URL` |