Skip to content

Commit e18a1f8

Browse files
Adding more detailed comments for both session and memory services
1 parent bef661c commit e18a1f8

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

src/google/adk/integrations/firestore/firestore_memory_service.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@
4444

4545

4646
class FirestoreMemoryService(BaseMemoryService):
47-
"""Memory service that uses Google Cloud Firestore as the backend."""
47+
"""Memory service that uses Google Cloud Firestore as the backend.
48+
49+
It uses the existing session data to create memories in a top-level memory collection.
50+
"""
4851

4952
def __init__(
5053
self,

src/google/adk/integrations/firestore/firestore_session_service.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,17 @@
4444

4545

4646
class FirestoreSessionService(BaseSessionService): # type: ignore[misc]
47-
"""Session service that uses Google Cloud Firestore as the backend."""
47+
"""Session service that uses Google Cloud Firestore as the backend.
48+
49+
It creates a hierarchy in Firestore to hold events by user and session:
50+
adk-session
51+
↳ <user ID>
52+
↳ sessions
53+
↳ <session ID>
54+
↳ events
55+
↳ <event ID>
56+
↳ Event document
57+
"""
4858

4959
def __init__(
5060
self,

0 commit comments

Comments
 (0)