Firebase Genkit¶
What it is¶
Firebase Genkit is an open-source framework from the Google Firebase team designed to help app developers build full-stack, AI-powered applications. It focuses on integrating generative AI features using familiar patterns and paradigms from the Firebase ecosystem.
What problem it solves¶
It reduces the friction of building production-ready AI apps by providing a unified interface for LLMs, a streamlined tool-calling system, and built-in observability for debugging and performance tracking. It is specifically designed to work seamlessly with serverless architectures like Firebase Cloud Functions and Cloud Run.
Where it fits in the stack¶
Category: Frameworks / Full-Stack AI Framework
Typical use cases¶
- AI-Powered Mobile/Web Apps: Adding features like chatbots, content generation, or data summarization to Firebase apps.
- Serverless AI Backends: Running AI logic in Cloud Functions for Firebase or Google Cloud Run.
- RAG for App Data: Integrating vector search and document retrieval using Firestore or other vector stores.
- Agentic App Logic: Using Genkit "Flows" to orchestrate complex multi-step AI tasks.
Strengths¶
- App Developer Centric: Uses paradigms and tooling familiar to mobile and web developers.
- Unified API: Support for Gemini, OpenAI, Ollama, DeepSeek, and more.
- Developer Experience (DX): Includes a local Developer UI for testing prompts, flows, and tool calls in real-time.
- Observability: Built-in support for traces, logs, and token usage metrics.
- Seamless Firebase Integration: Works out-of-the-box with Firebase Auth, Firestore, and Cloud Functions.
Limitations¶
- Language Support: Currently supports JavaScript/TypeScript and Go, with Python support in development.
- Ecosystem Focus: While open-source, it is optimized for the Google Cloud/Firebase stack.
Getting started¶
Installation¶
npm install -g genkit
Initialize Project¶
genkit init
Basic Flow Example (TypeScript)¶
import { defineFlow, run } from '@genkit-ai/flow';
import { generate } from '@genkit-ai/ai';
import { gemini15Flash } from '@genkit-ai/googleai';
export const myFlow = defineFlow(
{ name: 'myFlow', inputSchema: z.string() },
async (input) => {
const response = await generate({
model: gemini15Flash,
prompt: `Tell me a joke about ${input}`,
});
return response.text();
}
);
Related tools / concepts¶
Sources / references¶
Contribution Metadata¶
- Last reviewed: 2026-05-08
- Confidence: high