Siestai
Memory ArchitectureOperations

Interaction Surfaces

How Arena (voice), Agent Chat (1:1), and Team Chat (group) trigger memory extraction

Memories are extracted from three interaction surfaces, each with its own extraction method and source_type column value.

Arena (Voice Sessions)

Source type: arena

The Arena is Siestai's multi-agent voice conversation interface powered by LiveKit. After each session ends, two extraction processes run:

  1. Per-agent memoriesextractAgentMemories() runs for each agent participant, producing 3–8 memories per agent
  2. Session briefextractSessionBrief() produces a structured summary with decisions, action items, unresolved topics, and follow-up questions

Both are stored with sourceSessionId linking back to the arena session.

Agent Chat (1:1 Text)

Source type: agent_chat

Single-agent text conversations between a user and one agent. Memory extraction runs via extractFromChat() at conversation boundaries.

Extracted categories: decision, position, task, open_question, learning, preference

Memories are stored in agentMemories with sourceThreadId linking to the chat thread.

Team Chat (Group Text)

Source type: team_chat

Multi-agent text conversations within a team context. Uses extractFromTeamChat() which produces:

  • Per-agent memories — Individual memories for each participating agent (stored in agentMemories)
  • Team memories — Shared team-level knowledge (stored in teamMemories)

Both are linked via sourceThreadId to the chat thread.

Extraction Model

All extraction uses claude-haiku-4-5 for speed and cost efficiency. The model returns structured JSON which is parsed by MemoryExtractionService. See pipeline/extraction for implementation details.

Source Type Usage

The source_type column enables filtering and analysis:

-- Find memories from a specific surface
SELECT * FROM agent_memories WHERE source_type = 'agent_chat';

-- Count by source
SELECT source_type, COUNT(*) FROM agent_memories GROUP BY source_type;

On this page