API Reference

Protocol Documentation

Table of Contents

Top

schemas/greyseal/v1/agent.proto

AgentRun

AgentRun is the persisted state of one agentic coding-task run.

FieldTypeLabelDescription
uuidstring
providerstringprovider: "claude" (Managed Agents) โ€” the only implemented value in Phase 1. "ollama:<model>" is a reserved, not-yet-implemented value.
repo_urlstring
statusstringstatus: "running"
session_idstringsession_id is the provider's session identifier โ€” for Claude this is a Managed Agents session ID, usable to build a Console trace-view link.
pr_urlstringpr_url is populated once the agent opens a pull request, if it does.
errorstringerror holds a human-readable failure reason when status is "error".
created_atgoogle.protobuf.Timestamp
updated_atgoogle.protobuf.Timestamp

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/agent.proto

AgentRunEvent

AgentRunEvent is one relayed event from a running agent session.

FieldTypeLabelDescription
typestringtype: the provider event type, e.g. "agent.message", "agent.tool_use", "session.status_idle", "session.status_terminated".
messagestringmessage is human-readable text for message/tool-use events.
statusstringstatus is populated on status-change events: "running"

GetAgentRunRequest

FieldTypeLabelDescription
uuidstring

GetAgentRunResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.AgentRun

RunAgentTaskRequest

FieldTypeLabelDescription
providerstringprovider: "claude" (only implemented value); "ollama:<model>" reserved.
repo_urlstring
github_tokenstringgithub_token authorizes cloning (and, for Claude, opening a PR against) repo_url. Never persisted โ€” used only to start the provider session.
branchstringbranch to check out; defaults to the repository's default branch.
task_descriptionstringtask_description is what the agent should do.
rubricstringrubric is the grading criteria for the provider's outcome-graded loop, e.g. "go build ./… succeeds, go test ./… passes, no TODO(agent) markers remain".

RunAgentTaskResponse

FieldTypeLabelDescription
dataschemas.greyseal.v1.AgentRun

StreamAgentRunRequest

FieldTypeLabelDescription
uuidstring

AgentService

Method NameRequest TypeResponse TypeDescription
RunAgentTaskRunAgentTaskRequestRunAgentTaskResponseRunAgentTask starts a new agentic coding-task run and returns immediately with its initial state; the run continues asynchronously on the provider's side.
GetAgentRunGetAgentRunRequestGetAgentRunResponseGetAgentRun returns the current state of a previously started run.
StreamAgentRunStreamAgentRunRequestAgentRunEvent streamStreamAgentRun streams events for a run as they occur, until the run reaches a terminal status.

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)