NewsAI & DevelopmentDeveloper Tools

Genkit Dart 1.0 Is Stable: Build Production Flutter AI Agents Now

Flutter logo with Dart AI agent flow code snippets on a blue background representing Genkit Dart 1.0 stable release
Genkit Dart 1.0 brings production-ready AI agents to Flutter

Flutter developers have been building AI features the hard way — REST calls to a Python backend, manual JSON serialization, no type safety, and model API keys too often exposed in client-side config. Genkit Dart 1.0, released October 8, changes that. Google’s AI framework for Dart has hit its first stable, semantically versioned release. The API contract is locked in. You can ship production apps on top of it today.

What the 1.0 Tag Actually Means

Before 1.0, Genkit Dart was experimental — Google made no promises about breaking changes. Teams building on it were taking a bet. The 1.0 tag is the stability signal those teams were waiting for: the core genkit package, the schemantic type-generation library, and the main model plugins are now covered by semantic versioning. A breaking change requires a major version bump. That is the commitment.

The package already has 34,500+ downloads on pub.dev and 160 pub points at launch. Google’s announcement credits “feedback from the Dart and Flutter community” for shaping the APIs toward production workloads.

The Architecture: Server Flows, Flutter Client

The officially recommended pattern is clean. You define your AI logic as Flows on a Dart server. A Flow is a typed, observable function that gets deployed as an HTTP POST endpoint automatically. Your Flutter app calls those flows using defineRemoteAction, with matching types generated by the schemantic package. API keys stay on the server. Types are shared without manual serialization.

Here is what a minimal server flow looks like:

final summarizeFlow = ai.defineFlow(
  name: 'summarize',
  inputSchema: SummarizeInput.$schema,
  outputSchema: SummarizeOutput.$schema,
  fn: (input, _) async {
    final result = await ai.generate(
      model: gemini15Flash,
      prompt: 'Summarize: ${input.text}',
    );
    return SummarizeOutput(summary: result.text);
  },
);
await GenkitRouter([summarizeFlow]).serve(port: 3400);

And the Flutter client call:

final summarize = defineRemoteAction<SummarizeInput, SummarizeOutput>(
  uri: Uri.parse('https://your-server/summarize'),
  inputFromJson: SummarizeInput.fromJson,
  outputFromJson: SummarizeOutput.fromJson,
);
final output = await summarize(SummarizeInput(text: article));

That is the full stack. One language, shared types, no Python middleman. The Flows documentation covers streaming, error handling, and the Developer UI — which lets you test flows locally, inspect traces step-by-step, and experiment with prompts before shipping.

Three Features Worth Your Attention

Unified model API. One generate() call works across Gemini, Anthropic Claude, and OpenAI models. Swap the plugin (genkit_google_ai, genkit_anthropic, genkit_openai), keep the rest of your code. Vendor lock-in is a choice, not a default.

Human-in-the-loop interrupts. This is the feature that separates demo agents from agents you can actually ship. Inside a defineTool call, return .interrupt(data) instead of .response(output) to pause execution and hand control back to the caller. The Flutter app surfaces a confirmation dialog. The user approves. Generation resumes. Critically, this logic lives inside the tool itself — the model cannot route around it. Production agents that touch real data need this.

OpenTelemetry observability. The genkit_otel package exports traces, token counts, and latency metrics using the OpenTelemetry GenAI semantic conventions. Your existing observability stack can consume it without proprietary adapters.

What Is Still Experimental

Two capabilities live under package:genkit/experimental.dart and are explicitly outside the 1.0 stability guarantee: stateful agents (conversation persistence via session stores) and A2UI (generative UI — agents streaming interactive components like date pickers and forms directly into your Flutter app). Both are worth prototyping, but not ready for production bets.

Getting Started

Add the package and a model plugin:

dart pub add genkit
dart pub add genkit_google_ai  # or genkit_anthropic / genkit_openai

The pub.dev package page links to quickstart guides and sample apps. The GitHub repo has runnable examples covering flows, tools, middleware, and the interrupt pattern. The middleware system — automatic retries, tool approval rules, dynamic skill loading — is covered in a separate announcement on Google Developers Blog.

The Bottom Line

Mobile AI has been the gap in the agentic app story. Every major AI framework is Python-first or TypeScript-first. Flutter developers either glued together polyglot stacks or shipped thin wrappers with no real agent logic. Genkit Dart 1.0 is the first stable answer to that problem from Google. The architecture is sound, the type safety is real, and the interrupt mechanism means you can build agents with actual guardrails. The experimental pieces still need time, but the 1.0 core is solid enough to start building on today.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News