Agno supports using Firestore as a database with theDocumentation Index
Fetch the complete documentation index at: https://agno-v2-shaloo-ai-support-link.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
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:
uv 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 |
|---|---|---|---|
id | Optional[str] | - | The ID of the database instance. UUID by default. |
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. |
traces_collection | Optional[str] | - | Name of the collection to store traces. |
spans_collection | Optional[str] | - | Name of the collection to store spans. |