developing-genkit-js
Installation
Summary
Build AI-powered applications in Node.js/TypeScript using Genkit flows, models, and tools.
- Supports multiple AI providers (Google AI, OpenAI, Anthropic, Ollama) with a unified API; defaults to Google AI if unspecified
- Define flows with input/output schemas using Zod, call models, and chain operations with built-in streaming and error handling
- Integrates with frameworks like Next.js, Firebase, and Express through dedicated plugins
- Requires Genkit CLI v1.29.0+; use
genkit docs:searchandgenkit docs:readto access authoritative documentation and troubleshoot errors
SKILL.md
Genkit JS
Prerequisites
Ensure the genkit CLI is available.
- Run
genkit --versionto 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';