Reference

Entity retention

Entity retention

Understand which entities expire by observation time, which follow a parent, and which remain only while connected to the graph.

#Retention policies

Entities use one of four policies:

PolicyEntity typesCollection rule
ObservedChannel, Document, Email, Folder, SpreadsheetDelete when observed_at (or created_at if never observed) is outside the retention window.
OwnedMessage and Gmail attachment Document entitiesDelete with the parent Channel or Email.
ConnectedPersonDelete when the Person has no incoming or outgoing edges.
PersistentConfigured RSS feed Folder entitiesNever delete automatically.

A stub is not a separate retention category. It follows the policy of the entity it represents. An observable stub begins with observed_at = NULL, so its local insertion time controls retention until its own URL is observed.

Google Drive Folder contents are not owned children: a file can remain useful independently or belong to multiple folders. Removing a Folder therefore removes contains edges but does not delete its files.

#Bookmarking

Bookmarking an entity protects it from being removed when it expires. A bookmarked Message or Gmail attachment can remain after its parent is deleted.

#Expiration

The server runs expiration daily and applies the following rules:

  1. Bookmarked entities are never deleted
  2. Delete observed-policy entities whose effective retention timestamp is outside the window.
  3. Cascade deletion to their owned children.
  4. Detach bookmarked owned children before deleting an expired parent.
  5. Delete owned entities left without a parent, including detached children after they are unbookmarked.
  6. Delete connected-policy Persons that have no edges.

The retention period is controlled using AGENTGRAPH_RETENTION_DAYS, which defaults to 90 days.

#RSS observations

The RSS connector derives a small set of eligible URL prefixes from indexed RSS entry links, so that the browser extension can report observation for those RSS entries.