Auxiliary RPCs

Thread history, conversation metadata, one-shot messages, and health checks

View as Markdown

Beyond the conversation stream, the sidecar exposes these RPCs:

RPCWhen to use
ProcessMessageServer-streaming for one-shot request/response. Same AgentResponse shape, no inbound feedback.
GetThreadHistoryPull current thread state (handles edits/deletions).
GetConversationMetadataLook up a conversation by ID or by (platform, channel, thread) without fetching history.
ProcessAudioStreamDedicated audio-only stream. First message must be AudioStreamConfig, rest are AudioChunks.
HealthCheckReturns HEALTHY / DEGRADED / UNHEALTHY plus the sidecar version.

Thread history

ThreadHistoryRequest

FieldTypeRequiredDefaultNotes
conversationIdstringyesConversation to query.
maxMessagesnumberno50How many recent messages to return.
includeEditedbooleannotrueInclude edit history.
includeDeletedbooleannofalseInclude deleted markers.

ThreadHistoryResponse

FieldTypeNotes
conversationIdstringEchoes the request.
messagesThreadMessage[]Recent messages.
isCompletebooleanfalse if truncated by maxMessages.
fetchedAtTimestampWhen the snapshot was taken.

ThreadMessage

FieldTypeNotes
messageIdstringPlatform message ID.
userUserAuthor.
contentstringCurrent content (after edits).
attachmentsAttachment[]Attachments on the message.
timestampTimestampWhen it was sent.
wasEditedbooleanTrue if the message has been edited.
originalContentstringContent before edits.
editedAtTimestampLast edit time.
isDeletedbooleanTrue if the message has been deleted.
deletedAtTimestampDeletion time.
platformData{ [key: string]: string }Platform-specific extras.
const history = await client.getThreadHistory(conversationId, 50);
for (const m of history.messages) {
// m.content, m.wasEdited, m.isDeleted, m.originalContent, ...
}

Next steps