后端与数据库

developing-genkit-js

firebase/agent-skills

Develop AI-powered applications using Genkit in Node.js/TypeScript. Use when the user asks about Genkit, AI agents, flows, or tools in JavaScript/TypeScript, or when encountering Genkit errors, validation issues, type errors, or API problems.

  • 6.2万 次安装
  • 491 星标
  • 收录于

安装命令

npx skills add https://github.com/firebase/agent-skills --skill developing-genkit-js

要点

Build AI-powered Node.js/TypeScript applications with Genkit flows, tools, and multi-model support.

  • Genkit is provider-agnostic; supports Google AI, OpenAI, Anthropic, Ollama, and other LLM providers via plugins
  • Define flows with type-safe schemas using Zod, execute generation requests, and compose multi-step AI workflows in TypeScript
  • Requires Genkit CLI v1.29.0+; recent major API changes mean you must consult genkit docs:read and common-errors.md for current patterns, not prior knowledge
  • Use the CLI to search docs (genkit docs:search), read guides, and troubleshoot errors; always check Common Errors first when encountering validation, type, or API failures

SKILL.md

Genkit JS

Prerequisites

Ensure the genkit CLI is available.

  • Run genkit --version to verify. Minimum CLI version needed: 1.29.0
  • If not found or if an older version (1.x < 1.29.0) is present, install/upgrade it: npm install -g genkit-cli@^1.29.0.

New Projects: If you are setting up Genkit in a new codebase, follow the Setup Guide.

Hello World

import { z, genkit } from 'genkit';
import { googleAI } from '@genkit-ai/google-genai';