Skip to main content

Data Models

All data models are frozen dataclasses with a from_dict() class method for deserialization. Import them from the top-level estuary_sdk package.

Session & Connection​

SessionInfo​

Returned by client.connect().

FieldTypeDescription
session_idstrUnique session identifier
conversation_idstrConversation identifier
character_idstrCharacter (agent) ID
player_idstrPlayer ID
livekit_tokenstr | NoneLiveKit token (if server supports LiveKit)
livekit_urlstr | NoneLiveKit server URL
livekit_roomstr | NoneLiveKit room name

Response Models​

BotResponse​

A chunk of the character's text response.

FieldTypeDescription
textstrFull accumulated response text
partialstrText content of just this chunk
is_finalboolTrue when the response is complete
message_idstrUnique message identifier
chunk_indexintSequential chunk index (starts at 0)
is_interjectionboolTrue if unprompted message

BotVoice​

A chunk of the character's voice audio.

FieldTypeDescription
audiostrBase64-encoded PCM audio data
message_idstrUnique message identifier
chunk_indexintSequential chunk index
is_finalboolTrue when last audio chunk
is_livekitboolTrue if audio routed via LiveKit

SttResponse​

Speech-to-text transcription result.

FieldTypeDescription
textstrTranscribed text
is_finalboolTrue when transcription is finalized

InterruptData​

Information about an interrupted response.

FieldTypeDescription
message_idstr | NoneID of interrupted message
reasonstr | NoneReason for interruption
interrupted_atstr | NoneISO timestamp

QuotaExceededData​

Quota limit information.

FieldTypeDescription
messagestrHuman-readable message
currentintCurrent usage count
limitintUsage limit
remainingintRemaining quota
tierstrAccount tier

CameraCaptureRequest​

Server request for a camera image.

FieldTypeDescription
request_idstrRequest identifier
textstr | NoneOptional text prompt

Memory Models​

MemoryData​

A single memory entry.

FieldTypeDescription
idstrMemory ID
user_idstrOwning user ID
agent_idstrCharacter (agent) ID
player_idstrPlayer ID
contentstrMemory content text
memory_typestrType of memory
confidencefloatConfidence score (0-1)
statusstrStatus ("active", "superseded", "decayed")
source_conversation_idstrID of the conversation that produced this memory
source_quotestrOriginal text that produced this memory
sourcestrSource ("text_chat", "voice", etc.)
topicstrPrimary topic
secondary_topicslist[str]Additional topics
last_accessed_atstr | NoneISO timestamp of last retrieval
access_countintNumber of times this memory was retrieved
extracted_atstr | NoneISO timestamp of extraction
created_atstr | NoneISO timestamp of creation
updated_atstr | NoneISO timestamp of last update

MemoryListResponse​

Paginated list of memories.

FieldTypeDescription
memorieslist[MemoryData]Memory entries
totalintTotal count
limitintPage size
offsetintPage offset

CoreFact​

A stable, high-confidence fact.

FieldTypeDescription
idstrFact ID
fact_keystrFact key (e.g., "name", "favorite_food")
fact_valuestrFact value
source_memory_idstr | NoneID of the memory this fact was derived from

CoreFactsResponse​

FieldTypeDescription
core_factslist[CoreFact]List of core facts

MemorySearchResult​

A single search hit. It carries the matched memory's ID, score, and text, not the full MemoryData record. Look the record up with client.memory.get_memories() if you need its other fields.

FieldTypeDescription
memory_idstrID of the matched memory
similarityfloatSimilarity score (higher is more relevant)
contentstrThe matched memory's content text

MemorySearchResponse​

FieldTypeDescription
resultslist[MemorySearchResult]Search results
querystrOriginal search query
totalintTotal matches

MemoryTimeline​

Memories grouped by time period.

FieldTypeDescription
timelinelist[TimelineEntry]Date-grouped entries
total_memoriesintTotal memory count
group_bystrGrouping period

TimelineEntry​

FieldTypeDescription
datestrDate label
memorieslist[MemoryData]Memories in this period

MemoryStats​

FieldTypeDescription
total_activeintActive memories
total_supersededintSuperseded memories
total_decayedintDecayed memories
by_typedict[str, int]Count by memory type
core_factsintNumber of core facts

MemoryDeleteResponse​

FieldTypeDescription
messagestrLegacy confirmation message (Deleted N records) synthesized by the SDK from the count.
deleted_countintNumber of memories deleted

Knowledge Graph Models​

MemoryGraph​

The full knowledge graph.

FieldTypeDescription
nodeslist[GraphNode]Graph nodes
edgeslist[GraphEdge]Graph edges
statsGraphStatsGraph statistics
staleboolWhether the graph needs rebuilding

GraphNode​

A node in the knowledge graph. Fields vary by node type.

FieldTypeDescription
idstrNode ID
typestrNode type: "user", "cluster", "memory", "entity"
labelstr | NoneDisplay label
contentstr | NoneMemory content (memory nodes)
memory_typestr | NoneMemory type (memory nodes)
confidencefloat | NoneConfidence score (memory nodes)
namestr | NoneEntity name (entity nodes)
entity_typestr | NoneEntity type (entity nodes)
mention_countint | NoneNumber of mentions (entity nodes)
memory_countint | NoneMemories in cluster (cluster nodes)
levelint | NoneHierarchy level (cluster nodes)

GraphEdge​

An edge connecting two nodes.

FieldTypeDescription
sourcestrSource node ID
targetstrTarget node ID
typestrEdge type
relationship_typestr | NoneRelationship category
labelstr | NoneDisplay label
confidencefloat | NoneConfidence score

GraphStats​

FieldTypeDescription
total_memoriesintTotal memories in graph
total_entitiesintTotal entities
cluster_countintNumber of clusters
clustersdict[str, int]Cluster sizes by label

Character Models​

Character​

A full character definition.

FieldTypeDescription
idstrCharacter ID
namestrCharacter name
taglinestr | NoneShort tagline
personalitystr | NonePersonality description
backgroundstr | NoneBackground story
avatarstr | NoneAvatar URL
system_promptstr | NoneCustom system prompt
llm_providerstrLLM provider (default: "openai")
llm_modelstrLLM model (default: "gpt-5-mini")
tts_providerstrTTS provider (default: "inworld")
tts_modelstrTTS model (default: "inworld-tts-2-flash")
tts_delivery_modestr | NoneInworld TTS-2 quality setting: "STABLE", "BALANCED", or "CREATIVE"; None uses the provider default
tts_voicestr | NoneTTS voice ID
actionslist[AgentAction]Available actions
is_publicboolWhether publicly visible
is_activeboolWhether currently active
launch_statusstr"running", "stopped", etc.

CharacterListResponse​

FieldTypeDescription
characterslist[Character]Character list
totalintTotal count
limitintPage size
offsetintPage offset

GeneratedCharacter​

Result of image-to-character generation.

FieldTypeDescription
idstrCharacter ID
namestrGenerated name
personalitystrGenerated personality
model_urlstr | None3D model URL (when ready)
model_statusstr | NoneModel generation status
source_image_urlstr | NoneOriginal image URL

ModelStatus​

3D model generation progress.

FieldTypeDescription
model_statusstr | NoneCurrent status
model_preview_urlstr | NonePreview URL
model_urlstr | NoneFinal model URL
thumbnail_urlstr | NoneThumbnail URL
progressintProgress percentage (0-100)

Player Models​

PlayerConversation​

A player's conversation record.

FieldTypeDescription
idstrConversation ID
character_idstrCharacter ID
player_idstrPlayer ID
message_countintNumber of messages
last_activitystr | NoneLast activity timestamp
created_atstr | NoneCreation timestamp

PlayerConversationList​

FieldTypeDescription
conversationslist[PlayerConversation]Conversation list
totalintTotal count

PlayerMessage​

A single message in a conversation.

FieldTypeDescription
idintMessage ID
conversation_idstrConversation ID
rolestr"user" or "assistant"
contentstrMessage text
timestampstr | NoneISO timestamp
image_urlstr | NoneAttached image URL

PlayerMessageList​

FieldTypeDescription
messageslist[PlayerMessage]Message list
paginationPaginationPagination metadata

PlayerStats​

FieldTypeDescription
total_conversationsintTotal conversations
total_messagesintTotal messages
first_activitystr | NoneFirst activity timestamp
last_activitystr | NoneLast activity timestamp

Pagination​

FieldTypeDescription
pageintCurrent page
limitintPage size
totalintTotal items
has_moreboolWhether more pages exist

RetryConfig​

Configuration for HTTP request retries in RestClient.

FieldTypeDefaultDescription
max_retriesint3Maximum number of retry attempts
backoff_factorfloat1.0Multiplier for exponential backoff delay
retry_on_statustuple[int, ...](500, 502, 503, 504)HTTP status codes that trigger a retry

Action Models​

AgentAction​

An action the character can perform.

FieldTypeDescription
namestrAction name
descriptionstr | NoneAction description
parameterslist[ActionParameter]Action parameters

ActionParameter​

FieldTypeDescription
namestrParameter name
typestrParameter type (default: "string")
requiredboolWhether required
descriptionstr | NoneParameter description

MemoryUpdatedEvent​

Real-time memory extraction notification.

FieldTypeDescription
agent_idstrCharacter ID
player_idstrPlayer ID
memories_extractedintMemories extracted this turn
facts_extractedintCore facts extracted
conversation_idstrConversation ID
new_memorieslist[MemoryData]Newly extracted memories
timestampstrISO timestamp