FirestoreDb
class.
You can get started with Firestore following their Get Started guide.
Usage
You need to provide aproject_id
parameter to the FirestoreDb
class. Firestore will connect automatically using your Google Cloud credentials.
firestore_for_agent.py
Prerequisites
- Ensure your gcloud project is enabled with Firestore. Reference Firestore documentation
- Install dependencies:
pip install openai google-cloud-firestore agno
- Make sure your gcloud project is set up and you have the necessary permissions to access Firestore
Params
Parameter | Type | Default | Description |
---|---|---|---|
db_client | Optional[Client] | - | The Firestore client to use. |
project_id | Optional[str] | - | The GCP project ID for Firestore. |
session_collection | Optional[str] | - | Name of the collection to store sessions. |
memory_collection | Optional[str] | - | Name of the collection to store memories. |
metrics_collection | Optional[str] | - | Name of the collection to store metrics. |
eval_collection | Optional[str] | - | Name of the collection to store evaluation runs. |
knowledge_collection | Optional[str] | - | Name of the collection to store knowledge documents. |
Developer Resources
- View Cookbook