NOTE: When an argument's default is given as [], this is a shorthand
for a dynamically assigned default value on each call. We don't mean
the literal meaning of this notation in Python, which would imply
that all calls would share a single empty list object as their default.
typeagent.knowpro.universal_message.ConversationMessage
Constructor and fields:
class ConversationMessage(
text_chunks: list[str], # Text of the message, 1 or more chunks
tags: list[str] = [], # Optional tags
timestamp: str | None = None, # ISO timestamp in UTC with 'z' suffix
metadata: ConversationMessageMeta, # See below
)- Only
text_chunksis required. - Tags are arbitrary pieces of information attached to a message
that will be indexed; e.g.
["sketch", "pet shop"] - If present, the timestamp must be of the form
2025-10-14T09:03:21z.
typeagent.knowpro.universal_message.ConversationMessageMeta
Constructor and fields:
class ConversationMessageMeta(
speaker: str | None = None, # Optional entity who sent the message
recipients: list[str] = [], # Optional entities to whom the message was sent
)This class represents the metadata for a given ConversationMessage.
typeagent.transcripts.transcript.TranscriptMessage
typeagent.transcripts.transcript.TranscriptMessageMeta
These are simple aliases for ConversationMessage and
ConversationMessageMeta, respectively.
typeagent.knowpro.factory.ConversationBase
Represents a conversation, which holds ingested messages and the extracted and indexed knowledge thereof.
It is constructed by calling the factory function
typeagent.create_conversation described below.
It has one public method:
-
queryasync def query( question: str, # Other parameters are not public ) -> str
Tries to answer the question using (only) the indexed messages. If no answer is found, the returned string starts with
"No answer found:".
There is currently only one public function.
-
create_conversationasync def create_conversation( dbname: str | None, message_type: type, name: str = "", tags: list[str] | None = None, settings: ConversationSettings | None = None, ) -> ConversationBase
- Constructs a conversation object.
- The required
dbnameargument specifies the SQLite3 database name (e.g.test.db). If explicitly set toNonethe data is stored in RAM and will not persist when the process exits. - The required
message_typeis normallyTranscriptMessageorConversationMessage(there are other possibilities too, as yet left undocumented). - The optional
namespecifies the conversation name, which may be used in diagnostics. tagsgives tags (likeConversationMessage.tags) for the whole conversation.settingsprovides overrides for various aspects of the knowledge extraction and indexing process. Its exact usage is currently left as an exercise for the reader.