genkit
1.0.3, released yesterday by genkit.dev
Generative AI library for Dart and Flutter supporting text generation, tools, and flows.
What it does
Genkit provides a unified interface for building production-ready AI applications in Dart. It supports text generation, streaming, embeddings, tool calling, flows, and middleware for client and server apps.
AI-written summary of version 1.0.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a unified framework for interacting with LLMs like Gemini in Dart.
- You want to build agentic workflows, define custom tools, and handle streaming responses.
Skip it when
- You only need a simple, single-purpose wrapper for a specific vendor like OpenAI without a framework.
- You do not plan to use generative AI features in your application.
Strengths
- Unified API across models and providers.
- Built-in support for streaming, interrupts, and middleware.
- Comes with a local developer UI and tracing tools.
Weaknesses
- Requires learning Genkit's specific framework and abstractions.
- Depends on plugins for specific AI backends like Google GenAI.
Setup
- Kind
- Pure Dart
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 9
Requires adding the genkit package, registering plugins like genkit_google_genai, and setting up necessary API keys (e.g., GEMINI_API_KEY).
import 'package:genkit/genkit.dart';
import 'package:genkit_google_genai/genkit_google_genai.dart';
void main() async {
final ai = Genkit(plugins: [googleAI()]);
final response = await ai.generate(
model: googleAI.gemini('gemini-flash-latest'),
prompt: 'Why is Dart a great language for AI applications?',
);
print(response.text);
}Alternatives
Packages that do the same job and could replace genkit.
- openai_dart
If you are specifically targeting OpenAI models and prefer a direct client library instead of Genkit's larger framework.
91Compare - ollama_dart
If you want to integrate specifically with local Ollama instances.
88Compare
Works with
Packages commonly used together with genkit: ones it builds on, ones built on it, and its own family.
- stack_tracegenkit depends on itProvides parsing, inspection, and readable formatting of Dart stack traces.
- logginggenkit depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- web_socket_channelgenkit depends on itCross‑platform WebSocket channel wrapper for Dart
- schemanticgenkit depends on itGenerate type-safe data classes and runtime JSON Schemas from abstract class definitions.
- genkit_llamadartBuilt on genkitGenkit Dart plugin for local AI through llamadart: GGUF, LiteRT-LM, chat, tool calling, and embeddings