One calendar, two names: fixing duplicate memories in Cognee's Google Calendar connector A developer contributed a fix to Cognee's open-source Google Calendar connector, which had been storing every event twice when a user configured both the "primary" alias and the calendar's real email-address ID. The patch reuses the connector's existing calendar listing to treat both spellings as one key, keeps the first configured spelling so default setups see no change, and lets the existing forget path clean up duplicates from earlier syncs. Three new tests cover the behavior, run against an in-memory fake of the Calendar API. AI agents are only as good as what they remember. Cognee https://github.com/topoteretes/cognee is an open-source memory layer for agents: you hand it documents, chats or data, and it builds a knowledge graph the agent can query later. For Mergetober WeMakeDevs × Cognee I spent my contribution on the Google Calendar connector, which turns your calendar into agent memory, so you can ask things like "what did I agree to in last week's design review?" or "when is my next 1:1 with Priya?". The connector is a dlt source. You hand it to Cognee in one call: python import cognee from cognee community connector google calendar import google calendar source await cognee.remember google calendar source calendar ids= "primary" , dataset name="calendar", primary key="id", write disposition="merge", answer = await cognee.recall "When is my next design review?" Each event becomes a short text document "Calendar event: Design review / When: ... / Attendees: ..." , which Cognee chunks and turns into entities and relations. Later syncs use Google's sync tokens, so only changed events are re-read, and deleted events are forgotten. In Google Calendar your main calendar has two names: the alias "primary" , and its real id, which is your email address. The connector's helper script examples/login.py lists your calendars by their real ids, so a natural setup looks like this: GOOGLE CALENDAR IDS=primary,me@gmail.com The connector treated those as two different calendars. It kept separate sync state for each and built row ids from the configured string gcal:primary: