Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conflict ¶
type Conflict struct {
ID string
Type ConflictType
Description string
InvolvedAgents []string // List of agent IDs
RelatedTaskID string
StartTime time.Time
ResolutionTime *time.Time
Status string
Resolution ResolutionStrategy
Context map[string]interface{}
ResolutionNotes string
}
Conflict represents a conflict between agents
type ConflictType ¶
type ConflictType string
ConflictType represents different types of conflicts that can occur
const ( // TaskExecutionConflict occurs when agents disagree on task execution approach TaskExecutionConflict ConflictType = "task_execution" // ResourceConflict occurs when multiple agents compete for resources ResourceConflict ConflictType = "resource" // PriorityConflict occurs when there's disagreement about task priorities PriorityConflict ConflictType = "priority" // CapabilityConflict occurs when there's disagreement about agent capabilities CapabilityConflict ConflictType = "capability" // DecisionConflict occurs when agents disagree on decisions DecisionConflict ConflictType = "decision" )
type Function ¶
type Function struct {
Name string `json:"name"`
Description string `json:"description"`
Parameters map[string]ParameterDefinition `json:"parameters"`
Required []string `json:"required,omitempty"`
}
Function represents a callable function definition for LLM function calling
type FunctionCall ¶
FunctionCall represents a function call in the conversation
type FunctionDefinition ¶
FunctionDefinition represents an OpenAI function definition
type ImageContent ¶
ImageContent represents an image in the conversation
type ParameterDefinition ¶
type ParameterDefinition struct {
Type string `json:"type"`
Description string `json:"description"`
Required bool `json:"required"`
Enum []string `json:"enum,omitempty"`
}
ParameterDefinition defines a parameter for function calling
type ResolutionStrategy ¶
type ResolutionStrategy string
ResolutionStrategy defines how to resolve a conflict
const ( // ConsensusResolution uses voting to reach agreement ConsensusResolution ResolutionStrategy = "consensus" // HierarchicalResolution escalates to manager for decision HierarchicalResolution ResolutionStrategy = "hierarchical" // MediationResolution uses a third-party agent to mediate MediationResolution ResolutionStrategy = "mediation" // CompromiseResolution attempts to find middle ground CompromiseResolution ResolutionStrategy = "compromise" // FallbackResolution uses predefined fallback approach FallbackResolution ResolutionStrategy = "fallback" )
type TaskOutput ¶
type TaskOutput struct {
TaskID string
Description string
Status tasks.TaskStatus
Result string
Context map[string]interface{}
Metadata map[string]interface{}
StartedAt *time.Time
CompletedAt *time.Time
Error string
}
TaskOutput represents the complete output of a task execution
type TaskProgress ¶
type TaskProgress struct {
TaskID string
AgentID string
Status tasks.TaskStatus
Progress float64
Messages []string
StartTime time.Time
EndTime *time.Time
Requirements *TaskRequirements
}
TaskProgress tracks the progress of a task
type TaskRequirements ¶
type TaskRequirements struct {
Required map[string]int
Optional map[string]int
Priority int
Deadline *time.Time
}
TaskRequirements defines what capabilities are needed for a task
func NewTaskRequirements ¶
func NewTaskRequirements() *TaskRequirements
NewTaskRequirements creates a new task requirements instance