Genkit Agent in Pure Dart Adds Human Approval Gate for Costly Back-Office Actions

A developer built a dispatch assistant for a fictional field service firm using only Dart, covering the agent server, tool server and Flutter client. The back office is exposed as an MCP server over Streamable HTTP, which any MCP-compatible client can use, and the agent reaches its tools through that server rather than importing them directly. Read-only and scheduling tools run autonomously, while the part-ordering tool, which costs money, is held behind an approval gate that pauses generation until a person signs off. Shared schema-annotated classes define the model's structured output, the HTTP response and the client types, so one change propagates across all components. The approach aims to let the backend move to a real system later by changing only the MCP server.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in