Ryanhub - file viewer
filename: agent/event.go
branch: main
back to repo
package agent

// Event is streamed to the UI (SSE) while a run is in progress.
type Event struct {
	Type string `json:"type"`
	// phase | llm_request | llm_reply | tool_call | tool_result | final | error

	Round      int    `json:"round"`
	Tool       string `json:"tool,omitempty"`
	Args       string `json:"args,omitempty"`
	Preview    string `json:"preview,omitempty"`
	Detail     string `json:"detail,omitempty"`
	Text       string `json:"text,omitempty"`
	Message    string `json:"message,omitempty"`
	OK         bool   `json:"ok,omitempty"`
	ToolCalls  int    `json:"tool_calls,omitempty"`
	HasContent bool   `json:"has_content,omitempty"`
}