Skip to content

Firebase

The Firebase plugin provides three key capabilities:

  • Firestore Vector Store — Native vector similarity search for RAG applications.
  • Cloud Functions Deployment — Deploy Genkit flows as scalable Cloud Functions with auth and streaming.
  • Telemetry — Export traces and metrics to Google Cloud observability.
<dependency>
<groupId>com.google.genkit</groupId>
<artifactId>genkit-plugin-firebase</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>

Export traces and metrics to Google Cloud observability (Cloud Trace, Monitoring, Logging):

FirebasePlugin.builder()
.projectId("my-project")
.enableTelemetry(true)
.forceDevExport(true) // Also export in dev mode
.build()

Enable these APIs in your Google Cloud project:

  • Cloud Trace API
  • Cloud Monitoring API
  • Firebase project on the Blaze (pay-as-you-go) plan
  • Application Default Credentials or a service account JSON
  • GCLOUD_PROJECT or GOOGLE_CLOUD_PROJECT environment variable (auto-detected)

See the firebase sample for a complete RAG pipeline with Firestore vector search and a Cloud Functions deployment example.