
Developing Genkit Dart
Ship Genkit-powered AI flows, tools, and LLM calls inside Dart or Flutter apps with plugin-correct patterns and optional Genkit CLI tracing.
Overview
Developing Genkit Dart is an agent skill for the Build phase that generates Dart/Flutter Genkit code and pulls the right SDK references for flows, tools, and LLM integration.
Install
npx skills add https://github.com/firebase/agent-skills --skill developing-genkit-dartWhat is this skill?
- Covers Genkit init, ai.generate, defineTool, defineFlow, embedMany, and streaming via references/genkit.md
- Documents Genkit CLI install (curl cli.genkit.dev or npm genkit-cli) and genkit start -- dart run for local UI and trace
- Routes each Genkit plugin question to the matching reference file instead of guessing APIs
- Targets Dart/Flutter solo builders adding agents without learning every plugin surface by heart
Adoption & trust: 61.9k installs on skills.sh; 345 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want AI agents or Genkit flows in Dart/Flutter but the SDK surface and plugin docs are easy to mix up without a guided reference map.
Who is it for?
Flutter or Dart builders adding Genkit agents, structured generation, or flow endpoints who will run genkit start during local dev.
Skip if: Teams that only need Firebase Auth or Firestore without Genkit, or projects already fully documented in-house with no Genkit work planned.
When should I use this skill?
User asks to build AI agents in Dart, use Genkit flows, or integrate LLMs into Dart/Flutter applications.
What do I get? / Deliverables
You get Genkit-aligned Dart patterns, CLI dev tracing steps, and plugin-specific documentation loads so your app compiles against real APIs.
- Genkit initialization and generation code aligned to references/genkit.md
- Tool, flow, or embedding snippets with plugin references loaded as needed
Recommended Skills
Journey fit
Canonical shelf is Build because the skill generates and wires SDK code into an application rather than validating market fit or operating production. Integrations fits best: Genkit connects LLMs, tools, embeddings, and remote flow endpoints into Dart/Flutter backends and clients.
How it compares
Use as a Genkit Dart integration skill package, not a hosted MCP server or a generic prompt-only chat snippet.
Common Questions / FAQ
Who is developing-genkit-dart for?
Solo and indie developers shipping Dart or Flutter apps who want Genkit for agents, flows, tools, and LLM calls with reference-backed codegen.
When should I use developing-genkit-dart?
Use it during Build when wiring Genkit into a new or existing Dart/Flutter app, choosing plugins, or standing up genkit start tracing before you ship AI features.
Is developing-genkit-dart safe to install?
Review the Security Audits panel on this Prism page for ingestion risk signals; the skill may suggest shell installs and network calls to LLM providers via Genkit plugins.
SKILL.md
READMESKILL.md - Developing Genkit Dart
# Genkit Dart Genkit Dart is an AI SDK for Dart that provides a unified interface for code generation, structured outputs, tools, flows, and AI agents. ## Core Features and Usage If you need help with initializing Genkit (`Genkit()`), Generation (`ai.generate`), Tooling (`ai.defineTool`), Flows (`ai.defineFlow`), Embeddings (`ai.embedMany`), streaming, or calling remote flow endpoints, please load the core framework reference: [references/genkit.md](references/genkit.md) ## Genkit CLI (recommended) The Genkit CLI provides a local development UI for running Flow, tracing executions, playing with models, and evaluating outputs. check if the user has it installed: `genkit --version` **Installation:** ```bash curl -sL cli.genkit.dev | bash # Native CLI # OR npm install -g genkit-cli # Via npm ``` **Usage:** Wrap your run command with `genkit start` to attach the Genkit developer UI and tracing: ```bash genkit start -- dart run main.dart ``` ## Plugin Ecosystem Genkit relies on a large suite of plugins to perform generative AI actions, interface with external LLMs, or host web servers. When asked to use any given plugin, always verify usage by referring to its corresponding reference below. You should load the reference when you need to know the specific initialization arguments, tools, models, and usage patterns for the plugin: | Plugin Name | Reference Link | Description | | ---- | ---- | ---- | | `genkit_google_genai` | [references/genkit_google_genai.md](references/genkit_google_genai.md) | Load for Google Gemini plugin interface usage. | | `genkit_anthropic` | [references/genkit_anthropic.md](references/genkit_anthropic.md) | Load for Anthropic plugin interface for Claude models. | | `genkit_openai` | [references/genkit_openai.md](references/genkit_openai.md) | Load for OpenAI plugin interface for GPT models, Groq, and custom compatible endpoints. | | `genkit_middleware` | [references/genkit_middleware.md](references/genkit_middleware.md) | Load for Tooling for specific agentic behavior: `filesystem`, `skills`, and `toolApproval` interrupts. | | `genkit_mcp` | [references/genkit_mcp.md](references/genkit_mcp.md) | Load for Model Context Protocol integration (Server, Host, and Client capabilities). | | `genkit_chrome` | [references/genkit_chrome.md](references/genkit_chrome.md) | Load for Running Gemini Nano locally inside the Chrome browser using the Prompt API. | | `genkit_shelf` | [references/genkit_shelf.md](references/genkit_shelf.md) | Load for Integrating Genkit Flow actions over HTTP using Dart Shelf. | | `genkit_firebase_ai` | [references/genkit_firebase_ai.md](references/genkit_firebase_ai.md) | Load for Firebase AI plugin interface (Gemini API via Vertex AI). | ## External Dependencies Whenever you define schemas mapping inside of Tools, Flows, and Prompts, you must use the [schemantic](https://pub.dev/packages/schemantic) library. To learn how to use schemantic, ensure you read [references/schemantic.md](references/schemantic.md) for how to implement type safe generated Dart code. This is particularly relevant when you encounter symbols like `@Schema()`, `SchemanticType`, or classes with the `$` prefix. Genkit Dart uses schemantic for all of its data models so it's a CRITICAL skill to understand for using Genkit Dart. ## Best Practices - Always check that code cleanly compiles using `dart analyze` before generating the final response. - Always use the Genkit CLI for local development and debugging. # Genkit Firebase AI Plugin (`genkit_firebase_ai`) The Firebase AI plugin for Genkit Dart, used for interacting with Gemini APIs through Firebase AI Logic. ## Usage ```dart import 'package:genkit/genkit.dart'; import 'package:genkit_fireb