Understand the Nudge Trigger Model
mainNudges allow durable graph memory to be injected into an in-session agent without consuming extra tokens for querying. A mechanical hook reads the graph at specific lifecycle moments and injects relevant data or instructions. The process is deterministic and uses a local embedder for similarity, avoiding external model calls on this path.
There are three layers to the model:
- Policy (
domain/nudge.py): Defines how specific events map to actions. - Executor (
application/services/nudge_service.py): Handles the reading of graph views and deduplication. - Dedup Ledger (
adapters/outbound/session/injection_ledger.py): Ensures the same information isn't injected multiple times within a session.