- Firestore vector search — use Cloud Firestore’s native vector similarity search as a retriever for RAG pipelines.
- Firebase Genkit Monitoring — export traces, metrics, and logs to the Google Cloud Observability suite through a single call.
- Firebase Auth integration — verify Firebase ID tokens to protect HTTP-triggered flows (Go only, see
auth.go).
Installation
- TypeScript
- Go
Configuration
- TypeScript
- Go
The TypeScript Firebase plugin does not use a plugin initializer — it exports standalone functions (
defineFirestoreRetriever, enableFirebaseTelemetry) that you call directly.Make sure the Firebase Admin SDK is initialised before using these functions:Firestore as a vector store
Firestore’s vector search lets you find documents whose embedding vectors are nearest to a query embedding. Genkit wraps this with a retriever so your flows can use it for RAG.Prerequisites
Before querying, create a vector index on the Firestore collection:Defining a retriever
- TypeScript
- Go
Querying the retriever
- TypeScript
- Go
Indexing documents
Indexing (writing embeddings to Firestore) is handled outside the plugin — you embed each document and write it to the collection using the Firebase Admin SDK:Firebase Genkit Monitoring
Enable telemetry export to Google Cloud Trace, Logging, and Monitoring:- TypeScript
- Go
enableFirebaseTelemetry delegates to the @genkit-ai/google-cloud plugin internally, so all Google Cloud Observability features are available.When deploying to Firebase App Hosting or Cloud Run, the project ID and credentials are automatically inferred from the runtime environment. No additional configuration is needed.
Firebase Auth for flow security
In Go, the Firebase plugin provides anAuth client you can use to verify Firebase ID tokens in HTTP middleware:
Deploying to Firebase App Hosting
Firebase App Hosting has native support for Genkit. Set up Firebase and deploy:Related pages
RAG guide
Build retrieval-augmented generation pipelines end-to-end.
Firebase deployment
Deploy Genkit flows to Firebase App Hosting.
Vertex AI plugin
Vertex AI Vector Search for larger-scale retrieval.
Observability
Traces, metrics, and logging in production.
