Documentation
¶
Index ¶
- type AgentState
- func (s *AgentState) CompleteTask()
- func (s *AgentState) Get() State
- func (s *AgentState) GetCurrentTask() string
- func (s *AgentState) GetStatus() string
- func (s *AgentState) GetTaskDuration() time.Duration
- func (s *AgentState) IsAvailable() bool
- func (s *AgentState) IsWorking() bool
- func (s *AgentState) StartTask(description string)
- type ChatRequest
- type ChatResponse
- type Pool
- type State
- type TaskRequest
- type TaskResponse
- type Worker
- func (w *Worker) Name() string
- func (w *Worker) SendChat(input string, response chan<- ChatResponse)
- func (w *Worker) SendTask(description, prompt string, response chan<- TaskResponse)
- func (w *Worker) SetPromptBuilder(fn func(agentName, input string) string)
- func (w *Worker) Start()
- func (w *Worker) State() *AgentState
- func (w *Worker) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentState ¶
type AgentState struct {
// contains filtered or unexported fields
}
AgentState holds the current state of an agent
func (*AgentState) CompleteTask ¶
func (s *AgentState) CompleteTask()
CompleteTask transitions to available state
func (*AgentState) GetCurrentTask ¶
func (s *AgentState) GetCurrentTask() string
GetCurrentTask returns the current task description
func (*AgentState) GetStatus ¶
func (s *AgentState) GetStatus() string
GetStatus returns a human-readable status message
func (*AgentState) GetTaskDuration ¶
func (s *AgentState) GetTaskDuration() time.Duration
GetTaskDuration returns how long the current task has been running
func (*AgentState) IsAvailable ¶
func (s *AgentState) IsAvailable() bool
IsAvailable returns true if the agent is available
func (*AgentState) IsWorking ¶
func (s *AgentState) IsWorking() bool
IsWorking returns true if the agent is currently working
func (*AgentState) StartTask ¶
func (s *AgentState) StartTask(description string)
StartTask transitions to working state
type ChatRequest ¶
type ChatRequest struct {
Input string
Response chan<- ChatResponse
}
ChatRequest represents a chat/conversation request
type ChatResponse ¶
ChatResponse is the response to a chat request
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool manages multiple workers
type TaskRequest ¶
type TaskRequest struct {
Description string
Prompt string
Response chan<- TaskResponse
}
TaskRequest represents a work task request
type TaskResponse ¶
TaskResponse is the response to a task request
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker manages an agent's chat and task goroutines
func (*Worker) SendChat ¶
func (w *Worker) SendChat(input string, response chan<- ChatResponse)
SendChat sends a chat request and returns immediately The response will be sent to the provided channel
func (*Worker) SendTask ¶
func (w *Worker) SendTask(description, prompt string, response chan<- TaskResponse)
SendTask sends a task request and returns immediately
func (*Worker) SetPromptBuilder ¶
SetPromptBuilder sets the callback for building prompts