genkit
Genkit Dart package, a Generative AI library for pure Dart client/server and Flutter apps.
0.15.1
23K downloads/mo
#2052 most downloaded on pub.dev
genkit-ai/genkit-dart
What this package is like to depend on
Last release 1 months ago
17 Jul 2026
Release timing varies
gaps range from 8 days to 3 months
Nearly every release is documented
notes for 20 of 20 stable releases
Nothing withdrawn
no release was ever pulled
1 years old
39 releases · first in 2025
36 releases in the last 12 months
see the full history below
Release timeline
39 releases · Apr 2025 to Jul 2026Releases
latest 39-
0.15.117 Jul 2026Release notes
Open source →What's Changed
- fix: normalize nested models to JSON in generated setters by @pavelgj in #337
- docs: clarify Firestore project id discovery requirements by @pavelgj in #338
Full Changelog: genkit-v0.15.0...genkit-v0.15.1
-
0.15.017 Jul 2026Release notes
Open source →Agents
This release introduces Agents: a first-class way to build stateful, multi-turn AI experiences in Dart. Agents wrap
generatewith durable sessions, tool calling, human-in-the-loop interrupts, sub-agent delegation, and a transport-agnostic client — so you can go from a one-shot prompt to a full conversational agent (running locally or served over HTTP) with a few lines of code.Defining an agent is one call. It handles the model, tools, and session state for you:
import 'package:genkit/genkit.dart'; import 'package:genkit/io.dart'; import 'package:genkit_google_genai/genkit_google_genai.dart'; final ai = Genkit( plugins: [googleAI()], model: googleAI.gemini('gemini-flash-latest'), ); final getWeather = ai.defineTool( name: 'getWeather', description: 'Get the current weather for a given location.', inputSchema: GetWeatherInput.$schema, outputSchema: GetWeatherOutput.$schema, fn: (input, _) async => GetWeatherOutput(weather: 'Sunny in ${input.location}', temperature: '71F'), ); final weatherAgent = ai.defineAgent( name: 'weatherAgent', system: 'You are an assistant helping with weather information. ' 'Use the getWeather tool.', tools: [getWeather], store: FileSessionStore('.sessions'), // durable, multi-turn state );
Talk to it - streaming, multi-turn, with state carried automatically between turns:
final chat = weatherAgent.chat(sessionId: 'user-123'); // Stream the first turn. final turn = chat.sendStream(text: 'What is the weather like in Tokyo?'); await for (final chunk in turn.stream) { stdout.write(chunk.text); } // Follow-up turn — prior context is threaded automatically. final res = await chat.send(text: 'What about Paris?'); print(res.text);
Serve it over HTTP with
genkit_shelf, and any client (Dart, JS, browser) can
drive it:router.post('/api/weatherAgent', shelfHandler(weatherAgent.action));
// From a Dart CLI or Flutter/web app — no server-side deps required. import 'package:genkit/client.dart'; final weather = remoteAgent(url: 'http://localhost:8080/api/weatherAgent'); final chat = weather.chat(sessionId: 'user-123'); await for (final chunk in chat.sendStream(text: 'Weather in Tokyo?').stream) { stdout.write(chunk.text); }
What agents give you
- Durable sessions & snapshots - server- or client-managed state, with
pluggable stores:InMemorySessionStore,FileSessionStore
(package:genkit/io.dart), andFirestoreSessionStore(new
genkit_google_cloudpackage). Load any past turn from a snapshot, or fork a
conversation into a variant. - Streaming multi-turn chat -
send/sendStream, with session state
threaded automatically across turns. - Tools & human-in-the-loop interrupts - tools can pause for approval
(ctx.interrupt(...)) and be resumed/restarted with an approval payload, so
security-critical checks live inside the tool where the model can't bypass
them. - Typed custom state - define a
stateSchemaand mutate structured session
state from tools; each change streams a livecustomPatchchunk to the client. - Sub-agent delegation - the new
agents()middleware auto-injects
delegate_to_*tools, discovers sub-agent descriptions, and adds guard rails
(maxDelegations,historyLength) for orchestrator/worker patterns. - Prompt-file agents -
definePromptAgentwires a.prompt(dotprompt) file
into a multi-turn agent, customizable viapromptInput. - Custom & background agents -
defineCustomAgentfor multi-step flows with
live status, plusdetach+ status polling + abort for long-running
background work. - Transport-agnostic client -
remoteAgentfrompackage:genkit/client.dart
is browser-safe and wire-compatible with the Genkit client across SDKs
(verified by a cross-SDK conformance suite).
See the full runnable showcase in
testapps/agents- 11 demo pages covering
chat, interrupts, artifacts, background/detach, branching, task state, research,
delegation, and coding agents.Agents changelog
- feat(agents): agent & session schema types (1/8) by @pavelgj in #310
- feat(agents): session & snapshot storage + JSON Patch (2/8) by @pavelgj in #311
- feat(agents): dart:io FileSessionStore (3/8) by @pavelgj in #312
- feat(agents): transport-agnostic client core (4/8) by @pavelgj in #313
- feat(agents): server-side agent runtime (5/8) by @pavelgj in #314
- feat(agents): HTTP / remote agent client (6/8) by @pavelgj in #315
- test(agents): cross-SDK conformance suite (7/8) by @pavelgj in #316
- docs(agents): demo server + web UI (8/8) by @pavelgj in #317
- feat(google-cloud): add genkit_google_cloud with a FirestoreSessionStore by @pavelgj in #318
- feat(middleware): add agents sub-agent delegation middleware by @pavelgj in #324
- feat(genkit): type-safe agent State with schemantic parsing + agent API polish by @pavelgj in #330
- docs(testapps/agents): add reasoning display and file viewer to agents app by @pavelgj in #334
Other changes
Providers & models
- feat(genkit_firebase_ai): Support Vertex AI Gemini API by @goderbauer in #296
- feat(genkit_vertexai): support Gemini and multimodal embedders by @CorieW in #261
- feat(vertexai): curated known-model metadata + P0 Gemini 3.x registrations by @cabljac in #320
- refactor(google_genai,vertexai): model curated Gemini catalog as an enum by @cabljac in #323
- fix(genkit_openai): send non-image media as OpenAI file content parts by @irangarcia in #297
Core & prompts
- feat!: pass middleware context with GenkitAI to factories by @pavelgj in #319
- fix(core): forward init (and context) from reflection runAction to actions by @pavelgj in #321
- fix(prompt): carry resolved middleware refs on rendered options by @pavelgj in #325
- feat(prompt): surface middleware and generate options in prompt loader by @pavelgj in #333
Schemantic
- feat(schemantic): add serialize to convert typed values to JSON by @pavelgj in #332
- docs: add documentation to schemantic_builder entry point by @pavelgj in #294
Breaking changes
- feat!: pass middleware context with GenkitAI to factories (#319) - middleware factories now receive the middleware context via
GenkitAI.
New Contributors
- @goderbauer made their first contribution in #296
Full Changelog: genkit-v0.14.1...genkit-v0.15.0
Release notes
Open source →Breaking Changes
- pass middleware context with GenkitAI to factories (#319)
Features
- surface middleware and generate options in prompt loader (#333)
- type-safe agent State with schemantic parsing + agent API polish (#330)
- HTTP / remote agent client (6/8) (#315)
- server-side agent runtime (5/8) (#314)
- transport-agnostic client core (4/8) (#313)
- dart:io FileSessionStore (3/8) (#312)
- session & snapshot storage + JSON Patch (2/8) (#311)
- agent & session schema types (1/8) (#310)
Fixes
- carry resolved middleware refs on rendered options (#325)
- forward init (and context) from reflection runAction to actions (#321)
Other Changes
- cross-SDK conformance suite (7/8) (#316)
- Durable sessions & snapshots - server- or client-managed state, with
-
0.14.111 Jun 2026 -
0.14.004 Jun 2026Release notes
Open source →Breaking Changes
- add dotprompt integration with executable prompts and folder loading (#279)
Features
- add top-level
systemparameter to generate() (#289) - Add interrupt releated span metadata (#287)
Other Changes
- update model references to gemini-flash-latest (#293)
- split schemantic into runtime and schemantic_builder packages (#292)
-
0.13.212 May 2026Release notes
Open source →Features
- add listValues (#281)
Fixes
- preserve middleware in generation (#282)
-
0.13.106 May 2026 -
0.13.029 Apr 2026Release notes
Open source →Breaking Changes
- introduce GenerateTurnState to middleware generate hook and improve chunk indexing (#269)
Features
- add additionalProperties support to @Schema and implement strict object validation (#251)
-
0.12.127 Mar 2026Release notes
Open source →Features
- support middleware and defaultModel in listValues (#240)
Fixes
- updated reflection v2 implementation in line with latest spec changes (#231)
-
0.12.019 Mar 2026Release notes
Open source →Breaking Changes
- changed middleware tool hook return type to Part for greater flexibility (#218)
Features
- Cache plugin action lists using a new adapter to optimize discovery (#217)
Fixes
- correctly handle enums in the generated constructor (#220)
Other Changes
- minor refactor to avoid use of dynamic for tool status (#219)
-
0.11.111 Mar 2026 -
0.11.010 Mar 2026Release notes
Open source →Breaking Changes
- changed tool hook signature on middleware, pass toolRequest to tool (#211)
-
0.10.105 Mar 2026Release notes
Open source →- FEAT: Add support for a default model and make generate model param optional (#203).
- FEAT: added
remoteModelfor defining remote AI models with lite api (#198). - DOCS: update docs, example, package descriptions and regen types (#201).
2026-03-05
Changes
Packages with breaking changes:
Packages with other changes:
- There are no other changes in this release.
Release notes
Open source →- FEAT: Add support for a default model and make generate model param optional (#203).
- FEAT: added
remoteModelfor defining remote AI models with lite api (#198). - DOCS: update docs, example, package descriptions and regen types (#201).
-
0.10.004 Mar 2026Release notes
Open source →- Graduate package to a stable release. See pre-releases prior to this version for changelog entries.
-
0.10.0-dev.1904 Mar 2026 pre-releaseRelease notes
Open source →- FEAT: added generate span (#196).
- FEAT: Enhance
extractfunction to support primitive JSON types (string and numbers) (#195).
2026-03-03
Changes
Packages with breaking changes:
- There are no breaking changes in this release.
Packages with other changes:
Release notes
Open source →- FEAT: added generate span (#196).
- FEAT: Enhance
extractfunction to support primitive JSON types (string and numbers) (#195).
-
0.10.0-dev.1803 Mar 2026 pre-releaseRelease notes
Open source →- REFACTOR: Tweak RegExps and avoid non-linear complexity (#175).
- REFACTOR: make all classes
finalorbase(#179). - REFACTOR: centralize status-to-http mapping for transport errors (#181).
- FEAT: introduce Genkit evaluation functionality (#191).
- FEAT(openai): add Vertex support with shared Vertex auth utilities (#185).
- BREAKING REFACTOR: renamed @Schematic() to @Schema() (#192).
- BREAKING FEAT: introduced dynamic action provider and migrated MCP plugin to use DAP (#187).
Release notes
Open source →Note: This release has breaking changes.
- REFACTOR: Tweak RegExps and avoid non-linear complexity (#175).
- REFACTOR: make all classes
finalorbase(#179). - REFACTOR: centralize status-to-http mapping for transport errors (#181).
- FEAT: introduce Genkit evaluation functionality (#191).
- FEAT(openai): add Vertex support with shared Vertex auth utilities (#185).
- BREAKING REFACTOR: renamed @Schematic() to @Schema() (#192).
- BREAKING FEAT: introduced dynamic action provider and migrated MCP plugin to use DAP (#187).
-
0.10.0-dev.1727 Feb 2026 pre-releaseRelease notes
Open source →- REFACTOR: hide package:json_schema_builder (#167).
- FIX: do not default instructions for json format (should use native constrained generation) (#176).
- FIX: enable and fix a couple of lints (#174).
- FIX: enforce formatting check in CI (#166).
- FIX: be consistent with String quotes (#164).
- FIX: fix strict casts (#165).
- FIX: don't import dart:io in registry (#159).
- FIX: lite.dart needs to call the function (#160).
- FIX: better generics (#153).
- FIX: move Genkit class to a library and export (#152).
- FIX: fix a couple of dartdoc issues (#151).
- FIX: extractJson return null for partial mode when no JSON started (#141).
- BREAKING FEAT: move basic type functions to static creation method on SchemanticType (#154).
Release notes
Open source →Note: This release has breaking changes.
- REFACTOR: hide package:json_schema_builder (#167).
- FIX: do not default instructions for json format (should use native constrained generation) (#176).
- FIX: enable and fix a couple of lints (#174).
- FIX: enforce formatting check in CI (#166).
- FIX: be consistent with String quotes (#164).
- FIX: fix strict casts (#165).
- FIX: don't import dart:io in registry (#159).
- FIX: lite.dart needs to call the function (#160).
- FIX: better generics (#153).
- FIX: move Genkit class to a library and export (#152).
- FIX: fix a couple of dartdoc issues (#151).
- FIX: extractJson return null for partial mode when no JSON started (#141).
- BREAKING FEAT: move basic type functions to static creation method on SchemanticType (#154).
-
0.10.0-dev.1620 Feb 2026 pre-releaseRelease notes
Open source →- REFACTOR: Introduce a dedicated plugin.dart entry point for plugin-related exports (#149).
- FEAT: improve partial json extraction (#150).
- FEAT: add error handling for plugin action listing and report failures to stderr (#148).
- FEAT: Allow ReflectionServerV1 to automatically find an available port if none is specified. (#146).
-
0.10.0-dev.1519 Feb 2026 pre-releaseRelease notes
Open source →- FIX: prevent incorrect partial JSON repair by validating stack state (#144).
- FEAT: Add remote model support and enable serving actions via shelf (#143).
-
0.10.0-dev.1419 Feb 2026 pre-releaseRelease notes
Open source →- REFACTOR: automate telemetry exporter configuration (#131).
- FEAT: implemented/fixed tools calling and structured output for firebase_ai (#138).
-
0.10.0-dev.1317 Feb 2026 pre-releaseRelease notes
Open source →- FIX: Wrap error responses in a JSON object under an 'error' key (#130).
- FEAT: Implemented real-time tracing (#128).
- FEAT: created a genkit_middleware package with skills, filesystem and toolApproval middleware (#126).
- FEAT: add MCP (Model Context Protocol) plugin (#94).
- FEAT: implemented interrupt restart (#124).
- BREAKING REFACTOR: generate api cleanup (#125).
Release notes
Open source →Note: This release has breaking changes.
- FIX: Wrap error responses in a JSON object under an 'error' key (#130).
- FEAT: Implemented real-time tracing (#128).
- FEAT: created a genkit_middleware package with skills, filesystem and toolApproval middleware (#126).
- FEAT: add MCP (Model Context Protocol) plugin (#94).
- FEAT: implemented interrupt restart (#124).
- BREAKING REFACTOR: generate api cleanup (#125).
-
0.10.0-dev.1212 Feb 2026 pre-releaseRelease notes
Open source →- FEAT: introducing registered middleware (#87).
- FEAT: added support for embedders (embedding models) (#88).
-
0.10.0-dev.1105 Feb 2026 pre-releaseRelease notes
Open source →- FIX: Coerce
numvalues todoublefor generated double fields during JSON parsing. (#65). - FEAT: add Google Search and multi-speaker voice config support, extract usage metadata, and introduce reasoning parts (#82).
- FEAT: allow
generateandgenerateBidito acceptToolobjects directly in thetoolslist alongside tool names (#79). - FEAT: Implement hierarchical registry with parent delegation and merging for values and actions (#78).
- FEAT: Implement streaming chunk indexing across turns and improve
maxTurnserror handling with a new default. (#75). - FEAT: implemented interrupts (#73).
- FEAT: Add retry middleware for AI model and tool calls with configurable backoff and error handling. (#67).
- FEAT: Add
$GenerateResponsetype, refine schema types, and update generated class constructors to uselate finaland regular constructors. (#66). - FEAT: added schemas for gemini models, made sure TTS and nano banana models are working (#63).
- BREAKING REFACTOR: update GenkitException to use a StatusCodes enum instead of raw integer status codes. (#68).
Release notes
Open source →Note: This release has breaking changes.
- FIX: Coerce
numvalues todoublefor generated double fields during JSON parsing. (#65). - FEAT: add Google Search and multi-speaker voice config support, extract usage metadata, and introduce reasoning parts (#82).
- FEAT: allow
generateandgenerateBidito acceptToolobjects directly in thetoolslist alongside tool names (#79). - FEAT: Implement hierarchical registry with parent delegation and merging for values and actions (#78).
- FEAT: Implement streaming chunk indexing across turns and improve
maxTurnserror handling with a new default. (#75). - FEAT: implemented interrupts (#73).
- FEAT: Add retry middleware for AI model and tool calls with configurable backoff and error handling. (#67).
- FEAT: Add
$GenerateResponsetype, refine schema types, and update generated class constructors to uselate finaland regular constructors. (#66). - FEAT: added schemas for gemini models, made sure TTS and nano banana models are working (#63).
- BREAKING REFACTOR: update GenkitException to use a StatusCodes enum instead of raw integer status codes. (#68).
- FIX: Coerce
-
0.10.0-dev.1030 Jan 2026 pre-releaseRelease notes
Open source →- FEAT: updated AnyOf support for union types in Schemantic, including helper class generation and schema type handling. (#62).
-
0.10.0-dev.930 Jan 2026 pre-releaseRelease notes
Open source →- REFACTOR: reimplement schema generation from extension types to classes, enhance
PartExtensiongetters, and simplifyGenerateResponseand tool invocation. (#53). - FEAT: use combining builder and header option (#52).
- BREAKING FEAT: implement Schemantic API redesign with $ prefixed schema definitions and static
$schemafor unified schema access. (#60).
Release notes
Open source →Note: This release has breaking changes.
- REFACTOR: reimplement schema generation from extension types to classes, enhance
PartExtensiongetters, and simplifyGenerateResponseand tool invocation. (#53). - FEAT: use combining builder and header option (#52).
- BREAKING FEAT: implement Schemantic API redesign with $ prefixed schema definitions and static
$schemafor unified schema access. (#60).
- REFACTOR: reimplement schema generation from extension types to classes, enhance
-
0.10.0-dev.819 Jan 2026 pre-releaseRelease notes
Open source →Note: This release has breaking changes.
- BREAKING REFACTOR: renamed JsonExtensionType to SchemanticType (#44).
-
0.10.0-dev.718 Jan 2026 pre-releaseRelease notes
Open source →- REFACTOR: Consolidate Google GenAI examples into a single file, fixed tools calling, and schema flattening helper (#43).
- FEAT: implemented streaming and various config options for genkit_google_genai plugin (#42).
-
0.10.0-dev.616 Jan 2026 pre-releaseRelease notes
Open source →- BREAKING FEAT: Refactor basic types into factory functions to support schema constraints (#34).
Release notes
Open source →Note: This release has breaking changes.
- BREAKING FEAT: Refactor basic types into factory functions to support schema constraints (#34).
-
0.10.0-dev.516 Jan 2026 pre-releaseRelease notes
Open source →- REFACTOR: move the package-specific schema generator into a peer package (#31).
- BREAKING REFACTOR: renamed @Key annotation to @Field (#30).
Release notes
Open source →Note: This release has breaking changes.
- REFACTOR: move the package-specific schema generator into a peer package (#31).
- BREAKING REFACTOR: renamed @Key annotation to @Field (#30).
-
0.10.0-dev.416 Jan 2026 pre-releaseRelease notes
Open source →- REFACTOR: make generated JsonExtensionType factory classes (*TypeFactory) private (#29).
- FEAT: added support for defining listType and mapType in schemantic (#28).
-
0.10.0-dev.316 Jan 2026 pre-releaseRelease notes
Open source →- FEAT: bump analyzer dependency (#25).
- FEAT: added support for schema refs/defs in the schema generator (#22).
- BREAKING REFACTOR: renamed genkit_schema_builder package to schemantic (#26).
Release notes
Open source →Note: This release has breaking changes.
- FEAT: bump analyzer dependency (#25).
- FEAT: added support for schema refs/defs in the schema generator (#22).
- BREAKING REFACTOR: renamed genkit_schema_builder package to schemantic (#26).
-
0.10.0-dev.215 Jan 2026 pre-releaseRelease notes
Open source →- FIX: register generate action with the correct name.
- FEAT: implemented live api using firebase ai logic (#19).
-
0.10.0-dev.115 Jan 2026 pre-releaseRelease notes
Open source →- Initial release of Genkit Dart framework.
- BREAKING CHANGE:
RemoteActionhas 2 extra generic type parametersIandInitfor the input and init types. - feat: defineRemoteAction now accepts inputType, outputType and streamType parameters using genkit schema builder types.
-
0.9.015 Oct 2025Release notes
Open source →- Made
fromResponseandfromStreamChunkoptional indefineRemoteAction. If not provided, the response and stream chunks will bedynamicobjects decoded from JSON, instead of requiring a typed conversion function.
- Made
-
0.8.013 Oct 2025Release notes
Open source →-
BREAKING CHANGE: The
.stream()method now returns anActionStreaminstead of aFlowStreamResponserecord.ActionStreamis aStreamthat provides two ways to access the flow's final, non-streamed response:onResult: AFuturethat completes with the result. This is the recommended approach. It will complete with aGenkitExceptionif the stream terminates with an error or is cancelled.result: A synchronous getter that should only be used after the stream is fully consumed. It will throw aGenkitExceptionif the stream is not consumed, terminates with an error or is cancelled.
Migration: Code that previously looked like this:
final (:stream, :response) = myAction.stream(input: ...); await for (final chunk in stream) { // ... } final finalResult = await response;Should be updated to use
onResult:final stream = myAction.stream(input: ...); await for (final chunk in stream) { // ... } final finalResult = await stream.onResult; // or final finalResult = stream.result;
-
-
0.7.002 Oct 2025Release notes
Open source →- BREAKING CHANGE: The package has been renamed from
package:genkit/genkit.darttopackage:genkit/client.dart. You will need to update your import statements. - BREAKING CHANGE: The
responsefuture returned by the.stream()method is now nullable (Future<O?>). This change supports improved error handling and cancellation. - Improved Error Handling: Errors occurring on the server during a stream are now thrown by the
streamitself. This allows you to catch exceptions directly within atry/catchblock surrounding anawait forloop.
- BREAKING CHANGE: The package has been renamed from
-
0.6.030 Sep 2025Release notes
Open source →- Added standard Genkit data classes for working with generative models, including
GenerateResponse,Message, andParttypes. - Added helper getters like
.textand.mediafor easier data extraction.
- Added standard Genkit data classes for working with generative models, including
-
0.5.118 Jun 2025 -
0.5.018 Jun 2025Release notes
Open source →- Enhanced type-safe client: Added comprehensive generics support for type-safe operations
- Streaming support: Implemented real-time data streaming with Server-Sent Events (SSE)
- Improved error handling: Introduced
GenkitExceptionwith detailed error information and HTTP status codes - Authentication support: Added support for custom headers including Firebase Auth integration
- Better integration: Enhanced compatibility with
json_serializablefor object serialization - Comprehensive documentation: Added detailed API documentation and usage examples
- Platform support: Full cross-platform support for iOS, Android, Web, Windows, macOS, and Linux
- Testing improvements: Added comprehensive unit and integration tests
-
0.0.118 Apr 2025