Skip to main content
Genkit’s plugin system lets you swap in any model provider, vector store, or telemetry backend without changing your application code. A plugin registers one or more actions — models, embedders, retrievers, indexers, evaluators — into the Genkit registry. Your flows call those actions by name and never depend on a specific provider’s SDK directly.

How plugins extend Genkit

Every plugin follows the same lifecycle:
  1. Register — pass the plugin to genkit({ plugins: [...] }) (JS/TS), genkit.Init(ctx, genkit.WithPlugins(...)) (Go), or Genkit(plugins=[...]) (Python).
  2. Lazy init — the registry calls init() / Init() on first use, not at startup, so cold-start cost is minimised.
  3. Resolve — when your code references googleai/gemini-2.5-flash, the registry asks the googleai plugin to materialise that action on demand.
  4. List — the Dev UI calls list() / list_actions() to enumerate every available model or embedder for the action explorer.
You can configure multiple plugins in the same Genkit instance — for example googleAI() for prototyping and vertexAI() for production — and choose between them at call time by qualifying the model name with its provider prefix.

Official plugins

JavaScript / TypeScript

Go

Python

Quick start

The plugin interface

At its core, a plugin implements three methods: In TypeScript the modern interface is GenkitPluginV2 (from genkit/plugin). In Go plugins implement the api.Plugin interface. In Python plugins extend the abstract Plugin base class from genkit._core.plugin. See Writing plugins for a complete walkthrough.

Google AI plugin

Gemini, Imagen, Veo, and embeddings via the Gemini Developer API.

Vertex AI plugin

Enterprise access to Google models on Google Cloud.

Ollama plugin

Run Llama, Mistral, Gemma, and other models fully locally.

Firebase plugin

Firestore vector search and Firebase telemetry.

Writing plugins

Build your own plugin and publish it to npm.

RAG guide

Use retrievers and embedders together for retrieval-augmented generation.