Skip to content

feat: containerize DeepSQL Agent as fifth Compose service - #44

Merged
venkateshsakamuri-lab merged 5 commits into
mainfrom
cursor/deepsql-agent-container-c497
Aug 13, 2026
Merged

feat: containerize DeepSQL Agent as fifth Compose service#44
venkateshsakamuri-lab merged 5 commits into
mainfrom
cursor/deepsql-agent-container-c497

Conversation

@venkateshsakamuri-lab

@venkateshsakamuri-lab venkateshsakamuri-lab commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Containerizes DeepSQL Agent as a fifth Compose service and hardens self-host install/demo-seed/agent paths so a fresh OSS install works end-to-end.

Test plan / results (pre-merge)

CI on prior tip d34c8c5 (same feature commits): all required checks green — backend compile/package, docker compose build, frontend build, frontend lint (advisory), mcp syntax, backend tests (advisory).

Local re-verification on this branch (including harness follow-up 67697c1):

  • ApiSmokeTest — PASS (3/3)
  • scripts/self-host/smoke-test.sh with DEEPSQL_SMOKE_WAIT_FOR_INIT=false — PASS (connection + agent nginx/profile/session paths)
  • scripts/self-host/e2e-agent-check.py against Demo Shop — PASS (AGENT_OK + DASH_OK)
  • GitHub Actions CI previously green for containerize + install/seed commits

Harness fixes in this PR tip:

  • Smoke re-logs in if JWT expires during long brain-init wait
  • E2E sends Hermes CSRF for browser-origin /agent-api POSTs
  • E2E asserts current_database() against the selected connection (not hardcoded dba_agent)

Notes

  • PR is mergeable into main.
  • Unrelated local unit flake: AgentOrchestratorTest.execute_emitsLiveProgressEventsAndAppliesApprovedWorkflow (not touched by this PR; CI backend suite is advisory/continue-on-error).
Open in Web Open in Cursor 

cursoragent and others added 4 commits August 12, 2026 03:07
Enterprise self-host no longer needs a host-side agent runtime. The new
`deepsql-agent` service (agent/Dockerfile) serves the Agent tab, AI
dashboards, Slack/CLI agent turns, and per-user profile provisioning on
the compose network (:8787 / :8788).

- Add agent/Dockerfile + docker-entrypoint.sh (DeepSQL-branded surface)
- Wire deepsql-agent into docker-compose.yml; nginx proxies /agent-api to it
- Default AGENT_WEBUI_URL / AGENT_PROVISIONER_URL to deepsql-agent
- install.sh generates AGENT_PROVISION_SECRET and builds the agent image
- Host setup-agent.sh remains for native/dev only (opt-in)
- Docs, smoke-test, and status scripts refer to DeepSQL Agent throughout

Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
Customer-style install.sh + DEEPSQL_SEED_DEMO_DATA uncovered several
silent failures:

- demo_shop orders aborted on float||' hours' interval casts (scientific
  notation); seed treated any existing DB as complete and used sslMode
  "disable" (treated as SSL-on) so the connection never saved
- Agent trusted-auth ignored X-Remote-User from the compose bridge
  without HERMES_WEBUI_TRUSTED_PROXY_CIDRS; browser POSTs also needed
  csrf_token from /api/auth/status for the React Agent tab

Verified: five containers healthy, smoke-test green, Demo Shop query
returns 5000 orders, Agent profile/switch + session/new OK.

Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
@cursor
cursor Bot force-pushed the cursor/deepsql-agent-container-c497 branch from 832d991 to d34c8c5 Compare August 12, 2026 03:09
Re-login when JWT expires during brain-init wait, send Hermes CSRF on
browser-origin agent-api POSTs, and assert current_database() against the
selected connection instead of hardcoding dba_agent.

Co-authored-by: Venkat SF <venkatesh.sakamuri@stayflexi.com>
@venkateshsakamuri-lab
venkateshsakamuri-lab marked this pull request as ready for review August 13, 2026 07:07
@cursor

cursor Bot commented Aug 13, 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.

@venkateshsakamuri-lab
venkateshsakamuri-lab merged commit c5025f8 into main Aug 13, 2026
7 checks passed
@venkateshsakamuri-lab
venkateshsakamuri-lab deleted the cursor/deepsql-agent-container-c497 branch August 13, 2026 07:08
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