messages
Class info¶
Classes¶
| Name | Children | Inherits |
|---|---|---|
| AgentMessage aclientp.schema.v2.messages An agent message upsert, in addition to or instead of streamed chunks. |
||
| AgentMessageChunk aclientp.schema.v2.messages A chunk of the agent's response being streamed. |
||
| AgentThought aclientp.schema.v2.messages An agent thought (reasoning) message upsert. |
||
| AgentThoughtChunk aclientp.schema.v2.messages A chunk of the agent's internal reasoning being streamed. |
||
| SessionMessage aclientp.schema.v2.messages An upsert of a message sent to or received from another session. |
||
| SessionMessageChunk aclientp.schema.v2.messages A content block appended to a session message. |
||
| UserMessage aclientp.schema.v2.messages A user message upsert, e.g. when the agent accepts or replaces a prompt. |
||
| UserMessageChunk aclientp.schema.v2.messages A chunk of the user's message being streamed. |
🛈 DocStrings¶
v2 message updates: streamed chunks and whole-message upserts.
Every chunk carries the messageId of its message. Message upserts are keyed by
messageId; their content replaces the message content (omitted leaves it
unchanged, None clears it), while chunks append to it.
AgentMessage
¶
Bases: _MessageUpsert
An agent message upsert, in addition to or instead of streamed chunks.
Source code in src/aclientp/schema/v2/messages.py
AgentMessageChunk
¶
Bases: _Chunk
A chunk of the agent's response being streamed.
Source code in src/aclientp/schema/v2/messages.py
AgentThought
¶
Bases: _MessageUpsert
An agent thought (reasoning) message upsert.
Source code in src/aclientp/schema/v2/messages.py
AgentThoughtChunk
¶
Bases: _Chunk
A chunk of the agent's internal reasoning being streamed.
Source code in src/aclientp/schema/v2/messages.py
SessionMessage
¶
Bases: AnnotatedObject
An upsert of a message sent to or received from another session.
Every field but message_id is a patch: omitted leaves it unchanged, None
clears it, a value replaces it.
Source code in src/aclientp/schema/v2/messages.py
content
class-attribute
instance-attribute
¶
content: Sequence[ContentBlock] | MISSING | None = MISSING
Complete replacement content.
message_id
instance-attribute
¶
message_id: MessageId
Identifier of the message in this session's transcript.
recipient_message_id
class-attribute
instance-attribute
¶
recipient_message_id: MessageId | MISSING | None = MISSING
On an outgoing view: the messageId of the incoming view in the recipient's
transcript.
recipient_session_id
class-attribute
instance-attribute
¶
recipient_session_id: SessionId | MISSING | None = MISSING
The receiving session.
SessionMessageChunk
¶
Bases: AnnotatedObject
A content block appended to a session message.
Participants and references come from session_message upserts.
Source code in src/aclientp/schema/v2/messages.py
UserMessage
¶
Bases: _MessageUpsert
A user message upsert, e.g. when the agent accepts or replaces a prompt.
Source code in src/aclientp/schema/v2/messages.py
UserMessageChunk
¶
Bases: _Chunk
A chunk of the user's message being streamed.