Skip to main content

Transcript

A Transcript object represents a sequence of chat messages (user, assistant, system, tool) from the perspective of a single agent. See here for more details on the chat message schemas.

TranscriptGroup

Bases: BaseModel Represents a group of transcripts that are logically related. A transcript group can contain multiple transcripts and can have a hierarchical structure with parent groups. This is useful for organizing transcripts into logical units like experiments, tasks, or sessions. Attributes:

to_text

Render this transcript group with its children and metadata. Metadata appears below the rendered children content. Parameters: Returns:

Transcript

Bases: BaseModel Represents a transcript of messages in a conversation with an AI agent. A transcript contains a sequence of messages exchanged between different roles (system, user, assistant, tool) and provides methods to organize these messages into logical units of action. Attributes:

to_text

Render this transcript as formatted text with optional comments. Parameters: Returns:

render_metadata_comments

Render metadata comments (agent run, transcript, or block metadata). For metadata comments, we render the key on which the comment was written and the user’s content. TODO(mengk): known limitation: does not highlight text_range selections, if available. I’m not sure if it’s supported in the UI, but just pointing this out for the backend. Parameters: Returns:

render_block_content_comments

Render block content comments with text range highlighting. For block content comments with text_range, we surround the range with tags and render the comment content below with a reference to the selection. Parameters: Returns: