Skip to content

fix(agent): CLI agent profile switch + provisioner config recovery - #23

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/fix-cli-agent-profile-switch-231a
Aug 7, 2026
Merged

fix(agent): CLI agent profile switch + provisioner config recovery#23
cursor[bot] merged 1 commit into
mainfrom
cursor/fix-cli-agent-profile-switch-231a

Conversation

@venkateshsakamuri-lab

Copy link
Copy Markdown
Contributor

Summary

Enables reliable deepsql agent one-shot / interactive turns against a native local stack.

Changes

  • AgentChatClient: keep a CookieManager and call /api/profile/switch before session/chat (same as the browser Agent tab). Surface SSE error/apperror instead of returning an empty “success”.
  • scripts/local-agent-provisioner.py: if ~/.hermes/profiles/u-*/config.yaml is corrupt (PyYAML fail / missing model:), restore from ~/.hermes/config.yaml, re-apply MCP overlay, and validate the dump before writing.
  • AGENTS.md: document CLI install/auth, AGENT_WEBUI_URL for native runs, and the corrupt-profile → Missed model deployment failure mode.

Verified

deepsql whoami   # admin @ http://127.0.0.1:8080
deepsql agent --connection <demo_shop uuid> "How many customers and orders? Top 3…"
# → 20 customers, 100 orders + ranking table

Requires backend (:8080), agent API (:8787), and local provisioner (:8788) with AGENT_WEBUI_URL=http://127.0.0.1:8787.

Open in Web Open in Cursor 

@venkateshsakamuri-lab
venkateshsakamuri-lab marked this pull request as ready for review August 7, 2026 10:52
@cursor

cursor Bot commented Aug 7, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@cursor
cursor Bot changed the base branch from kaushik-IDE to main August 7, 2026 10:56
…r recovery

AgentChatClient now switches hermes_profile (CookieManager) before session/chat
calls so CLI/Slack match the browser Agent tab. Surface SSE error events instead
of empty answers. Local provisioner recovers corrupt profile config.yaml (which
dropped model: and caused Missed model deployment) and validates dumps.

Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
@cursor
cursor Bot force-pushed the cursor/fix-cli-agent-profile-switch-231a branch from f9cfed0 to 5c7122d Compare August 7, 2026 11:02
@cursor
cursor Bot merged commit c9f6337 into main Aug 7, 2026
7 checks passed
@cursor
cursor Bot deleted the cursor/fix-cli-agent-profile-switch-231a branch August 7, 2026 11:04
@cursor

cursor Bot commented Aug 7, 2026

Copy link
Copy Markdown

Merged to main via direct merge (c9f6337).

vs #24: profile cookie switch was already in #24. This PR still added:

  • SSE error/apperror surfacing + fail on empty answer
  • local-agent-provisioner.py corrupt config.yaml recovery
  • AGENTS.md CLI / AGENT_WEBUI_URL notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants