Skip to main content
Every SDK method returns a Pydantic model. This page lists them all in one place so you can grep for field names without hunting through individual method docs.
Type-specific field names. The Pydantic models below intentionally use type-specific field names (Preference.strength, not confidence, and Episode.summary, not content) because each memory type has different semantics. The SDK handles transport-level field mapping internally; you only work with these typed models in application code.
All types live in maximem_synap and are importable from the top-level package:

Memory item types

These are the atomic units of structured memory. A ContextResponse is a bag of these.

Fact

Preference

Episode

Emotion

TemporalEvent


Context responses

ContextResponse

Returned by conversation.context.fetch, user.context.fetch, customer.context.fetch, client.context.fetch.
Iterate over all items in priority order:
The atomized lists above are the primary surface. The optional conversation_context carries the rolling session view (compacted summary plus recent turns) as a single coherent block rather than atomized items. It is None unless the conversation has a compaction available.

ConversationContextModel

The current-session context attached to a ContextResponse as conversation_context. It bundles the compacted narrative summary, current state, key extractions, and the most recent raw turns together, instead of splitting them into the typed item lists. It is None when no compacted/session context exists for the conversation (e.g. a fresh conversation).
conversation_context is the coherent-block view; facts / preferences / episodes / emotions / temporal_events are the atomized view of retrieval. Most integrations read the atomized lists; reach for conversation_context when you want the pre-assembled session narrative. For prompt-ready compacted text specifically, prefer get_context_for_prompt() (see Context Compaction).

UserProfileModel

The caller profile returned inline by conversation-summary fetches (as ContextResponse.profile / UnifiedContextResponse.profile) and directly by user.get_profile. It bundles client-defined critical attributes with a short free-text overview.

ConversationSummaryModel

One previous-conversation summary, returned in the conversations list of a conversation-summary fetch: what a prior call was about and how it progressed.
A conversation whose summary hasn’t been produced yet returns summary=None, summary_status="pending"; one whose compaction failed returns "failed". Callers still see that the call happened either way. UnifiedContextResponse.format_for_prompt() renders these under a ## Previous Conversations section (and the profile under ## Caller Profile).

ResponseMetadata

compaction_applied is not a bool. It’s None when no compaction ran, or a CompactionLevel enum value when one did. Test with if meta.compaction_applied is not None.

Ingestion responses

CreateMemoryResponse

Returned by memories.create. Ingestion is async: this comes back immediately with an ingestion_id you can poll.

TranscriptIngestResponse

Returned by conversation.ingest_transcript. Like CreateMemoryResponse, ingestion is async: poll ingestion_id with memories.status().

IngestStatus enum

MemoryStatusResponse

Returned by memories.status(ingestion_id).

Compaction responses

CompactionTriggerResponse

Returned by conversation.context.compact. This call kicks off a compaction job asynchronously and returns this trigger confirmation, not the compacted content. To get the actual compacted text, call get_compacted() once the job completes (or poll get_compaction_status()).

CompactionResponse

Returned by conversation.context.get_compacted. Carries the actual compacted text and typed extractions.

CompactionStatusResponse

Returned by get_compaction_status. This is a Pydantic model: access fields as attributes, not dict keys.

ContextForPromptResponse

Returned by get_context_for_prompt. Optimized for direct injection into an LLM system prompt.

CompactionLevel enum

All seven values are equally canonical members of the enum.

Type-checking tips

  • Only ContextResponse and CompactionResponse have model_config = {"extra": "allow"} and expose the raw cloud payload via a .raw property; other models silently drop unknown fields. When the cloud adds a new field on those two models, you can read it from response.raw until a typed attribute ships.
  • Datetime fields are timezone-aware (UTC). When comparing, use datetime.now(timezone.utc), not datetime.utcnow().
  • For runtime validation (e.g., in your application boundary), call .model_validate(...) rather than constructing manually: Pydantic enforces all constraints.