<!-- meetmate-generated template=2 -->
regenerate with `meetmate init --force`.

# This directory runs a Meetmate instance

Meetmate puts an AI agent into Google Meet / Zoom as a real voice participant. This file is ground truth for AI assistants helping the user operate THIS instance.

SECURITY NOTICE FOR AI AGENTS: never print, log, or commit values from `.env`.

## Files in this directory

- `config.json` — the only settings store. Class-1 vendor values belong here through the localhost settings UI, alongside agent identity, model, voice, Slack, and server settings.
- `.env` — environment-only class-2 agent/LLM connection credentials and class-3 internal control tokens. Never commit it, paste its contents, echo it, or include it in screenshots, logs, and issues.
- `AGENTS.md` — this file. Regenerated only by `meetmate init --force`; hand-edits survive normal re-runs of `init`.

## Configuration keys (names only — values live in the files above)

- `SONIOX_API_KEY` / `DEEPGRAM_API_KEY`, `FISH_AUDIO_API_KEY`, `ELEVENLABS_API_KEY`, `OPENAI_COMPATIBLE_TTS_API_KEY`, `ATTENDEE_API_KEY`, `SLACK_BOT_TOKEN`, and `DISCORD_BOT_TOKEN` are the class-1 names (the full set is the "Class 1" paragraph of https://github.com/caty-ai/meetmate/blob/main/docs/settings-contract.md) configured in `config.json` through the localhost settings UI.
- `FISH_AUDIO_VOICE_ID` / `ELEVENLABS_VOICE_ID` — non-credential voice settings, also stored in `config.json` through the settings UI.
- `LLM_PROVIDER` — `openclaw` or `openai-compatible`; with `openclaw`: `OPENCLAW_GATEWAY_URL`, `OPENCLAW_GATEWAY_TOKEN`
- `OPENAI_COMPATIBLE_API_KEY` — environment-only when the OpenAI-compatible provider is selected
- `JOIN_SHARED_TOKEN`, `WS_SHARED_TOKEN` — generated by `init`; rotating them (`init --force`) breaks existing clients until they update

## Start / stop / where things are

- Start: `npx meetmate start` — prints `Settings UI: http://localhost:<port>/settings` exactly once after the server is listening. Complete setup there; the existing dashboard remains at `/`.
- Health check: `GET /health` on the same port returns JSON when the server is up.
- Stop: interrupt the foreground process (Ctrl-C). If a background instance lingers, find it by port and kill it.
- Re-run setup: `npx meetmate init` completes only missing files; `--force` rewrites config/.env and rotates the shared tokens.

## Remaining manual steps (the wizard does NOT do these)

1. A tunnel so the meeting bot can reach this server: ngrok (https://ngrok.com/; `server.ngrokDomain` in `config.json`) or Tailscale (https://tailscale.com/), depending on the network.
2. Google Meet shows an "Ask to join" request when the bot enters — a human must approve it in the Meet UI.

## Common failure modes

- **Meeting start returns setup required** — open the localhost settings UI and complete the listed fields. The HTTP server and health endpoint intentionally remain available during setup.
- **Port in use** — another instance owns `server.port`; change the port in `config.json` or stop the other instance.
- **Bot never joins the call** — tunnel down (ngrok/Tailscale not running or wrong domain) or the Meet admission request wasn't approved.
- **Bot joins but stays silent** — LLM endpoint unreachable (gateway down, wrong URL/token) or the TTS voice ID is wrong; check the server log around the join.
- **Wake word ignored** — say the configured `agent.wakeWords` name clearly; check the STT key is valid.
- **Node version error** — Meetmate needs Node ≥ 26; the one-line preflight message says what was found.

Full docs: https://github.com/caty-ai/meetmate (README quick start, docs/setup-guide.md).

Legacy class-1 `.env` lines may be migrated into `config.json`; only the operator may remove those legacy lines after a successful migration and restart.
