# Genkit

> One AI app framework across JavaScript, Go, Python and Dart, with a local dev UI

- Category: App Orchestration / App Frameworks
- Language: TypeScript
- Licence: Apache-2.0
- Repository: https://github.com/genkit-ai/genkit
- Website: https://genkit.dev
- Canonical page: https://ai-tldr.dev/tools/genkit/

## In short

Genkit is an open-source framework for building full-stack AI-powered applications, built and used in production by Google's Firebase. It sits in the App Frameworks category of the App Orchestration tools and is open-source, written in TypeScript and licensed Apache-2.0. To get started: install Genkit and a model plugin.

## Overview

Genkit is an open-source framework for building full-stack AI-powered applications, built and used in production by Google's Firebase. It puts a unified interface over models from providers including Google, OpenAI, Anthropic and Ollama, so the code that generates text, calls a tool or returns structured data stays the same when you change the model behind it.

Its distinguishing trait is cross-language parity: the same concepts and APIs ship as SDKs for JavaScript/TypeScript and Go (both production-ready with full feature support), Python (beta, wide feature support), and Dart (preview, core functionality). That makes it unusual among AI app frameworks, most of which are Python-first with a thinner port elsewhere.

Around the model calls, Genkit provides the pieces an app needs: prompt templating via Dotprompt, type-safe structured output, tool calling and agentic workflows, persisted chat interfaces, retrieval-augmented generation, and flows for multi-step logic. A local CLI and Developer UI let you test prompts and flows against single inputs or datasets, compare model outputs and read execution traces, and a production monitoring dashboard tracks latency, request volume and error rates once deployed. Genkit runs server-side in any environment that supports its language — Cloud Functions for Firebase, Google Cloud Run or third-party platforms, with or without Google services — and offers client SDKs for Next.js, React, Angular, iOS and Android.

## What it does

- Unified interface over models from Google, OpenAI, Anthropic, Ollama and more, so providers can be swapped without rewriting app code
- SDKs with consistent APIs for JavaScript/TypeScript and Go (production-ready), Python (beta) and Dart (preview)
- Streamlined APIs for structured output, agentic tool calling, context-aware generation, multimodal input/output and persisted chat
- Flows for multi-step AI logic, Dotprompt prompt templating and built-in RAG primitives
- Local CLI and Developer UI to test prompts and flows on inputs or datasets, compare model outputs and inspect execution traces
- Production monitoring dashboard for model performance, request volume, latency and error rates

## Getting started

The quickest path is the JavaScript/TypeScript SDK with the Google GenAI plugin. You supply the provider's API key; Genkit handles the call.

1. Install Genkit and a model plugin

   The core package plus the plugin for whichever provider you want to start with.

```bash
npm install genkit @genkit-ai/google-genai
```

2. Configure the instance and generate

   Create a Genkit instance with the plugins you need, then call generate with a model and a prompt.

```ts
import { genkit } from 'genkit';
import { googleAI } from '@genkit-ai/google-genai';

const ai = genkit({ plugins: [googleAI()] });

const { text } = await ai.generate({
    model: googleAI.model('gemini-flash-latest'),
    prompt: 'What is the meaning of life?'
});
```

3. Iterate in the Developer UI

   The Genkit CLI runs a local Developer UI where you can exercise prompts and flows, compare outputs across models and read detailed traces. See genkit.dev/docs/devtools for the full tooling guide.

4. Pick another language

   The same concepts are available in Go, Python (beta) and Dart (preview). Per-language installation and API docs live at genkit.dev, and runnable sample apps with their source are at examples.genkit.dev.

## When to use it

- Build a chatbot, automation or recommendation feature in TypeScript or Go without committing to a single model vendor
- Add AI to an existing Firebase or Cloud Run backend, using client SDKs to reach it from Next.js, React, Angular, iOS or Android
- Prototype a prompt or flow in the local Developer UI, comparing model outputs side by side before shipping it
- Stand up a RAG feature with tool calling and type-safe structured output, then watch latency and error rates on the monitoring dashboard
