How plugins extend Genkit
Every plugin follows the same lifecycle:- Register — pass the plugin to
genkit({ plugins: [...] })(JS/TS),genkit.Init(ctx, genkit.WithPlugins(...))(Go), orGenkit(plugins=[...])(Python). - Lazy init — the registry calls
init()/Init()on first use, not at startup, so cold-start cost is minimised. - Resolve — when your code references
googleai/gemini-2.5-flash, the registry asks thegoogleaiplugin to materialise that action on demand. - 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
| Plugin | Package | Category | Notes |
|---|---|---|---|
| Google AI (Gemini) | @genkit-ai/google-genai | Model provider | Gemini, Imagen, Veo, TTS via AI Studio API |
| Vertex AI | @genkit-ai/google-genai | Model provider | Gemini + Imagen on GCP (same package, different export) |
| Ollama | @genkit-ai/ollama | Model provider | Local models via Ollama server |
| Firebase | @genkit-ai/firebase | Vector store / telemetry | Firestore vector search, Firebase telemetry |
| Anthropic | genkitx-anthropic | Model provider | Claude 3.5 / 4 (community) |
| OpenAI-compatible | genkitx-openai | Model provider | OpenAI, OpenRouter, together.ai (community) |
| Pinecone | genkitx-pinecone | Vector store | Pinecone vector database (community) |
| Chroma | genkitx-chromadb | Vector store | ChromaDB (community) |
| LangChain | genkitx-langchain | Integration | Use LangChain tools inside Genkit (community) |
| Google Cloud | @genkit-ai/google-cloud | Telemetry | Cloud Trace + Cloud Logging |
Go
| Plugin | Import path | Category |
|---|---|---|
| Google AI / Vertex AI | github.com/firebase/genkit/go/plugins/googlegenai | Model provider |
| Ollama | github.com/firebase/genkit/go/plugins/ollama | Model provider |
| Firebase | github.com/firebase/genkit/go/plugins/firebase | Vector store / telemetry |
| Google Cloud | github.com/firebase/genkit/go/plugins/googlecloud | Telemetry |
Python
| Plugin | Package | Category |
|---|---|---|
| Google AI (Gemini) | genkit-google-genai-plugin | Model provider |
| Vertex AI | genkit-google-genai-plugin | Model provider |
| Ollama | genkit-ollama-plugin | Model provider |
| Anthropic | genkit-anthropic-plugin | Model provider |
| OpenAI-compatible | genkit-compat-oai-plugin | Model provider |
| DeepSeek | genkit-deepseek-plugin | Model provider |
| xAI (Grok) | genkit-xai-plugin | Model provider |
| Mistral | genkit-mistral-plugin | Model provider |
| Hugging Face | genkit-huggingface-plugin | Model provider |
| Firebase | genkit-firebase-plugin | Vector store / telemetry |
| Google Cloud | genkit-google-cloud-plugin | Telemetry |
Quick start
- TypeScript
- Go
- Python
The plugin interface
At its core, a plugin implements three methods:| Method | Purpose |
|---|---|
init() | One-time setup — create API clients, register known actions. Called lazily on first use. |
resolve(actionType, name) | Materialise a single action by kind and name (e.g. a model not registered at init time). |
list() | Return metadata for all available actions so the Dev UI can enumerate them. |
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.
Related pages
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.
