Agno supports using Firestore as a database with the FirestoreDb class. You can get started with Firestore following their Get Started guide.

Usage

You need to provide a project_id parameter to the FirestoreDb class. Firestore will connect automatically using your Google Cloud credentials.
firestore_for_agent.py
from agno.agent import Agent
from agno.db.firestore import FirestoreDb

PROJECT_ID = "agno-os-test"  # Use your project ID here

# Setup the Firestore database
db = FirestoreDb(project_id=PROJECT_ID)

# Setup your Agent with the Database
agent = Agent(db=db)

Prerequisites

  1. Ensure your gcloud project is enabled with Firestore. Reference Firestore documentation
  2. Install dependencies: pip install openai google-cloud-firestore agno
  3. Make sure your gcloud project is set up and you have the necessary permissions to access Firestore

Params

ParameterTypeDefaultDescription
db_clientOptional[Client]-The Firestore client to use.
project_idOptional[str]-The GCP project ID for Firestore.
session_collectionOptional[str]-Name of the collection to store sessions.
memory_collectionOptional[str]-Name of the collection to store memories.
metrics_collectionOptional[str]-Name of the collection to store metrics.
eval_collectionOptional[str]-Name of the collection to store evaluation runs.
knowledge_collectionOptional[str]-Name of the collection to store knowledge documents.

Developer Resources