Backend
7,098 installs
developing-genkit-js
by 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,…
Skill content
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
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';