Skip to content

Commit 142854f

Browse files
venkateshsakamuri-labcursoragentgeekypunk
authored
docs(agents): Cloud env caveats for Hermes MCP + multi-schema (#53)
<!-- CURSOR_AGENT_PR_BODY_BEGIN --> ## Summary Durable `AGENTS.md` Cloud caveats discovered during E2E/setup: - Restart Hermes webui / current provisioner after MCP token rotation (`mcpAuthOk: true` but tools 401) - Multi-schema ACME fixture schemas for Brain/MCP checks - Correct `SECURITY_AUTH_ENABLED` guidance (auth is ON; use bootstrap admin) ## Test plan - [x] Stack health (Postgres/Redis/backend/frontend/Hermes/provisioner) - [x] Login + SQL hello-world on multi-schema connection - [x] Backend compile; frontend lint baseline documented <!-- CURSOR_AGENT_PR_BODY_END --> <div><a href="https://cursor.com/agents/bc-8ce91e70-c67b-48c6-84b3-05bb9d06231a?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-8ce91e70-c67b-48c6-84b3-05bb9d06231a&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Krishna Sasank Talasila <sasanktk@gmail.com>
1 parent 1925eca commit 142854f

1 file changed

Lines changed: 20 additions & 3 deletions

File tree

AGENTS.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,11 @@ only covers cloud-specific, non-obvious caveats.
199199
hardcodes `ENCRYPTION_KEYS=${ENCRYPTION_KEYS:}`; with the OS env var unset this is a
200200
circular placeholder reference that fails `EncryptionService` bean creation at boot. The
201201
local `.env` sets `ENCRYPTION_KEYS=<id>:<base64key>` matching `ENCRYPTION_KEY_ID`.
202-
- **`SECURITY_AUTH_ENABLED=false`** (set in `.env`) enables the dev auto-admin bypass, so the
203-
web UI needs no login. Auth defaults to ON in every profile otherwise (there is no
204-
`admin/admin`); a real login needs the localhost admin-bootstrap flow (see README).
202+
- **`SECURITY_AUTH_ENABLED`** defaults to ON. This Cloud VM’s `.env` sets it
203+
`true` and uses a real admin user (`admin@localhost` — create via localhost
204+
bootstrap if missing; see `CLAUDE.md`). `SECURITY_AUTH_ENABLED=false` only
205+
bypasses JWT/MCP token *validation*; it does not skip the login form or mint
206+
an admin. Dev credentials are never `admin/admin`.
205207
- **The `scheduled_tasks` table and the `vector`/`pg_stat_statements` extensions** come from
206208
`docker/postgres/init/*.sql`. In the native (non-Docker) setup those were applied by hand;
207209
they persist in the snapshot. If you ever recreate the vault DB, re-apply
@@ -242,6 +244,21 @@ only covers cloud-specific, non-obvious caveats.
242244
over `~/.hermes/profiles/u-<user>/config.yaml` and re-POST `/provision`. Symptom
243245
of a bad profile: Hermes logs `Missed model deployment` and CLI agent returns
244246
empty / “ended before producing an answer”.
247+
- **After rotating MCP tokens, restart Hermes webui (and ensure the provisioner is
248+
current).** `scripts/local-agent-provisioner.py` writes `DEEPSQL_TOKEN_FILE` +
249+
`DEEPSQL_AUTH_TOKEN` into the profile; an old long-lived provisioner process will
250+
skip the token-file path. Even with a fresh profile config, Hermes webui can keep
251+
a stale MCP subprocess env (no auth token, `DEEPSQL_MCP_USER_ID=deepsql-agent`).
252+
Symptom: Agent tab tools return `Unauthorized - Please login` while
253+
`/api/agent/session` reports `mcpAuthOk: true`. Fix: restart
254+
`scripts/local-agent-provisioner.py`, re-open Agent (re-provision), restart the
255+
Hermes webui on `:8787`, and sync default `~/.hermes/config.yaml`
256+
`mcp_servers.deepsql.env` from the active `u-<user>` profile if the shared MCP
257+
is what webui spawns.
258+
- **Multi-schema fixture.** This VM’s Postgres also has an ACME-style DB with
259+
non-`public` schemas (`crm`, `sales`, `finance`, `hr`, `inventory`) for Brain /
260+
MCP cross-schema checks. Prefer schema-qualified SQL (`sales.orders`); bare
261+
names follow the role’s `search_path` (usually `public`).
245262
- **`AGENT_WEBUI_URL` for native runs.** Default is `http://deepsql-agent:8787`
246263
(Compose DNS). Native local must set `AGENT_WEBUI_URL=http://127.0.0.1:8787` in
247264
`.env` or CLI/Slack `AgentChatClient` cannot reach the agent API.

0 commit comments

Comments
 (0)