MemorySyncMemorySync
Core Concepts

Metadata & Semantic Fields

metadata_json is the open-ended JSON column on every memory. It mixes user-supplied keys with platform-computed keys. This page lists what the platform writes into it, what you can safely write into it, and what you should avoid.

Two layers in one column

LayerOwnerExamples
User-suppliedYouFree-form keys passed via the request metadata object.
EchoedServerSelected request fields copied in for downstream consumers (source, event_type, tags, ttl_minutes).
ComputedServerPipeline outputs (semantic_summary, processing_time_ms).

What you write

  • Anything JSON-serializable. The platform does not validate the schema.
  • Stable, lower-cased keys make filtering easier later.
  • Reference ids back to your own systems (ticket_id, order_id) — these are exactly what trace-back queries rely on.

Keys the server echoes from the request

KeySource
sourceRequest source field (also the source column).
event_typeRequest event_type field.
tagsRequest tags array (also the tags column).
ttl_minutesRequest ttl_minutes (also drives expires_at).

Keys the platform writes

KeyMeaning
semantic_summaryShort description produced by the semantic engine.
semantic_processingBoolean flag — whether the semantic engine ran.
preprocessing_timestampWhen preprocessing finished.
token_countTokens consumed by the embedding step.
processing_time_msTotal wall time of the semantic enrichment.

Keys you read back through <code>MemoryResponse</code>

The semantic enrichment also surfaces these on the response model — they originate inside metadata_json:

  • key_points
  • insights
  • entities
  • topics
  • context

Filtering on metadata at query time

POST /memory/query accepts a metadata-filter object. Filters apply after vector recall — they are evaluated in the primary store, not inside the vector index. Use them for narrow business filters (specific ticket_id, customer_id); use tags for coarse filters that must run at vector-search time.

What not to put in metadata

  • PII you would not store in plain text elsewheremetadata_json is not encrypted at the column level.
  • Large blobs — keep payloads small; the column is stored inline with the row.
  • Reserved keys — do not set semantic_summary, semantic_processing, preprocessing_timestamp, token_count, or processing_time_ms yourself; the server overwrites them.