Skip to main content
Observations are individual memories stored during a session. They can represent decisions, bugs, patterns, or any notable information.

Add Observation

POST /observations Create a new observation or update an existing one via deduplication.

Request Body

string
required
Session ID this observation belongs to
string
required
Observation type: manual, architecture, bug, decision, pattern, config, discovery, learning, passive
string
required
Short title for the observation (max 200 chars)
string
required
Full observation content (max 2000 chars, truncated automatically)
string
Tool that generated this observation (e.g., “bash”, “edit”, “grep”)
string
Project name for filtering
string
default:"project"
Scope: project or personal
string
Topic key for grouping related observations (e.g., “architecture/auth-flow”)

Response

integer
The observation ID (auto-incremented)
string
Always “saved”

Example

Passive Capture

POST /observations/passive Automatically extract and save learnings from structured text (e.g., session summaries).

Request Body

string
required
Session ID
string
required
Text containing ”## Key Learnings:” or ”## Aprendizajes:” section
string
Project name
string
Source identifier (e.g., “subagent-stop”, “session-end”)

Response

integer
Total learnings found in the text
integer
New observations created
integer
Learnings skipped (already exist)

Example

Get Recent Observations

GET /observations/recent Retrieve recent observations with optional filtering.

Query Parameters

string
Filter by project name
string
Filter by scope: project or personal
integer
default:"20"
Maximum 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

integer
required
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

integer
required
Observation ID to update

Request Body

string
New observation type
string
New title
string
New content
string
New project name
string
New scope
string
New topic key

Response

Returns the updated observation object.

Example

Delete Observation

DELETE /observations/{id} Soft-delete or permanently delete an observation.

Path Parameters

integer
required
Observation ID to delete

Query Parameters

boolean
default:"false"
If true, permanently deletes. If false, soft-deletes (sets deleted_at)

Response

integer
The observation ID
string
Always “deleted”
boolean
Whether this was a permanent deletion

Example

Get Timeline

GET /timeline Get chronological context around a specific observation.

Query Parameters

integer
required
The anchor observation ID
integer
default:"5"
Number of observations to retrieve before the anchor
integer
default:"5"
Number of observations to retrieve after the anchor

Response

object
The anchor observation
array
Observations before the anchor (chronological order)
array
Observations after the anchor (chronological order)
object
Session containing the anchor observation
integer
Total observations in the session

Example

Observation Schema

Complete observation object structure:

Deduplication

Engram automatically deduplicates observations within a 15-minute window using:
  1. Content hash - Normalized content comparison
  2. Topic key - Same topic = update existing observation
  3. Duplicate tracking - Increments duplicate_count and updates last_seen_at
This prevents noise from repeated observations while preserving evidence of recurrence.