textrawl
byJeff Green

remember_fact

Store facts about entities with automatic semantic embedding

Store atomic facts about entities (people, projects, concepts) with automatic semantic embedding for later retrieval.

Parameters

ParameterTypeRequiredDefaultDescription
entityNamestringREQUIRED-Name of entity (1-200 chars)
entityTypeenumREQUIRED-Type: person, concept, project, preference, fact, location, organization
observationstringREQUIRED-Single atomic fact to remember (1-2000 chars)
sourceenumOPTIONALconversationSource: conversation, note, document, manual
validUntilstringOPTIONAL-ISO date for expiring facts (e.g., "2026-12-31")

Entity Types

TypeUse For
personPeople, users, contacts
conceptIdeas, topics, technologies
projectProjects, initiatives, products
preferenceUser preferences, settings
factGeneral facts, data points
locationPlaces, addresses, regions
organizationCompanies, teams, groups

Example Request

{
  "entityName": "Jeff",
  "entityType": "person",
  "observation": "prefers dark mode in all IDEs",
  "source": "conversation"
}

Response

Compact Mode (Default)

When COMPACT_RESPONSES=true (default), responses use short keys to reduce token usage by 40-60%:

{"ok":true,"entity":"550e8400","obs":"550e8401"}

Verbose Mode

When COMPACT_RESPONSES=false:

{
  "success": true,
  "message": "Remembered: \"prefers dark mode in all IDEs\" about Jeff",
  "entityId": "550e8400-e29b-41d4-a716-446655440000",
  "entityName": "Jeff",
  "entityType": "person",
  "observationId": "550e8400-e29b-41d4-a716-446655440001"
}

Duplicate Detection

If you try to remember a fact that's already stored:

Compact Mode

{"ok":true,"dup":true,"entity":"550e8400","obs":"550e8401"}

Verbose Mode

{
  "success": true,
  "duplicate": true,
  "message": "This fact was already remembered.",
  "entityId": "550e8400-e29b-41d4-a716-446655440000",
  "observationId": "550e8400-e29b-41d4-a716-446655440001"
}

Use Cases

User Preferences

{
  "entityName": "User",
  "entityType": "person",
  "observation": "prefers TypeScript over JavaScript"
}

Project Context

{
  "entityName": "Project Alpha",
  "entityType": "project",
  "observation": "uses PostgreSQL for the database layer"
}

Temporary Facts

{
  "entityName": "Sprint 45",
  "entityType": "project",
  "observation": "focus is on search performance improvements",
  "validUntil": "2026-02-01"
}

Errors

ErrorCauseFix
Embedding service not configuredMissing OPENAI_API_KEY or Ollama configSet OPENAI_API_KEY or configure OLLAMA_BASE_URL
Database not configuredMissing Supabase credentialsSet SUPABASE_URL and SUPABASE_SERVICE_KEY
Invalid entity nameName empty or exceeds 200 charsProvide name between 1-200 chars
Invalid observationObservation empty or exceeds 2000 charsProvide observation between 1-2000 chars
Invalid entity typeUnknown entity typeUse valid types: person, concept, project, preference, fact, location, organization
Memory not enabledENABLE_MEMORY feature flag is falseSet ENABLE_MEMORY=true

On this page