ideabrowser.com — find trending startup ideas with real demand
Try itnpx skills add https://github.com/firebase/agent-skills --skill developing-genkit-jsEnsure the genkit CLI is available.
genkit --version to verify. Minimum CLI version needed: 1.29.0npm install -g genkit-cli@^1.29.0.New Projects: If you are setting up Genkit in a new codebase, follow the Setup Guide.
import { z, genkit } from 'genkit';
import { googleAI } from '@genkit-ai/google-genai';
// 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;
});
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
See Common Errors for a list of deprecated APIs (e.g., configureGenkit, response.text(), defineFlow import) and their v1.x replacements.
ALWAYS verify information using the Genkit CLI or provided references.
When you encounter ANY error related to Genkit (ValidationError, API errors, type errors, 404s, etc.):
genkit docs:search)DO NOT:
This protocol is non-negotiable for error handling.
genkit docs:search "plugins" to find relevant documentation.package.json to identify the runtime (Next.js, Firebase, Express).
@genkit-ai/next, @genkit-ai/firebase, or @genkit-ai/google-cloud.npx tsc --noEmit) after making changes.Use the Genkit CLI to find authoritative documentation:
genkit docs:search <query>
genkit docs:search "streaming"genkit docs:listgenkit docs:read <path>
genkit docs:read js/flows.mdThe genkit CLI is your primary tool for development and documentation.
genkit --help for a full list of commands.