xr_ai_tools.text_memory#
Participant-scoped persistent text-memory tools.
Classes#
One timestamped transcript segment to persist. |
|
Confirmation that a transcript segment was persisted. |
|
Persisted transcript text at a point in time. |
|
Source and inclusive time window for a transcript query. |
|
Transcript segments selected from one source and time window. |
|
Persistent source identifiers known to text memory. |
|
Select one transcript source for statistics. |
|
Aggregate storage and time-range statistics for one source. |
|
Participant and inclusive time window for conversation recall. |
|
One timestamped user or agent turn in a recalled conversation. |
|
Chronological user and agent turns recalled for a participant. |
|
Append timestamped text to participant-scoped JSONL storage. |
|
Own transcript persistence, query, statistics, and conversation recall tools. |
Module Contents#
- class xr_ai_tools.text_memory.AddTranscriptRequest#
One timestamped transcript segment to persist.
- source_id: str#
Participant or internal source identifier.
- timestamp_us: int#
Unix timestamp in microseconds.
- text: str#
Text segment to persist.
- classmethod text_must_not_be_blank(value: str) str#
Require visible text in a persisted segment.
- class xr_ai_tools.text_memory.AddTranscriptResult#
Confirmation that a transcript segment was persisted.
- ok: bool = True#
Whether the append operation succeeded.
- class xr_ai_tools.text_memory.TranscriptSegment#
Persisted transcript text at a point in time.
- timestamp_us: int#
Unix timestamp in microseconds.
- text: str#
Persisted transcript text.
- class xr_ai_tools.text_memory.QueryTranscriptsRequest#
Source and inclusive time window for a transcript query.
- source_id: str#
Participant or internal source identifier.
- start_us: int#
Inclusive window start in Unix microseconds.
- end_us: int#
Inclusive window end in Unix microseconds.
- class xr_ai_tools.text_memory.QueryTranscriptsResult#
Transcript segments selected from one source and time window.
- segments: list[TranscriptSegment]#
Matching segments ordered by timestamp.
- class xr_ai_tools.text_memory.ListTranscriptSourcesResult#
Persistent source identifiers known to text memory.
- sources: list[str]#
Source identifiers in lexical order.
- class xr_ai_tools.text_memory.TranscriptStatsRequest#
Select one transcript source for statistics.
- source_id: str#
Participant or internal source identifier.
- class xr_ai_tools.text_memory.TranscriptStatsResult#
Aggregate storage and time-range statistics for one source.
- source_id: str#
Participant or internal source identifier.
- count: int#
Number of stored transcript segments.
- total_chars: int#
Total number of characters across stored segments.
- earliest_us: int | None#
Earliest stored Unix timestamp in microseconds, if present.
- latest_us: int | None#
Latest stored Unix timestamp in microseconds, if present.
- class xr_ai_tools.text_memory.RecallConversationRequest#
Participant and inclusive time window for conversation recall.
- participant_id: str#
Participant whose conversation to recall.
- start_us: int#
Inclusive window start in Unix microseconds.
- end_us: int#
Inclusive window end in Unix microseconds.
- class xr_ai_tools.text_memory.ConversationEntry#
One timestamped user or agent turn in a recalled conversation.
- timestamp_us: int#
Unix timestamp in microseconds.
- role: Literal['user', 'agent']#
Speaker responsible for the text.
- text: str#
Conversation text.
- class xr_ai_tools.text_memory.RecallConversationResult#
Chronological user and agent turns recalled for a participant.
- entries: list[ConversationEntry]#
Conversation turns ordered by timestamp.
- class xr_ai_tools.text_memory.TextMemoryTool(directory: str | pathlib.Path | _TranscriptStore)#
Append timestamped text to participant-scoped JSONL storage.
- class xr_ai_tools.text_memory.TextMemoryTools(directory: str | pathlib.Path)#
Own transcript persistence, query, statistics, and conversation recall tools.