Authorization notice. Vitre is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.
Who it is forA mobile developer who ships a checkout or form page inside the app and wants the native side to react to it.
The problemMessages sent from a page handler can be lost when the native side starts waiting after they arrive.
The outcomeA workflow that clicks a button, receives a typed payload through awaitMessage, and posts an acknowledgement back into the page.
What you need first
- Kotlin 2.3.10 Multiplatform project (Android minSdk 24, iOS 15.0+, or desktop with JetBrains Runtime and JCEF 21)
- Maven Central access, which is the only setup needed for the published artifacts
- Compose Multiplatform if you want the optional vitre-compose UI layer
Steps
- Add vitre-core to commonMain dependencies.
- Define @Serializable payload classes for the messages you send and receive.
- Load your page with loadHtml or navigate, then waitFor and click the target element.
- Add awaitMessage with a type and a timeoutMs, then postMessage with an id and typed payload.
- On Completed, call event.decodePayload for the awaited variable.
Prompt for your agent
In <project-path>, write a Vitre workflow that loads <page-html>, clicks <button-selector>, awaits a payload of type <message-type>, and posts an acknowledgement back. Expected output: the decoded payload in the Completed event. Verify that the message is received even when the page posts it synchronously on click.
Caveat. The README says click dispatches a synthetic DOM click that does not prove the site's operation completed, so verify results with waitFor, extraction, or the bridge acknowledgement.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for ggoggam/vitre and "Exchange typed messages with a page you own"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer