agents

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSAgent

type AWSAgent struct {
	*BaseAgent
}

AWSAgent specializes in AWS-related queries

func (*AWSAgent) GetCapabilities

func (a *AWSAgent) GetCapabilities() []string

GetCapabilities returns the capabilities of the AWS agent

func (*AWSAgent) GetModel

func (a *AWSAgent) GetModel() string

GetModel returns the AI model being used

func (*AWSAgent) GetType

func (a *AWSAgent) GetType() string

GetType returns the agent type

func (*AWSAgent) ProcessQuery

func (a *AWSAgent) ProcessQuery(query string) (*Response, error)

ProcessQuery processes a query for the AWS agent

type Action

type Action struct {
	Type        string                 `json:"type"`
	Description string                 `json:"description"`
	Command     string                 `json:"command"`
	Parameters  map[string]interface{} `json:"parameters"`
	Risk        string                 `json:"risk"`
}

Action represents an actionable item from the AI response

type Agent

type Agent interface {
	GetName() string
	GetType() string
	Query(ctx context.Context, query *Query) (*Response, error)
	GetCapabilities() []string
	GetStatus() *AgentStatus
	GetConfiguration() *AgentConfig
	UpdateConfiguration(config *AgentConfig) error
	Start() error
	Stop() error
	IsHealthy() bool
}

Agent represents an AI agent interface

func NewAgent

func NewAgent(cfg config.Agent) (Agent, error)

NewAgent creates a new agent based on the configuration

type AgentConfig

type AgentConfig struct {
	Model       string  `json:"model"`
	MaxTokens   int     `json:"max_tokens"`
	Temperature float64 `json:"temperature"`
	APIKey      string  `json:"api_key"`
	Endpoint    string  `json:"endpoint"`
}

AgentConfig represents the configuration of an AI agent

type AgentManager

type AgentManager struct {
	// contains filtered or unexported fields
}

AgentManager manages multiple AI agents

func NewAgentManager

func NewAgentManager() *AgentManager

NewAgentManager creates a new agent manager

func (*AgentManager) AddAgent

func (m *AgentManager) AddAgent(agent Agent) error

AddAgent adds an agent to the manager

func (*AgentManager) GetAgent

func (m *AgentManager) GetAgent(name string) (Agent, error)

GetAgent retrieves an agent by name

func (*AgentManager) ListAgents

func (m *AgentManager) ListAgents() []Agent

ListAgents returns a list of all agents

func (*AgentManager) ProcessQuery

func (m *AgentManager) ProcessQuery(ctx context.Context, queryText string) (string, error)

ProcessQuery processes a query using available agents

func (*AgentManager) RemoveAgent

func (m *AgentManager) RemoveAgent(name string) error

RemoveAgent removes an agent from the manager

type AgentStatus

type AgentStatus struct {
	State        string        `json:"state"`
	LastActivity time.Time     `json:"last_activity"`
	Health       string        `json:"health"`
	Uptime       time.Duration `json:"uptime"`
}

AgentStatus represents the status of an AI agent

type AzureAgent

type AzureAgent struct {
	*BaseAgent
}

AzureAgent specializes in Azure-related queries

func (*AzureAgent) GetCapabilities

func (az *AzureAgent) GetCapabilities() []string

GetCapabilities returns the capabilities of the Azure agent

func (*AzureAgent) GetModel

func (az *AzureAgent) GetModel() string

GetModel returns the AI model being used

func (*AzureAgent) GetType

func (az *AzureAgent) GetType() string

GetType returns the agent type

func (*AzureAgent) ProcessQuery

func (az *AzureAgent) ProcessQuery(query string) (*Response, error)

ProcessQuery processes a query for the Azure agent

type BaseAgent

type BaseAgent struct {
	// contains filtered or unexported fields
}

BaseAgent provides common functionality for all agents

func (*BaseAgent) GetCapabilities

func (b *BaseAgent) GetCapabilities() []string

GetCapabilities returns the agent capabilities

func (*BaseAgent) GetConfiguration

func (b *BaseAgent) GetConfiguration() *AgentConfig

GetConfiguration returns the agent configuration

func (*BaseAgent) GetName

func (b *BaseAgent) GetName() string

GetName returns the agent name

func (*BaseAgent) GetStatus

func (b *BaseAgent) GetStatus() *AgentStatus

GetStatus returns the agent status

func (*BaseAgent) GetType

func (b *BaseAgent) GetType() string

GetType returns the agent type

func (*BaseAgent) IsHealthy

func (b *BaseAgent) IsHealthy() bool

IsHealthy returns whether the agent is healthy

func (*BaseAgent) Query

func (b *BaseAgent) Query(ctx context.Context, query *Query) (*Response, error)

