API Reference

Protocol Documentation

Table of Contents

Top

schemas/greyseal/v1/conversation.proto

Conversation

Conversation is a chat session that persists and can be resumed.

FieldTypeLabelDescription
uuidstring
titlestringtitle is an optional display name; can be set manually or auto-generated from the first exchange.
role_uuidstringrole_uuid optionally links to a Role that sets the system prompt.
resource_uuidsstringrepeatedresource_uuids optionally scopes retrieval to a specific set of resources. When empty, all indexed resources are searched.
summarystringsummary holds a rolling compressed summary of older messages to manage context window length.
messagesMessagerepeated
created_atgoogle.protobuf.Timestamp
updated_atgoogle.protobuf.Timestamp

Message

Message is a single turn in a conversation.

FieldTypeLabelDescription
uuidstring
conversation_uuidstring
roleMessageRole
contentstring
resource_uuidsstringrepeatedresource_uuids holds references to indexed resources used to generate this response (populated for ASSISTANT messages).
feedbackint32feedback allows simple quality tracking: -1 negative, 0 neutral, 1 positive.
created_atgoogle.protobuf.Timestamp

MessageRole

NameNumberDescription
MESSAGE_ROLE_UNSPECIFIED0
MESSAGE_ROLE_USER1
MESSAGE_ROLE_ASSISTANT2

Top

schemas/greyseal/v1/resource.proto

Resource

Resource represents an ingested and indexed document used as conversation context.

FieldTypeLabelDescription
uuidstring
namestring
servicestring
entitystring
sourceSource
pathstring
created_atgoogle.protobuf.Timestamp
indexed_atgoogle.protobuf.Timestamp

Source

NameNumberDescription
SOURCE_UNSPECIFIED0
SOURCE_WEBSITE1
SOURCE_PDF2
SOURCE_TEXT3

Top

schemas/greyseal/v1/role.proto

Role

Role is a reusable named system prompt that can be assigned to a conversation to shape how the chatbot responds. Leaving role_uuid blank on a conversation means no system prompt is applied.

FieldTypeLabelDescription
uuidstring
namestring
system_promptstring
created_atgoogle.protobuf.Timestamp

Top

schemas/greyseal/v1/services/conversation.proto

ChatRequest

FieldTypeLabelDescription
conversation_uuidstring
contentstring

ChatResponse

ChatResponse is streamed; each message carries one token or chunk of content. The final message in the stream includes the fully-populated Message with resource references and uuid set.

FieldTypeLabelDescription
tokenstring
final_messageschemas.greyseal.v1.Messagefinal_message is populated only on the last streamed response.

CreateConversationRequest

FieldTypeLabelDescription
titlestringtitle is optional; left blank it can be auto-generated after the first exchange.
role_uuidstringrole_uuid optionally assigns a Role system prompt to this conversation.
resource_uuidsstringrepeatedresource_uuids optionally scopes retrieval to specific resources.

CreateConversationResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.Conversation

DeleteConversationRequest

FieldTypeLabelDescription
uuidstring

DeleteConversationResponse

GetConversationRequest

FieldTypeLabelDescription
uuidstring

GetConversationResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.Conversation

ListConversationsRequest

FieldTypeLabelDescription
countint32optional
cursorstringoptional

ListConversationsResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.ConversationrepeatedReturns conversations without their messages for efficiency.
cursorstring
countint32

SubmitFeedbackRequest

FieldTypeLabelDescription
message_uuidstring
feedbackint32feedback: -1 negative, 0 neutral, 1 positive.

SubmitFeedbackResponse

UpdateConversationRequest

FieldTypeLabelDescription
uuidstring
titlestringoptionalFields that can be mutated after creation.
role_uuidstringoptional
resource_uuidsstringrepeated

UpdateConversationResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.Conversation

ConversationService

Method NameRequest TypeResponse TypeDescription
CreateConversationCreateConversationRequestCreateConversationResponse
GetConversationGetConversationRequestGetConversationResponse
ListConversationsListConversationsRequestListConversationsResponse
UpdateConversationUpdateConversationRequestUpdateConversationResponse
DeleteConversationDeleteConversationRequestDeleteConversationResponse
ChatChatRequestChatResponse streamChat sends a user message and streams back the assistant response token by token.
SubmitFeedbackSubmitFeedbackRequestSubmitFeedbackResponseSubmitFeedback records user feedback on an assistant message.

Top

schemas/greyseal/v1/services/resource.proto

DeleteResourceRequest

FieldTypeLabelDescription
uuidstring

DeleteResourceResponse

GetResourceRequest

FieldTypeLabelDescription
uuidstring

GetResourceResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.Resource

IngestResourceRequest

FieldTypeLabelDescription
dataschemas.greyseal.v1.Resource

IngestResourceResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.Resource

ListResourcesRequest

FieldTypeLabelDescription
countint32optional
cursorstringoptional

ListResourcesResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.Resourcerepeated
cursorstring
countint32

ResourceService

Method NameRequest TypeResponse TypeDescription
IngestResourceIngestResourceRequestIngestResourceResponseIngestResource ingests a magpie resource, chunks it, and stores embeddings.
GetResourceGetResourceRequestGetResourceResponse
ListResourcesListResourcesRequestListResourcesResponse
DeleteResourceDeleteResourceRequestDeleteResourceResponse

Top

schemas/greyseal/v1/services/role.proto

CreateRoleRequest

FieldTypeLabelDescription
dataschemas.greyseal.v1.Role

CreateRoleResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.Role

DeleteRoleRequest

FieldTypeLabelDescription
uuidstring

DeleteRoleResponse

GetRoleRequest

FieldTypeLabelDescription
uuidstring

GetRoleResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.Role

ListRolesRequest

FieldTypeLabelDescription
countint32optional
cursorstringoptional

ListRolesResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.Rolerepeated
cursorstring
countint32

UpdateRoleRequest

FieldTypeLabelDescription
uuidstring
dataschemas.greyseal.v1.Role

UpdateRoleResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.Role

RoleService

Method NameRequest TypeResponse TypeDescription
CreateRoleCreateRoleRequestCreateRoleResponse
GetRoleGetRoleRequestGetRoleResponse
ListRolesListRolesRequestListRolesResponse
UpdateRoleUpdateRoleRequestUpdateRoleResponse
DeleteRoleDeleteRoleRequestDeleteRoleResponse

Scalar Value Types

.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)