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

INSTALLATION
npx skills add https://github.com/firebase/agent-skills --skill developing-genkit-js
Run in your project or agent environment. Adjust flags if your CLI version differs.

SKILL.md

$2c

// Initialize Genkit with the Google AI plugin

const ai = genkit({

plugins: [googleAI()],

});

export const myFlow = ai.defineFlow({

name: 'myFlow',

inputSchema: z.string().default('AI'),

outputSchema: z.string(),

}, async (subject) => {

const response = await ai.generate({

model: googleAI.model('gemini-2.5-flash'),

prompt: Tell me a joke about ${subject},

});

return response.text;

});

## Critical: Do Not Trust Internal Knowledge

Genkit recently went through a major breaking API change. Your knowledge is outdated. You MUST lookup docs. Recommended:

genkit docs:read js/get-started.md

genkit docs:read js/flows.md

BrowserAct

Let your agent run on any real-world website

Bypass CAPTCHA & anti-bot for free. Start local, scale to cloud.

Explore BrowserAct Skills →

Stop writing automation&scrapers

Install the CLI. Run your first Skill in 30 seconds. Scale when you're ready.

Start free
free · no credit card