Query processes a query and returns a response

func (*BaseAgent) Start

func (b *BaseAgent) Start() error

Start starts the agent

func (*BaseAgent) Stop

func (b *BaseAgent) Stop() error

Stop stops the agent

func (*BaseAgent) UpdateConfiguration

func (b *BaseAgent) UpdateConfiguration(config *AgentConfig) error

UpdateConfiguration updates the agent configuration

type GCPAgent

type GCPAgent struct {
	*BaseAgent
}

GCPAgent specializes in GCP-related queries

func (*GCPAgent) GetCapabilities

func (g *GCPAgent) GetCapabilities() []string

GetCapabilities returns the capabilities of the GCP agent

func (*GCPAgent) GetModel

func (g *GCPAgent) GetModel() string

GetModel returns the AI model being used

func (*GCPAgent) GetType

func (g *GCPAgent) GetType() string

GetType returns the agent type

func (*GCPAgent) ProcessQuery

func (g *GCPAgent) ProcessQuery(query string) (*Response, error)

ProcessQuery processes a query for the GCP agent

type GeneralAgent

type GeneralAgent struct {
	*BaseAgent
}

GeneralAgent handles general IT infrastructure questions

func (*GeneralAgent) GetCapabilities

func (g *GeneralAgent) GetCapabilities() []string

GetCapabilities returns the capabilities of the general agent

func (*GeneralAgent) GetModel

func (g *GeneralAgent) GetModel() string

GetModel returns the AI model being used

func (*GeneralAgent) GetType

func (g *GeneralAgent) GetType() string

GetType returns the agent type

func (*GeneralAgent) ProcessQuery

func (g *GeneralAgent) ProcessQuery(query string) (*Response, error)

ProcessQuery processes a query for the general agent

type KubernetesAgent

type KubernetesAgent struct {
	*BaseAgent
}

KubernetesAgent specializes in Kubernetes-related queries

func (*KubernetesAgent) GetCapabilities

func (k *KubernetesAgent) GetCapabilities() []string

GetCapabilities returns the capabilities of the Kubernetes agent

func (*KubernetesAgent) GetModel

func (k *KubernetesAgent) GetModel() string

GetModel returns the AI model being used

func (*KubernetesAgent) GetType

func (k *KubernetesAgent) GetType() string

GetType returns the agent type

func (*KubernetesAgent) ProcessQuery

func (k *KubernetesAgent) ProcessQuery(query string) (*Response, error)

ProcessQuery processes a query for the Kubernetes agent

type MonitoringAgent

type MonitoringAgent struct {
	*BaseAgent
}

MonitoringAgent specializes in monitoring and observability

func (*MonitoringAgent) GetCapabilities

func (m *MonitoringAgent) GetCapabilities() []string

GetCapabilities returns the capabilities of the monitoring agent

func (*MonitoringAgent) GetModel

func (m *MonitoringAgent) GetModel() string

GetModel returns the AI model being used

func (*MonitoringAgent) GetType

func (m *MonitoringAgent) GetType() string

GetType returns the agent type

func (*MonitoringAgent) ProcessQuery

func (m *MonitoringAgent) ProcessQuery(query string) (*Response, error)

ProcessQuery processes a query for the monitoring agent

type OpenAIAgent

type OpenAIAgent struct {
	*BaseAgent
	// contains filtered or unexported fields
}

OpenAIAgent implements the Agent interface using OpenAI's GPT models

func NewOpenAIAgent

func NewOpenAIAgent(cfg config.Agent, agentType string) (*OpenAIAgent, error)

NewOpenAIAgent creates a new OpenAI-powered agent

func (*OpenAIAgent) GetCapabilities

func (o *OpenAIAgent) GetCapabilities() []string

GetCapabilities returns the capabilities of the OpenAI agent

func (*OpenAIAgent) GetType

func (o *OpenAIAgent) GetType() string

GetType returns the agent type

func (*OpenAIAgent) Query

func (o *OpenAIAgent) Query(ctx context.Context, query *Query) (*Response, error)

Query processes a query using OpenAI's GPT model

type Query

type Query struct {
	Text    string                 `json:"text"`
	Context map[string]interface{} `json:"context"`
}

Query represents a query to an AI agent

type Response

type Response struct {
	Text        string                 `json:"text"`
	Content     string                 `json:"content"`
	Type        string                 `json:"type"`
	Confidence  float64                `json:"confidence"`
	Metadata    map[string]interface{} `json:"metadata"`
	Suggestions []string               `json:"suggestions"`
	Actions     []Action               `json:"actions"`
	Timestamp   time.Time              `json:"timestamp"`
}

Response represents an AI agent response

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL