Knowledge Types

Engrams stores six distinct types of structured knowledge. Each maps to a database table and a set of MCP tools for creating, reading, searching, and deleting records.

Product Context

A single JSON document representing the high-level, relatively stable description of your project — goals, architecture overview, key features, tech stack. Updated with update_product_context; retrieved with get_product_context.

When to use it: Think of this as your project's README in structured form. Update it when you make a major architectural pivot or add a significant new feature area.

Active Context

A single JSON document representing the current state of work — the present focus, open questions, next steps, recent changes. Updated frequently during a session.

Decisions

Individual architectural or implementation choices with a summary, rationale, implementation details, and optional tags. Decisions are the most commonly used knowledge type.

Decision #7: Use JWT tokens for stateless authentication
Rationale: Scales better than sessions, works with microservices
Tags: auth, security, architecture

Supports full-text search (FTS5) and semantic vector search.

Progress

Task tracking with hierarchical parent/child support. Each entry has a status (TODO, IN_PROGRESS, DONE, BLOCKED) and an optional parent ID for subtask relationships.

System Patterns

Recurring architectural or design patterns observed or used in the project. Unlike decisions (which capture why), patterns capture how.

Pattern #3: Token validation middleware
Description: All API routes validate JWT in Authorization header
             using the shared auth.middleware module

Custom Data

A flexible category/key/value store for any project knowledge that doesn't fit the above types: glossaries, technical specifications, meeting notes, configuration snippets.

Category: ProjectGlossary
Key: "notification_channel"
Value: { "schema": "...", "description": "WebSocket channel for push notifications" }

Supports FTS and a dedicated search_project_glossary_fts tool.

Context Links (Relationships)

Explicit edges in the knowledge graph. A link connects two entities with a named relationship type:

Relationship typeMeaning
implementsPattern implements a Decision
related_toGeneral association
tracksProgress item tracks a Decision
blocksOne item blocks another
clarifiesCustom data clarifies a Decision
depends_onDependency relationship
supersedesA new decision supersedes an old one
resolvesA progress item resolves a Decision