developing-genkit-dart by firebase/agent-skills
npx skills add https://github.com/firebase/agent-skills --skill developing-genkit-dartGenkit Dart 是一个用于 Dart 的 AI SDK,为代码生成、结构化输出、工具、流程和 AI 智能体提供了统一的接口。
如果您需要关于初始化 Genkit (Genkit())、生成 (ai.generate)、工具 (ai.defineTool)、流程 (ai.defineFlow)、嵌入 (ai.embedMany)、流式处理或调用远程流程端点的帮助,请加载核心框架参考文档:references/genkit.md
Genkit CLI 提供了一个本地开发 UI,用于运行流程、追踪执行过程、试用模型和评估输出。
检查用户是否已安装:genkit --version
安装:
curl -sL cli.genkit.dev | bash # 原生 CLI
# 或
npm install -g genkit-cli # 通过 npm 安装
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
用法: 使用 genkit start 包装您的运行命令,以附加 Genkit 开发者 UI 和追踪功能:
genkit start -- dart run main.dart
Genkit 依赖于大量的插件套件来执行生成式 AI 操作、与外部 LLM 交互或托管 Web 服务器。
当被要求使用任何特定插件时,请务必通过参考下方对应的参考文档来验证其用法。当您需要了解插件的具体初始化参数、工具、模型和使用模式时,应加载相应的参考文档:
| 插件名称 | 参考链接 | 描述 |
|---|---|---|
genkit_google_genai | references/genkit_google_genai.md | 加载以了解 Google Gemini 插件接口用法。 |
genkit_anthropic | references/genkit_anthropic.md | 加载以了解用于 Claude 模型的 Anthropic 插件接口。 |
genkit_openai | references/genkit_openai.md | 加载以了解用于 GPT 模型、Groq 和自定义兼容端点的 OpenAI 插件接口。 |
genkit_middleware | references/genkit_middleware.md | 加载以了解用于特定智能体行为的工具:filesystem、skills 和 toolApproval 中断。 |
genkit_mcp | references/genkit_mcp.md | 加载以了解模型上下文协议集成(服务器、主机和客户端功能)。 |
genkit_chrome | references/genkit_chrome.md | 加载以了解如何使用 Prompt API 在 Chrome 浏览器本地运行 Gemini Nano。 |
genkit_shelf | references/genkit_shelf.md | 加载以了解如何使用 Dart Shelf 通过 HTTP 集成 Genkit 流程操作。 |
genkit_firebase_ai | references/genkit_firebase_ai.md | 加载以了解 Firebase AI 插件接口(通过 Vertex AI 使用 Gemini API)。 |
每当您在工具、流程和提示内部定义模式映射时,必须使用 schemantic 库。要了解如何使用 schemantic,请务必阅读 references/schemantic.md 以了解如何实现类型安全的生成 Dart 代码。当您遇到像 @Schema()、SchemanticType 或带有 $ 前缀的类这样的符号时,这一点尤其重要。Genkit Dart 使用 schemantic 来处理其所有数据模型,因此理解它是使用 Genkit Dart 的一项关键技能。
dart analyze 检查代码是否能干净地编译。每周安装量
1.3K
代码仓库
GitHub 星标数
182
首次出现
13 天前
安全审计
安装于
gemini-cli1.2K
codex467
cursor467
github-copilot466
opencode463
kimi-cli462
Genkit Dart is an AI SDK for Dart that provides a unified interface for code generation, structured outputs, tools, flows, and AI agents.
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
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:
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:
genkit start -- dart run main.dart
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 | Load for Google Gemini plugin interface usage. |
genkit_anthropic | references/genkit_anthropic.md | Load for Anthropic plugin interface for Claude models. |
genkit_openai | references/genkit_openai.md | Load for OpenAI plugin interface for GPT models, Groq, and custom compatible endpoints. |
genkit_middleware |
Whenever you define schemas mapping inside of Tools, Flows, and Prompts, you must use the schemantic library. To learn how to use schemantic, ensure you read 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.
dart analyze before generating the final response.Weekly Installs
1.3K
Repository
GitHub Stars
182
First Seen
13 days ago
Security Audits
Gen Agent Trust HubPassSocketWarnSnykPass
Installed on
gemini-cli1.2K
codex467
cursor467
github-copilot466
opencode463
kimi-cli462
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
| references/genkit_middleware.md |
Load for Tooling for specific agentic behavior: filesystem, skills, and toolApproval interrupts. |
genkit_mcp | references/genkit_mcp.md | Load for Model Context Protocol integration (Server, Host, and Client capabilities). |
genkit_chrome | references/genkit_chrome.md | Load for Running Gemini Nano locally inside the Chrome browser using the Prompt API. |
genkit_shelf | references/genkit_shelf.md | Load for Integrating Genkit Flow actions over HTTP using Dart Shelf. |
genkit_firebase_ai | references/genkit_firebase_ai.md | Load for Firebase AI plugin interface (Gemini API via Vertex AI). |