explaingit

genkit-ai/genkit

5,910TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TLDR

Google Firebase's open-source toolkit for adding AI features to your app. Write once, swap between Gemini, OpenAI, Anthropic, or local models with one config change. Includes a visual testing UI so you can try prompts before going live.

Mindmap

mindmap
  root((Genkit))
    AI Models
      Google Gemini
      OpenAI
      Anthropic
      Local via Ollama
    Languages
      JavaScript TypeScript
      Go
      Python beta
      Dart preview
    Features
      Text generation
      Image generation
      Tool calling
      RAG documents
    Developer Tools
      Local UI
      CLI testing
      Prompt comparison
      Execution traces
    Deployment
      Firebase Functions
      Google Cloud Run
      Any server
    Frontends
      Next.js React
      Angular
      iOS Android
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a chat assistant or AI answer bot to your web or mobile app without learning multiple AI provider APIs.

USE CASE 2

Build a document Q&A feature that pulls relevant content before the AI answers.

USE CASE 3

Let your AI call functions in your own code, for example, look up a database or trigger an action.

USE CASE 4

Test and compare prompts from different AI models side by side before shipping to users.

Tech stack

TypeScriptJavaScriptGoPythonDartFirebaseGoogle CloudOllama

Getting it running

Difficulty · moderate Time to first run · 30min

JavaScript/TypeScript and Go are production-ready. Python is in beta. Dart is early preview. Requires choosing an AI provider (e.g. Gemini API key) before running examples.

Open-source from Google Firebase team, free to use and modify. License type not specified in the explanation.

In plain English

Genkit is an open-source framework from Google's Firebase team for building applications that use AI models. It provides programming libraries (SDKs) for JavaScript, TypeScript, Go, Python, and Dart, allowing developers to add AI features to a project in whichever language they are already using. The JavaScript and Go versions are production-ready, the Python version is in beta, and the Dart version is an early preview. The framework's main idea is to give you a single consistent way to work with many different AI providers. Instead of learning a separate API for Google Gemini, OpenAI, Anthropic, or a locally running model via Ollama, you write code once using Genkit's API and swap the underlying model by changing a configuration line. This covers text generation, image generation, structured data output, tool calling (where the AI can invoke functions in your code), and retrieval-augmented generation (where the AI pulls relevant documents before answering). Genkit ships with a local developer UI and command-line tool that let you test prompts interactively, compare outputs from different models side by side, and step through detailed execution traces to debug problems. You can iterate on prompts and AI workflows without deploying to a server. For deployment, Genkit is designed to run on the server side. You can deploy to Firebase's Cloud Functions, Google Cloud Run, or any other environment that supports your chosen language. Client SDKs and helpers are provided for connecting web and mobile frontends (Next.js, React, Angular, iOS, Android) to the server-side AI logic. In production, the framework includes monitoring tools for tracking request volumes, latency, and error rates so you can catch problems in live usage. The documentation and a set of interactive example applications are available at genkit.dev.

Copy-paste prompts

Prompt 1
How do I switch from using Gemini to OpenAI in a Genkit project without rewriting my code?
Prompt 2
Show me a simple example of calling a JavaScript function from an AI model using Genkit tool calling.
Prompt 3
How do I set up retrieval-augmented generation in Genkit so the AI answers questions from my own documents?
Prompt 4
How do I deploy a Genkit AI backend to Firebase Cloud Functions and connect it to a React frontend?
Prompt 5
How do I use the Genkit local developer UI to test and compare prompts before going live?
Open on GitHub → Explain another repo

← genkit-ai on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.