Memories and Context
Memories let AI Representatives remember important facts across conversations. Instead of repeating information every session, the AI retains key details (preferences, past interactions, stated goals) and uses them to provide personalized responses.
Authentication required
All memory and context endpoints require a valid JWT or API key.
How memories work
When a visitor shares meaningful information during a conversation ("I focus on luxury condos in Brickell"), the AI Representative can store this as a memory. In future sessions, the AI uses stored memories to give more relevant, personalized answers without the visitor repeating themselves.
List memories
/api/v1/chat/memoriesList all stored memories for the authenticated user.
Create a memory
/api/v1/chat/memoriesManually create a memory entry.
contentstringRequiredThe fact or preference to remember.
categorystringOptionalOptional category for organizing memories (e.g. preferences, goals, context).
Update a memory
/api/v1/chat/memories/{memory_id}Update the content or category of an existing memory.
Delete a single memory
/api/v1/chat/memories/{memory_id}Delete a specific memory by ID.
Delete all memories
/api/v1/chat/memoriesDelete all memories for the authenticated user. This cannot be undone.
Deleting all memories resets the AI Representative to a blank state for this user. It will no longer recall any past preferences or context.
Chat context
Context configuration controls how the AI Representative behaves during conversations. This includes system-level instructions, personality settings, and knowledge boundaries.
Get context
/api/v1/chat/contextRetrieve the current chat context configuration.
Update context
/api/v1/chat/contextUpdate the chat context configuration.
Context plus memories
Context sets the baseline behavior (personality, boundaries). Memories add visitor-specific information on top. Together they create conversations that feel both on-brand and personal.
Context usage stats
/api/v1/chat/sessions/{session_id}/context-usageGet token usage for a specific session including memory overhead.
Use this endpoint to monitor how memories and context are affecting token usage. If a session is consuming too many tokens, consider compacting the session or pruning old memories.