Skip to content

Update deep research agent template dashboard#90

Open
shriyatheunicorn wants to merge 16 commits into
devfrom
add-deep-research-agent-template
Open

Update deep research agent template dashboard#90
shriyatheunicorn wants to merge 16 commits into
devfrom
add-deep-research-agent-template

Conversation

@shriyatheunicorn
Copy link
Copy Markdown

@shriyatheunicorn shriyatheunicorn commented May 6, 2026

Summary

  • update the deep research agent dashboard to match the Browserbase Vercel preview styling
  • add the Browserbase logo asset, simplified topbar branding, static pipeline details, and clearer raw output labeling
  • keep direct file:// opens pointed at local dev API candidates instead of an external deployment
  • remove the root index.ts Vercel function config so the static public/ UI plus /api/research deploy cleanly in the Browserbase Vercel project
  • address Cursor Bugbot findings around async error handling, local concurrency, static logo serving, verifier summary consistency, source-domain caps, and failed pipeline styling
  • remove the old hidden sidebar markup and dead sidebar interactions

Verification

  • npm run check
  • node scripts/check-readme-template-index.mjs
  • inline dashboard script syntax check
  • local server smoke check for /, /api/health, and /browserbase-logo.svg

Note

Medium Risk
Large new template adds a full research pipeline plus serverless/local HTTP endpoints that call external Browserbase/Stagehand services, so failures or misconfiguration can affect runtime cost and reliability. Changes are mostly additive and isolated to the new typescript/deep-research-agent directory plus a README index entry.

Overview
Adds a new typescript/deep-research-agent template that runs an iterative search → fetch → browser fallback → synthesis → verification research loop, persisting run workspaces (plan.md, strategy.md, traces, reports) and returning a structured JSON/Markdown brief with source IDs, claim maps, and verifier output.

Includes a static dashboard UI (public/index.html + logo) with local server support (src/local-web.ts) and Vercel serverless handlers (api/health.ts, api/research.ts, vercel.json) that expose /api/research and health checks, plus a benchmark mode that loads TSV/JSON/JSONL tasks and writes aggregate results.

Updates the root README.md template table to list deep-research-agent, and adds template-level project setup (package.json, .env.example, .gitignore) and response utilities in src/api-utils.ts.

Reviewed by Cursor Bugbot for commit 7f339a5. Bugbot is set up for automated code reviews on this repo. Configure here.

Comment thread typescript/deep-research-agent/src/research.ts
Comment thread typescript/deep-research-agent/index.ts Outdated
Copy link
Copy Markdown
Author

bugbot run verbose=true

@cursor
Copy link
Copy Markdown

cursor Bot commented May 7, 2026

Bugbot request id: serverGenReqId_99a1e2b6-44c5-4517-8468-61436b1da0dc

Comment thread typescript/deep-research-agent/package.json Outdated
Comment thread typescript/deep-research-agent/src/research.ts Outdated
Comment thread typescript/deep-research-agent/index.ts Outdated
Comment thread typescript/deep-research-agent/src/api-utils.ts Outdated
Comment thread typescript/deep-research-agent/public/index.html
Comment thread typescript/deep-research-agent/src/local-web.ts
Comment thread typescript/deep-research-agent/src/research.ts Outdated
Comment thread typescript/deep-research-agent/src/research.ts
Comment thread typescript/deep-research-agent/src/api-utils.ts
@shriyatheunicorn shriyatheunicorn force-pushed the add-deep-research-agent-template branch from fba2b10 to c7da4fe Compare May 12, 2026 18:48
@shriyatheunicorn shriyatheunicorn changed the title Add deep research agent template Update deep research agent template dashboard May 14, 2026
@shriyatheunicorn shriyatheunicorn marked this pull request as draft May 14, 2026 23:18
Comment thread typescript/deep-research-agent/public/index.html
Comment thread typescript/deep-research-agent/src/research.ts Outdated
Comment thread typescript/deep-research-agent/public/index.html
Comment thread typescript/deep-research-agent/public/index.html Outdated
Comment thread typescript/deep-research-agent/public/index.html Outdated
Comment thread typescript/deep-research-agent/src/api-utils.ts Outdated
Comment thread typescript/deep-research-agent/src/research.ts Outdated
Comment thread typescript/deep-research-agent/src/research.ts
Comment thread typescript/deep-research-agent/src/research.ts Outdated
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7f339a5. Configure here.

} catch (error) {
notice.innerHTML = `<div class="notice">${escapeHtml(error.message || String(error))}</div>`;
setStatus("Error", "error");
setPipeline("failed", Math.max(0, (loadingStepIndex - 1) % pipelineSteps.length));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed pipeline step highlights wrong stage after cycling

Low Severity

The loadingStepIndex increments every 3.6 seconds and wraps via % pipelineSteps.length (6). After ~21.6 seconds the index cycles past all steps. On failure, the expression (loadingStepIndex - 1) % pipelineSteps.length wraps to a low value — e.g., when loadingStepIndex is 7, the result is 0, marking "Planning" as failed instead of the later stage where the run actually was. Since the estimated run time is 240 seconds, most real failures would highlight the wrong pipeline step. Using Math.min(pipelineSteps.length - 1, loadingStepIndex - 1) instead of the modulo would cap at the last step for long runs.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7f339a5. Configure here.

Co-authored-by: shriyatheunicorn <shriavj@gmail.com>
@shriyatheunicorn shriyatheunicorn marked this pull request as ready for review May 15, 2026 18:23
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is quite long and would be very hard for a beginner to follow or understand what's going on. Is there any way we can split this up into separate files?

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.

3 participants