Get started with:
Genkit is an open-source framework for building full-stack AI-powered applications, built and used in production by Google.
It offers a unified interface for integrating AI models from many model providers, so you can use the best models for your needs. Rapidly build and deploy production-ready chatbots, automations, and recommendation systems using streamlined APIs for multimodal content, structured outputs, tool calling, and agentic workflows.
Get started with just a few lines of code:
import { genkit } from 'genkit';import { googleAI } from '@genkit-ai/googleai';
const ai = genkit({ plugins: [googleAI()] });
const { text } = await ai.generate({ model: googleAI.model('gemini-2.0-flash'), prompt: 'Why is Firebase awesome?'});
import { genkit } from 'genkit';import { vertexAI } from '@genkit-ai/vertexai';
const ai = genkit({ plugins: [vertexAI()] });
const response = await ai.generate({ model: vertexAI.model('imagen-3.0-generate-002'), output: { format: 'media' }, prompt: 'a banana riding a bicycle',});return response.media;
import { genkit } from 'genkit';import { openAI, gpt4o } from 'genkitx-openai';
const ai = genkit({ plugins: [openAI()] });
const { text } = await ai.generate({ model: gpt4o, prompt: 'Why is Firebase awesome?'});
import { genkit } from 'genkit';import { anthropic, claude35Sonnet } from 'genkitx-anthropic';
const ai = genkit({ plugins: [anthropic()] });
const { text } = await ai.generate({ model: claude35Sonnet, prompt: 'Why is Firebase awesome?'});
import { genkit } from 'genkit';import { llama31, vertexAIModelGarden } from '@genkit-ai/vertexai/modelgarden';
const ai = genkit({ plugins: [ vertexAIModelGarden({ location: 'us-central1', models: [llama31], }), ],});
const { text } = await ai.generate({ model: llama31, prompt: 'Why is Firebase awesome?',});
import { genkit } from 'genkit';import { mistralLarge, vertexAIModelGarden } from '@genkit-ai/vertexai/modelgarden';
const ai = genkit({ plugins: [ vertexAIModelGarden({ location: 'us-central1', models: [mistralLarge], }), ],});
const { text } = await ai.generate({ model: mistralLarge, prompt: 'Why is Firebase awesome?',});
import { genkit } from 'genkit';import { ollama } from 'genkitx-ollama';
const ai = genkit({ plugins: [ollama()] });
const { text } = await ai.generate({ model: ollama.model('gemma3:latest'), prompt: 'Why is Firebase awesome?',});
Explore & build with Genkit
Play with AI sample apps, with visualizations of the Genkit code that powers them, at no cost to you.
Create your own AI-powered feature in minutes with our “Get started” guide.
Key capabilities
Broad AI model support | Use a unified interface to integrate with hundreds of models from providers like Google, OpenAI, Anthropic, Ollama, and more. Explore, compare, and use the best models for your needs. |
Simplified AI development | Use streamlined APIs to build AI features with structured output, agentic tool calling, context-aware generation, multi-modal input/output, and more. Genkit handles the complexity of AI development, so you can build and iterate faster. |
Web and mobile ready | Integrate seamlessly with frameworks and platforms including Next.js, React, Angular, iOS, Android, using purpose-built client SDKs and helpers. |
Cross-language support | Build with the language that best fits your project. Genkit provides SDKs for JavaScript/TypeScript, Go, and Python with consistent APIs and capabilities across all supported languages. |
Deploy anywhere | Deploy AI logic to any environment that supports your chosen programming language, such as Cloud Functions for Firebase, Google Cloud Run, or third-party platforms, with or without Google services. |
Developer tools | Accelerate AI development with a purpose-built, local CLI and Developer UI. Test prompts and flows against individual inputs or datasets, compare outputs from different models, debug with detailed execution traces, and use immediate visual feedback to iterate rapidly on prompts. |
Production monitoring | Ship AI features with confidence using comprehensive production monitoring. Track model performance, and request volumes, latency, and error rates in a purpose-built dashboard. Identify issues quickly with detailed observability metrics, and ensure your AI features meet quality and performance targets in real-world usage. |
How does it work?
Genkit simplifies AI integration with an open-source SDK and unified APIs that work across various model providers and programming languages. It abstracts away complexity so you can focus on delivering great user experiences.
Some key features offered by Genkit include:
- Text and image generation
- Type-safe, structured data generation
- Tool calling
- Prompt templating
- Persisted chat interfaces
- AI workflows
- AI-powered data retrieval (RAG)
Genkit is designed for server-side deployment in multiple language environments, and also provides seamless client-side integration through dedicated helpers and client SDKs.
Implementation path
Choose your language and model provider | Select the Genkit SDK for your preferred language (JavaScript/TypeScript, Go, or Python). Choose a model provider like Google Gemini or Anthropic, and get an API key. Some providers, like Vertex AI, may rely on a different means of authentication. | |
Install the SDK and initialize | Install the Genkit SDK, model-provider package of your choice, and the Genkit CLI. Import the Genkit and provider packages and initialize Genkit with the provider API key. | |
Write and test AI features | Use the Genkit SDK to build AI features for your use case, from basic text generation to complex multi-step workflows and agents. Use the CLI and Developer UI to help you rapidly test and iterate. | |
Deploy and monitor | Deploy your AI features to Firebase, Google Cloud Run, or any environment that supports your chosen programming language. Integrate them into your app, and monitor them in production in the Firebase console. |
Connect with us
- Join us on Discord – Get help, share ideas, and chat with other developers.
- Contribute on GitHub – Report bugs, suggest features, or explore the source code.