package agent import "time" type Message struct { Role string `json:"role"` Content *string `json:"content"` ToolCalls []ToolCall `json:"tool_calls,omitempty"` ToolCallID string `json:"tool_call_id,omitempty"` } type ToolCall struct { ID string `json:"id"` Type string `json:"type"` Function ToolFunctionCall `json:"function"` } type ToolFunctionCall struct { Name string `json:"name"` Arguments string `json:"arguments"` } type Session struct { ID string `json:"id"` Title string `json:"title"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Messages []Message `json:"messages"` } type SessionSummary struct { ID string `json:"id"` Title string `json:"title"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` MessageCount int `json:"message_count"` Preview string `json:"preview"` } type ToolDefinition struct { Type string `json:"type"` Function ToolDefinitionFunction `json:"function"` } type ToolDefinitionFunction struct { Name string `json:"name"` Description string `json:"description"` Parameters map[string]any `json:"parameters"` } type ToolResult struct { Success bool `json:"success"` Output string `json:"output"` } type Usage struct { PromptTokens int `json:"prompt_tokens,omitempty"` CompletionTokens int `json:"completion_tokens,omitempty"` TotalTokens int `json:"total_tokens,omitempty"` }