Your coding agent

Let your coding agent fill a form in your running Flutter app, using the methods your buttons call.

Paste this prompt into your coding agent in your Flutter app's folder. The first setup takes about ten minutes and needs no backend or model API key.

Run `dart run skills@ add leancodepl/tandem --skill tandem --agent claude`, then read `.claude/skills/tandem/SKILL.md` and follow it.

In later sessions, run /tandem to use the installed skill. We test this workflow with Claude Code. The Cursor and Codex tabs provide setup instructions for trying it yourself.

Enable the bridge

The screen needs a TandemScope around a state class annotated with @TandemAgent(). The quick start sets this up.

Call TandemBridge.enable() in main() before runApp. The example app enables it like this:

void main() {
  TandemBridge.enable();
  runApp(const OrderDeskApp());
}

How it reaches the app

TandemBridge.enable() registers two VM service extensions in a debug build. ext.tandem.describe gives the open screens, with what the agent sees and may call. ext.tandem.call calls one of the listed methods. A profile or release build registers nothing.

A coding agent can reach these extensions through the Dart MCP server's vm_service tool, or over HTTP at the VM service address printed by flutter run. The installed tandem-coding-agent skill describes both paths.

  • The coding agent sees what an in-app agent would see, and calls only the listed methods, with the same checks.
  • From 0.3, an argument that points at an object of the screen, {"path": ...}, needs the context that ext.tandem.describe gave for the screen. The path then reads what the coding agent saw. A call is refused when the context is missing, unknown, or belongs to another screen or session, or when its referenced object has changed. A call without paths, such as set_quantity with a SKU and a number, needs no context.
  • A call without a screen ID goes to the screen of its context, and without a context to the only open TandemScope, or the only one on the current route. If several scopes match, the call must name a screen. A call with a context that no open screen keeps, such as one of a closed screen, is refused.
  • A .callsWithApproval call waits for the user to approve it in the app. The scope's approvals: setting controls how the request is shown. For scripted runs, TandemBridge.enable(autoApprove: true) lets the coding agent approve its own calls.
  • While a TandemView is on the screen, ext.tandem.describe lists tandem_show_view among the screen's tools. ext.tandem.call draws a view with it, with the same checks as for the in-app agent, and needs no context.