Format examples for injection into agent prompt. As for FormatNotesForInjection, pass
the run's user as contextUser and the text carries only the fields that user may read; an
example with neither input nor output readable is left out.
Array of examples to format
OptionalcontextUser: UserInfoThe user the run is for; the text is limited to the fields they may read
Format notes for injection into agent prompt. Includes memory policy explaining scope precedence for conflict resolution.
Provisional notes (written in-flight by an agent, awaiting Memory Manager hardening) render in their own block FIRST and carry higher precedence under recency-wins semantics: a freshly stated preference must beat a months-old vetted one. The trust tradeoff is deliberate (PR #2761) and contained upstream by the write-path guards (descriptive types only, scope clamp, per-run cap, TTL).
The notes come from the AI engine's cache, which holds every field whoever the run is for.
Pass the run's user as contextUser and the text carries only the fields that user may read:
a note whose body they may not read is left out, and an unreadable scope field reads as unset.
Without a user the notes render in full, which is right only for server-internal callers.
Array of notes to format
Whether to include the memory policy preamble (default: true)
OptionalcontextUser: UserInfoThe user the run is for; the text is limited to the fields they may read
Retrieve examples for a specific agent execution context. Implements multi-dimensional scoping and injection strategy.
Retrieve notes for a specific agent execution context. Implements multi-dimensional scoping and injection strategy.
Central service for retrieving and formatting notes/examples for injection into agent context. Implements multi-dimensional scoping (Agent, User, Company) with 8 priority levels.