Skip to content

Conversation

@arthursita-plank
Copy link

@arthursita-plank arthursita-plank commented Feb 3, 2026

EHR System Automation Template

This template demonstrates how to run an agentic browser workflow on Kernel to automate an Electronic Health Records (EHR) portal. It uses an Anthropic Computer Use loop with Kernel's Computer Controls API.

Logic

The automation performs the following steps:

  1. Navigate to the EHR login page (https://ehr-system-six.vercel.app/login).
  2. Authenticate using valid credentials (any email/password works for this demo).
  3. Navigate to the Medical Reports section in the dashboard.
  4. Click the Download Summary of Care button to download the report.

Quickstart

Deploy:

kernel deploy index.ts -e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY

Invoke:

kernel invoke ehr-system export-report

View logs:

kernel logs ehr-system --follow

Notes

  • The login page must be publicly reachable from the Kernel browser session.
  • Update the URL in pkg/templates/typescript/ehr-system/index.ts if you host the portal elsewhere.

Requirements

  • ANTHROPIC_API_KEY environment variable set.
  • Kernel CLI installed and authenticated.

Note

Low Risk
Primarily adds new app templates and updates docs; no changes to core CLI behavior beyond embedding additional template files (main risk is template correctness/size).

Overview
Adds two new kernel create templates: ehr-system (TypeScript), an Anthropic Computer Use + Kernel Computer Controls demo that can optionally record browser replays, and lead-scraper (Python), a Google Maps lead scraper built on browser-use with Pydantic I/O models.

Updates the top-level README.md to list the new templates and include example kernel create commands, and adds the template source trees (including helper utilities like robust lead-output parsing and a minimal Computer Use tool implementation for Kernel’s computer controls API).

Written by Cursor Bugbot for commit f620090. This will update automatically on new commits. Configure here.

@arthursita-plank arthursita-plank changed the title feat (template): add ehr typescript template Feat(templates): add ehr typescript template Feb 3, 2026
… Use, specify a new EHR portal URL, and require `ANTHROPIC_API_KEY`.
Copy link

@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 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

onlyNMostRecentImages,
imageTruncationThreshold
);
}
Copy link

Choose a reason for hiding this comment

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

Image filtering feature is unreachable due to variable reassignment

Medium Severity

The onlyNMostRecentImages parameter is rendered non-functional because enablePromptCaching is hardcoded to true (line 92), which causes onlyNMostRecentImages to always be set to 0 (line 97) before the filtering check at line 101. Since 0 is falsy, the maybeFilterToNMostRecentImages function can never execute, making the onlyNMostRecentImages parameter ineffective. This breaks the intended image truncation feature for controlling context window size.

Fix in Cursor Fix in Web

role: 'user',
content: toolResultContent,
});
}
Copy link

Choose a reason for hiding this comment

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

Potential infinite loop when tool validation fails

Medium Severity

When the LLM returns stop_reason: 'tool_use' but the tool_use block fails internal validation (e.g., missing action field or action is not a string), the loop will continue indefinitely. The exit condition at line 184 requires response.stop_reason !== 'tool_use' to be true, but when stop_reason is 'tool_use' and no valid tool results are generated, no new messages are pushed and the same API call repeats forever.

Fix in Cursor Fix in Web

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.

1 participant