GcsJsonDb
class. This storage backend stores session data as JSON blobs in a GCS bucket.
Google Cloud SDK Setup
gcloud init
to configure your account and projectGCS Permissions
Authentication
GOOGLE_APPLICATION_CREDENTIALS
environment variable to the path of your service account JSON file.Python Dependencies
Setup with Docker
docker-compose.yml
file:Using Fake GCS with Docker
Parameter | Type | Default | Description |
---|---|---|---|
bucket_name | str | - | Name of the GCS bucket where JSON files will be stored. |
prefix | Optional[str] | - | Path prefix for organizing files in the bucket. Defaults to "agno/". |
session_table | Optional[str] | - | Name of the JSON file to store sessions (without .json extension). |
memory_table | Optional[str] | - | Name of the JSON file to store user memories. |
metrics_table | Optional[str] | - | Name of the JSON file to store metrics. |
eval_table | Optional[str] | - | Name of the JSON file to store evaluation runs. |
knowledge_table | Optional[str] | - | Name of the JSON file to store knowledge content. |
project | Optional[str] | - | GCP project ID. If None, uses default project. |
credentials | Optional[Any] | - | GCP credentials. If None, uses default credentials. |