Announcing Genkit Dart 1.0: Build production-ready agentic apps with Dart and Flutter

Announcing the stable 1.0 release of Genkit Dart, an open-source framework for building production-ready agentic apps and AI features in Dart.

Announcing Genkit Dart 1.0

Dart and Flutter let you build high-quality apps for mobile, web, and desktop from a single codebase. With Genkit Dart, you can bring that same productivity to full-stack, agentic apps.

Today, we're announcing Genkit Dart 1.0, the first stable, production-ready release of Google's open-source framework for building AI-powered features and agents in Dart. Since our preview launch earlier this year, feedback from the Dart and Flutter community has helped us refine the core APIs and expand the toolkit for production workloads.

We've published the full walkthrough and code deep dives on the Flutter blog.

To get started right away, add genkit to your Dart or Flutter project:

shell
dart pub add genkit

You can also install the agent skill to give AI coding assistants like Antigravity, Claude Code, and Codex up-to-date knowledge of Genkit Dart APIs:

shell
npx skills add genkit-ai/skills

Highlights in Genkit Dart 1.0

#

Genkit Dart 1.0 brings a unified model interface, end-to-end type safety, and agentic primitives to any Dart environment, whether you're building backend services, CLI tools, or full-stack Flutter apps:

  • One API across model providers: Swap between Google Gemini, Anthropic Claude, OpenAI, and OpenAI-compatible models without rewriting your application logic.
  • End-to-end type safety with schemantic: Define your data schemas once in Dart using schemantic to generate structured model output, wrap AI logic in observable flows, and share types between your Dart server and client.
  • Flexible deployment across client and server: Run flows on a Dart server with GenkitRouter, invoke them from a client using defineRemoteAction, or keep your AI logic on the client while routing model requests through a secure backend with defineRemoteModel.
  • Human-in-the-loop tool interrupts: Pause tool execution inside defineTool by returning .interrupt(...) when an action requires user confirmation, and then resume generation from where it left off.
  • Composable generation middleware: Attach prepackaged middleware from genkit_middleware (including automatic retries, dynamic SKILL.md loading, and tool approval rules) or write custom middleware with defineGenerateMiddleware.
  • Prompt management with Dotprompt: Keep prompt templates, model configuration, and schemas together in .prompt files with Dotprompt.
  • Local Developer UI and OpenTelemetry: Test flows and inspect execution traces locally with genkit start, and export production traces and metrics with genkit_otel.
  • Experimental stateful agents and A2UI: Try out multi-turn persistent agents (defineAgent and remoteAgent in package:genkit/experimental.dart) and stream interactive native UI surfaces with genkit_a2ui.
dart
@Schema()
abstract class $TripRequest {
  String get destination;
  int get days;
}
// ...plus an Itinerary schema for the result.
​
final ai = Genkit(plugins: [googleAI()]);
​
final planTrip = ai.defineFlow(
  name: 'planTrip',
  inputSchema: TripRequest.$schema,
  outputSchema: Itinerary.$schema,
  fn: (request, _) async {
    final response = await ai.generate(
      model: googleAI.gemini('gemini-flash-latest'),
      prompt: 'Plan a ${request.days}-day trip to ${request.destination}.',
      outputSchema: Itinerary.$schema,
    );
    return response.output!;
  },
);
​
await (GenkitRouter()..addAction(planTrip)).serve(port: 8080); // POST /planTrip

Read the full announcement

#

For complete code examples covering multi-model generation, remote actions and models, tool interrupts, middleware, Dotprompt, OpenTelemetry, stateful agents, and generative UI with A2UI, read the full Genkit Dart 1.0 announcement on the Flutter blog.

More from Dart