Memory Roles
Postgram uses explicit memory roles so you can store both long-term memory and conversation continuity without mixing them.
What this page covers
Section titled “What this page covers”This page explains when to use durable_memory versus session_context, how to
query each role, and how to groom expired session context.
Core workflow
Section titled “Core workflow”- Store durable operational memory with role metadata:
pgm store "Prefer GraphQL for search result caching." \ --type=memory \ --tags architecture \ --metadata '{"memory_role":"durable_memory"}'- Store session context for thread continuity:
pgm memory session-context "We discussed entity graph boundaries." \ --tags session-context \ --topic postgram-memory- Query a specific role:
pgm search "entity graph boundaries" --type=memory --memory-role session_context- Clean up session context when it grows stale (normal users use
--dry-run, then an explicit duration, then--yes).
- Durable memory is intended for long-term, future-agent truth.
- Session context is typically scoped to a client identity and used for short-term continuity.
- The admin CLI supports broader maintenance options such as
--all-clients, promotion, and archiving modes.