Add Observation
POST /observations
Create a new observation or update an existing one via deduplication.
Request Body
Session ID this observation belongs to
Observation type:
manual, architecture, bug, decision, pattern, config, discovery, learning, passiveShort title for the observation (max 200 chars)
Full observation content (max 2000 chars, truncated automatically)
Tool that generated this observation (e.g., “bash”, “edit”, “grep”)
Project name for filtering
Scope:
project or personalTopic key for grouping related observations (e.g., “architecture/auth-flow”)
Response
The observation ID (auto-incremented)
Always “saved”
Example
Passive Capture
POST /observations/passive
Automatically extract and save learnings from structured text (e.g., session summaries).
Request Body
Session ID
Text containing ”## Key Learnings:” or ”## Aprendizajes:” section
Project name
Source identifier (e.g., “subagent-stop”, “session-end”)
Response
Total learnings found in the text
New observations created
Learnings skipped (already exist)
Example
Get Recent Observations
GET /observations/recent
Retrieve recent observations with optional filtering.
Query Parameters
Filter by project name
Filter by scope:
project or personalMaximum observations to return (1-100)
Response
Returns an array of observations (see schema below).Example
Get Single Observation
GET /observations/{id}
Retrieve a specific observation by ID.
Path Parameters
Observation ID
Response
Returns a single observation object (see schema below).Example
Update Observation
PATCH /observations/{id}
Update an existing observation. All fields are optional.
Path Parameters
Observation ID to update
Request Body
New observation type
New title
New content
New project name
New scope
New topic key
Response
Returns the updated observation object.Example
Delete Observation
DELETE /observations/{id}
Soft-delete or permanently delete an observation.
Path Parameters
Observation ID to delete
Query Parameters
If
true, permanently deletes. If false, soft-deletes (sets deleted_at)Response
The observation ID
Always “deleted”
Whether this was a permanent deletion
Example
Get Timeline
GET /timeline
Get chronological context around a specific observation.
Query Parameters
The anchor observation ID
Number of observations to retrieve before the anchor
Number of observations to retrieve after the anchor
Response
The anchor observation
Observations before the anchor (chronological order)
Observations after the anchor (chronological order)
Session containing the anchor observation
Total observations in the session
Example
Observation Schema
Complete observation object structure:Deduplication
Engram automatically deduplicates observations within a 15-minute window using:- Content hash - Normalized content comparison
- Topic key - Same topic = update existing observation
- Duplicate tracking - Increments
duplicate_countand updateslast_seen_at