Skip to content

6.11.2.6 AgentMessage

Immutable

Records are never updated after creation.

6.11.2.6.1 Purpose

One message of a conversation: from the user, the assistant or a tool. Every tool call in the turn is authorized as the sender of this message, so a shared conversation never widens anyone's rights. Assistant messages record the model profile and the tokens they cost.

6.11.2.6.2 Questions it answers

  • What was said, by whom, and when?
  • Which model answered, and how many tokens did it use?
  • Which request id in Cloud Logging matches this message?

6.11.2.6.3 Fields

Field Type Cardinality Description
id string (uuid) 1..1 Key.
conversation AgentConversation 1..1
role enum 1..1 Values: user, assistant, tool.
sender_user User 0..1 Who sent it, in an Organization conversation; empty for the assistant and for tools.
sender_moonitoring_user MoonitoringUser 0..1 Who sent it, in a staff conversation. Every tool call in the turn is authorized as the sender; the sender must be a member of the conversation's Organization, or a Moonitoring user for a staff agent.
content string 1..1
model_profile AgentModelProfile 0..1 The profile that produced an assistant message, as resolved for that request.
input_tokens integer 0..1
output_tokens integer 0..1
request_id string 0..1
created_at datetime 1..1

6.11.2.6.4 Relationships

References

Referenced by