developing-genkit-dart

Build AI agents, flows, and tools in Dart using the Genkit SDK.

1|Updated Aug 14, 2026
One-click install
npx skills add https://github.com/sohampawar1866/zeromile-go --skill developing-genkit-dart-sohampawar1866
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: developing-genkit-dart
Source: https://github.com/sohampawar1866/zeromile-go/tree/main/.agents/skills/developing-genkit-dart
Command: npx skills add https://github.com/sohampawar1866/zeromile-go --skill developing-genkit-dart-sohampawar1866

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building LLM-powered features in Dart or Flutter requires wiring together model providers, tool calling, structured output, streaming, and deployment plumbing. This Skill provides the reference knowledge to implement all of these with the Genkit Dart SDK and its plugin ecosystem without guessing APIs. ## Core Features & Use Cases - Core Framework Guidance: Covers Genkit initialization, text generation, streaming, embeddings, tool definition, flows, structured output, and calling remote flows from Dart or JavaScript clients. - Plugin Ecosystem References: Dedicated references for Google GenAI, Anthropic, OpenAI-compatible APIs, Firebase AI, Chrome built-in AI, MCP integration, Shelf HTTP serving, and middleware for filesystem access, skills, and tool approval. - Type-Safe Schemas with Schemantic: Instructions for defining strongly typed schemas using the schemantic package, which Genkit Dart requires for tools, flows, and structured outputs. - Use Case: A developer wants to add a Claude-powered chat agent with tool calling to a Dart backend. The Skill guides them through installing the Genkit CLI, defining tools with schemantic schemas, wrapping logic in flows, and serving them over HTTP with Shelf. ## Quick Start Use the developing-genkit-dart skill to create a Genkit flow in Dart that calls Gemini with a custom tool and serves it over HTTP.

Frequently Asked Questions about developing-genkit-dart

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define tools for LLMs in Dart with Genkit?

Use ai.defineTool with a name, description, input schema, and handler function. Input schemas are defined with the schemantic package by annotating an abstract class with @Schema() and passing the generated $schema to the tool definition.

How do I get structured JSON output from a model in Genkit Dart?

Pass an outputSchema to ai.generate using a schemantic-generated schema such as Person.$schema. The response's output property then returns a typed Dart object parsed from the model's JSON response.

Which model providers does Genkit Dart support?

Genkit Dart supports Google Gemini via genkit_google_genai or genkit_firebase_ai, Anthropic Claude via genkit_anthropic, OpenAI and compatible APIs like Groq via genkit_openai, and local Gemini Nano in Chrome via genkit_chrome.

Can I serve Genkit Dart flows over HTTP?

Yes, the genkit_shelf plugin serves flows over HTTP. Use startFlowServer for a standalone server or shelfHandler to mount flows on an existing Shelf Router, then call them remotely with the Genkit Dart or JavaScript client.

Does Genkit Dart support MCP servers?

Yes, the genkit_mcp package supports MCP host, client, and server modes. The host mode connects to multiple MCP servers and registers their tools automatically, while server mode exposes Genkit tools and resources over MCP.

Why do I need the schemantic package with Genkit Dart?

Genkit Dart uses schemantic for all data models and schema definitions in tools, flows, and structured outputs. You annotate abstract classes with @Schema() and run build_runner to generate type-safe classes with runtime JSON schemas.