tandem 0.2.2
tandem: ^0.2.2 copied to clipboard
Makes an existing Flutter screen agent-aware over AG-UI. The agent sees what its state class lists and calls its methods; important actions wait for approval.
0.2.2 #
- When the user sends several messages before a run goes out, the agent gets them as one user message, the texts joined by a blank line: ag-ui-adk passes the model only the last new user message of a run. This covers the messages queued during a run that ends with an
interruptor an outcome of the wrong shape, and a message whose run failed before it went out, such as whenagentCapabilitiesthrows. - When
tandem-coding-agentstarts the app itself, it picks the host's desktop if the project has a folder for it, such as-d macosformacos/on a Mac, and asks for a device otherwise.
0.2.1 #
TandemBridgelets a coding agent, such as Claude Code or Cursor, drive the screens of a running debug build.TandemBridge.enable()inmain()registers the VM service extensionsext.tandem.describeandext.tandem.call; a profile or release build gets none. The coding agent reaches them with thevm_servicetool of the Dart MCP server, or over HTTP at the VM service address thatflutter runprints. It sees what the in-app agent sees and calls only the listed methods.TandemBridge.describe()andTandemBridge.call()give the same JSON in a test.- A coding agent's call of a
.callsWithApprovalmethod waits for the user as anApprovalRequestinsession.items, after the in-app agent's requests.TandemBridge.enable(autoApprove: true)runs it at once instead, for automation.describeshows the last one with its answer aslastApproval, for a coding agent whose client stopped waiting. agent:ofTandemScopeis optional. Without it, the screen has no in-app agent, and a run ofsession.sendfails with a report that says so.- Three Agent Skills, installed with
dart run skills@ get --package tandem --all.tandem-agent-aware-screenis the base: it lists what the agent sees and calls, without a chat or a backend.tandem-coding-agentsets upTandemBridgeand fills a running screen.tandem-in-app-agentadds a chat or a button for the app's users.dart run skills@ getshows an update for them only when there is one. - The
/tandemskill sets up Tandem in an app: it checks the packages and hands the work to these skills. Install it from the GitHub repository withdart run skills@ add leancodepl/tandem --skill tandem.
0.2.0 #
- Breaking:
ChatNoticeKind.startedOver. AswitchoverChatNoticeKindneeds a case for it. - Breaking:
AgentRunException.codeis aRunErrorCode. Wrap a string withRunErrorCode(...)to build one. session.startOver()sends the next message to a new AG-UI thread, without the earlier history. The chat keeps its items.RunFailedhas the error'scode, aRunErrorCode: any string a backend sends. Tandem's own codes are constants by source: the session's onRunErrorCode,ScriptedAgent's onScriptedErrorCode.OnDeviceAgent.apple()runs Apple's on-device model with the same session, capabilities and approvals. The model proposes calls and Tandem runs them. Its errors areOnDeviceErrorCodeconstants, such ascontextWindowExceeded.
0.1.0 #
@TandemAgent()andagentCapabilities: the agent sees the values a state class lists with.seesand calls only the methods it lists with.callsand.callsWithApproval.TandemScope: one session of a screen with an AG-UI agent, for any state library. The state class reports its changes inchanges.HttpAgentConnectiontalks to any AG-UI endpoint, with anhttp.Clientof your own for headers such as a token. A customAgentConnectioncan take its place.- AG-UI 1.0 run outcomes: a run the backend cancels runs none of its calls, and a run that ends with an interrupt fails and the next message starts a new thread. Earlier runs that a response replays are skipped.
- Approvals with
.callback,.fromState()or.none(), one request at a time. A request is invalidated when a value listed with.seeschanges after the agent's run started, also through the agent's own calls. session.statusandonEventfor the app's own chat, buttons and messages. Tandem has no chat widget.- A method refuses a call with a message for the agent by throwing
ToolCallRefused. Any other error goes only to the app's reports, and the agent hears that the call failed. ScriptedAgentandAgentListinginpackage:tandem/testing.dart, for tests, and to try a screen without a model.- An Agent Skill for coding agents, installed with
dart run skills@ get.