Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Schema

Engram can generate JSON Schema documents for built-in entity types and publish those schemas into the git-ref-backed store.

CLI Usage

# Generate a schema to stdout
engram schema generate --entity task
engram schema generate --entity reasoning

# Write a schema to a file
engram schema generate --entity workflow --output workflow.schema.json

# Publish all built-in schemas as engram refs
engram schema publish

# Backward-compatible workflow-only generator
engram schema workflow --output workflow.schema.json

Supported Entities

schema generate accepts short names such as task and full schema IDs such as engram-task.

Schema IDNamespace pattern
engram-taskrefs/engram/task/*
engram-contextrefs/engram/context/*
engram-reasoningrefs/engram/reasoning/*
engram-knowledgerefs/engram/knowledge/*
engram-sessionrefs/engram/session/*
engram-adrrefs/engram/adr/*
engram-theoryrefs/engram/theory/*
engram-state-reflectionrefs/engram/state_reflection/*
engram-doc-fragmentrefs/engram/doc_fragment/*
engram-compliancerefs/engram/compliance/*
engram-workflowrefs/engram/workflow/*

Publish Behavior

engram schema publish serializes every built-in schema wrapper and stores it as a generic schema entity owned by the engram agent. Published schemas include:

  • id
  • namespace_pattern
  • title
  • crate version
  • JSON Schema payload
  • optional UI hints field

Use published schemas when external tools need to discover engram entity structure from the repository itself.