diff --git a/website/docs/user-guide/messaging/teams.md b/website/docs/user-guide/messaging/teams.md index 3b4046db5f519..0cc3d8382c313 100644 --- a/website/docs/user-guide/messaging/teams.md +++ b/website/docs/user-guide/messaging/teams.md @@ -104,15 +104,35 @@ TEAMS_ALLOWED_USERS= ## Step 5: Start the Gateway +**Docker** (must run from the directory that contains `docker-compose.yml` — usually your cloned `hermes-agent` repo, not `~`): + ```bash +cd /path/to/hermes-agent HERMES_UID=$(id -u) HERMES_GID=$(id -g) docker compose up -d gateway ``` -This starts the gateway. The default webhook port is `3978` (override with `TEAMS_PORT`). Check that it's running: +**Native / systemd install** (typical `hermes` one-liner installer under `~/.hermes/hermes-agent`): + +```bash +hermes gateway restart +# or foreground: hermes gateway run +``` + +The Teams SDK is optional; when Teams is enabled, the gateway lazy-installs it into Hermes' own venv on first start (do **not** use system `pip install` on Ubuntu 24.04 — that hits PEP 668 `externally-managed-environment`). To install manually into the Hermes venv: + +```bash +~/.hermes/hermes-agent/venv/bin/pip install 'microsoft-teams-apps==2.0.13.4' 'aiohttp==3.14.1' +# or from a clone of the agent: uv sync --extra teams +``` + +The default webhook port is `3978` (override with `TEAMS_PORT`). Check that it's running: ```bash curl http://localhost:3978/health # should return: ok +# Docker: docker logs -f hermes +# Native: +hermes gateway status -l ``` Look for: @@ -234,13 +254,15 @@ Make sure your configured port (`TEAMS_PORT`, default `3978`) is reachable from | Problem | Solution | |---------|----------| +| `Can't find a suitable configuration file` from `docker compose` | You are not in the repo that has `docker-compose.yml`, or you are on a native install — use `hermes gateway restart` instead, or `cd` into the clone first | +| `requirements not met (pip install microsoft-teams-apps …)` / `No adapter available for teams` | Restart gateway so lazy-install can run, or install into the **Hermes venv**: `~/.hermes/hermes-agent/venv/bin/pip install 'microsoft-teams-apps==2.0.13.4' 'aiohttp==3.14.1'`. System `pip` fails on Ubuntu 24.04 (PEP 668) and would not affect the service anyway | | `health` endpoint works but bot doesn't respond | Check that your tunnel is still running and the bot's messaging endpoint matches the tunnel URL | | `KeyError: 'teams'` in logs | Restart the container — this is fixed in the current version | | Bot responds with auth errors | Verify `TEAMS_CLIENT_ID`, `TEAMS_CLIENT_SECRET`, and `TEAMS_TENANT_ID` are all set correctly | | `No inference provider configured` | Check that `ANTHROPIC_API_KEY` (or another provider key) is set in `~/.hermes/.env` | | Bot receives messages but ignores them | Your AAD object ID may not be in `TEAMS_ALLOWED_USERS`. Run `teams status --verbose` to find it | | Tunnel URL changes on restart | devtunnel URLs are persistent if you use a named tunnel (`devtunnel create hermes-bot`). ngrok and cloudflared generate a new URL each run unless you have a paid plan — update the bot endpoint with `teams app update` when it changes | -| Teams shows "This bot is not responding" | The webhook returned an error. Check `docker logs hermes` for tracebacks | +| Teams shows "This bot is not responding" | The webhook returned an error. Check `docker logs hermes` / `hermes gateway status -l` for tracebacks | | `[teams] Failed to connect` in logs | The SDK failed to authenticate. Double-check your credentials and that the tenant ID matches the account you used in `teams login` | ---