Entity Model
Postgram stores everything as structured entities with a small common schema and optional metadata.
What this page covers
Section titled “What this page covers”This page explains the main entity fields, common entity types, and what happens when entities are created or updated.
Core workflow
Section titled “Core workflow”- Create an entity using REST, MCP, or the
pgmCLI. - Set a
type(memory,person,project,task,interaction,document),content,tags,visibility, and optional metadata. - Read it back by
idand keep the returnedversionfor future writes. - Update using a write with the latest
version(optimistic locking). - Delete only when you want it removed from active views; Postgram uses soft-delete semantics in the database layer.
Typical fields:
content: free-form text payload.type: one of the known entity categories.tags: one or many labels for filtering and search.visibility:personal,work, orshared.status: commonly used for tasks.metadata: arbitrary JSON for system or client-specific context.enrichment_status:pending,completed, orfailedfor background work.
- Entities include immutable IDs and monotonically increasing
versionvalues. PATCHupdates must pass the latestversion; stale versions can return a conflict response.- Task-like entities and people/projects can be linked using graph edges for fast context jumps.