agent

package
v0.0.0-...-b2f81be Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package agent provides intelligent agent implementations for building AI-powered workflows.

The agent package implements various types of AI agents that can interact with Large Language Models (LLMs), use tools, and execute complex reasoning patterns. This package is designed to support multiple agent architectures including chat agents, ReAct (Reasoning and Acting) agents, and tool-using agents.

Agent Types

The package supports several agent types:

  • Chat Agent: Simple conversational agent for basic interactions
  • ReAct Agent: Implements the ReAct pattern for reasoning and acting
  • Tool Agent: Specialized agent that can use external tools
  • Custom Agent: Extensible agent type for custom implementations

Basic Usage

Creating a simple chat agent:

config := agent.Config{
	Name:        "ChatBot",
	Type:        "chat",
	Description: "A helpful chatbot",
	MaxSteps:    5,
	Temperature: 0.7,
}

agent, err := agent.NewAgent(config)
if err != nil {
	log.Fatal(err)
}

// Set LLM provider
provider, _ := llm.NewOpenAIProvider(llm.OpenAIConfig{
	APIKey: "your-api-key",
	Model:  "gpt-3.5-turbo",
})
agent.SetLLMProvider(provider)

// Execute the agent
ctx := context.Background()
state := core.NewBaseState()
state.Set("input", "Hello, how are you?")

result, err := agent.Execute(ctx, state)
if err != nil {
	log.Fatal(err)
}

fmt.Println(result.Get("response"))

ReAct Pattern

The ReAct (Reasoning and Acting) pattern allows agents to alternate between reasoning about a problem and taking actions to solve it:

config := agent.Config{
	Name:        "ReActAgent",
	Type:        "react",
	Description: "An agent that can reason and act",
	MaxSteps:    10,
	Temperature: 0.3,
}

agent, err := agent.NewAgent(config)
if err != nil {
	log.Fatal(err)
}

// Add tools for the agent to use
toolRegistry := tools.NewToolRegistry()
toolRegistry.Register("calculator", tools.NewCalculatorTool())
toolRegistry.Register("search", tools.NewWebSearchTool())
agent.SetToolRegistry(toolRegistry)

Tool Integration

Agents can use external tools to extend their capabilities:

// Create a tool-using agent
config := agent.Config{
	Name: "ToolAgent",
	Type: "tool",
}

agent, err := agent.NewAgent(config)
if err != nil {
	log.Fatal(err)
}

// Register tools
toolRegistry := tools.NewToolRegistry()
toolRegistry.Register("file_read", tools.NewFileReadTool())
toolRegistry.Register("http_request", tools.NewHTTPTool())
agent.SetToolRegistry(toolRegistry)

Multi-Agent Coordination

The package supports multi-agent systems where agents can coordinate and collaborate:

coordinator := agent.NewMultiAgentCoordinator()

// Add agents to the coordinator
coordinator.AddAgent("researcher", researchAgent)
coordinator.AddAgent("writer", writerAgent)
coordinator.AddAgent("reviewer", reviewAgent)

// Execute coordinated workflow
result, err := coordinator.Execute(ctx, task)

Configuration Options

Agents can be configured with various options:

  • Name: Human-readable name for the agent
  • Type: Agent type (chat, react, tool, custom)
  • Description: Description of the agent's purpose
  • MaxSteps: Maximum number of execution steps
  • Temperature: LLM temperature for response generation
  • SystemPrompt: System prompt for the agent
  • Tools: List of available tools
  • Memory: Memory configuration for conversation history

Error Handling

The package provides comprehensive error handling:

result, err := agent.Execute(ctx, state)
if err != nil {
	switch {
	case errors.Is(err, agent.ErrMaxStepsExceeded):
		// Handle max steps exceeded
	case errors.Is(err, agent.ErrInvalidInput):
		// Handle invalid input
	case errors.Is(err, agent.ErrLLMProviderNotSet):
		// Handle missing LLM provider
	default:
		// Handle other errors
	}
}

Performance Considerations

For optimal performance:

  • Reuse agent instances when possible
  • Set appropriate MaxSteps to prevent infinite loops
  • Use connection pooling for LLM providers
  • Implement proper context cancellation
  • Monitor memory usage in long-running agents

Thread Safety

Agent instances are thread-safe and can be used concurrently. However, individual execution contexts should not be shared between goroutines.

Integration with Core Package

The agent package is tightly integrated with the core package for graph-based workflows:

// Use agent as a node in a graph
graph := core.NewGraph()
graph.AddNode("agent_node", func(ctx context.Context, state core.State) (core.State, error) {
	return agent.Execute(ctx, state)
})

For more examples and detailed usage, see the examples directory and the comprehensive test suite in agent_test.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAgent

func RegisterAgent(id string, definition AgentDefinition) error

RegisterAgent registers an agent definition globally

func RegisterAgentFactory

func RegisterAgentFactory(id string, factory AgentFactory) error

RegisterAgentFactory registers an agent factory globally

Types

type AdvancedAgentDefinition

type AdvancedAgentDefinition struct {
	*BaseAgentDefinition
	// contains filtered or unexported fields
}

AdvancedAgentDefinition provides additional customization capabilities

func NewAdvancedAgentDefinition

func NewAdvancedAgentDefinition(config *AgentConfig) *AdvancedAgentDefinition

NewAdvancedAgentDefinition creates a new advanced agent definition

func (*AdvancedAgentDefinition) BuildGraph

func (aad *AdvancedAgentDefinition) BuildGraph() (*core.Graph, error)

BuildGraph builds the custom graph

func (*AdvancedAgentDefinition) CreateAgent

func (aad *AdvancedAgentDefinition) CreateAgent() (*Agent, error)

CreateAgent creates an advanced agent with custom components

func (*AdvancedAgentDefinition) GetCustomMiddleware

func (aad *AdvancedAgentDefinition) GetCustomMiddleware() []func(next func(*core.BaseState) (*core.BaseState, error)) func(*core.BaseState) (*core.BaseState, error)

GetCustomMiddleware returns custom middleware

func (*AdvancedAgentDefinition) GetCustomTools

func (aad *AdvancedAgentDefinition) GetCustomTools() []tools.Tool

GetCustomTools returns custom tools

func (*AdvancedAgentDefinition) WithCustomGraph

func (aad *AdvancedAgentDefinition) WithCustomGraph(graph *core.Graph) *AdvancedAgentDefinition

WithCustomGraph sets a custom graph

func (*AdvancedAgentDefinition) WithCustomMiddleware

func (aad *AdvancedAgentDefinition) WithCustomMiddleware(middleware ...func(next func(*core.BaseState) (*core.BaseState, error)) func(*core.BaseState) (*core.BaseState, error)) *AdvancedAgentDefinition

WithCustomMiddleware adds custom middleware

func (*AdvancedAgentDefinition) WithCustomTools

func (aad *AdvancedAgentDefinition) WithCustomTools(tools ...tools.Tool) *AdvancedAgentDefinition

WithCustomTools adds custom tools

func (*AdvancedAgentDefinition) WithGraphBuilder

func (aad *AdvancedAgentDefinition) WithGraphBuilder(builder func() (*core.Graph, error)) *AdvancedAgentDefinition

WithGraphBuilder sets a custom graph builder function

func (*AdvancedAgentDefinition) WithMiddlewareProvider

func (aad *AdvancedAgentDefinition) WithMiddlewareProvider(provider func() []func(next func(*core.BaseState) (*core.BaseState, error)) func(*core.BaseState) (*core.BaseState, error)) *AdvancedAgentDefinition

WithMiddlewareProvider sets a custom middleware provider function

func (*AdvancedAgentDefinition) WithToolsProvider

func (aad *AdvancedAgentDefinition) WithToolsProvider(provider func() []tools.Tool) *AdvancedAgentDefinition

WithToolsProvider sets a custom tools provider function

type Agent

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

Agent represents an AI agent

func NewAgent

func NewAgent(config *AgentConfig, llmManager *llm.ProviderManager, toolRegistry *tools.ToolRegistry) *Agent

NewAgent creates a new agent

func (*Agent) ClearConversation

func (a *Agent) ClearConversation()

ClearConversation clears the conversation history

func (*Agent) DisableStreaming

func (a *Agent) DisableStreaming() error

DisableStreaming disables streaming mode for the agent

func (*Agent) EnableStreaming

func (a *Agent) EnableStreaming() error

EnableStreaming enables streaming mode for the agent

func (*Agent) Execute

func (a *Agent) Execute(ctx context.Context, input string) (*AgentExecution, error)

Execute executes the agent with the given input

func (*Agent) GetConfig

func (a *Agent) GetConfig() *AgentConfig

GetConfig returns the agent configuration

func (*Agent) GetConversation

func (a *Agent) GetConversation() []llm.Message

GetConversation returns the conversation history

func (*Agent) GetExecutionHistory

func (a *Agent) GetExecutionHistory() []AgentExecution

GetExecutionHistory returns the execution history

func (*Agent) GetGraph

func (a *Agent) GetGraph() *core.Graph

GetGraph returns the agent's execution graph

func (*Agent) GetStreamingMode

func (a *Agent) GetStreamingMode() llm.StreamMode

GetStreamingMode returns the current streaming mode

func (*Agent) IsRunning

func (a *Agent) IsRunning() bool

IsRunning returns whether the agent is currently running

func (*Agent) IsStreamingEnabled

func (a *Agent) IsStreamingEnabled() bool

IsStreamingEnabled returns whether streaming is enabled

func (*Agent) SetGraph

func (a *Agent) SetGraph(graph *core.Graph)

SetGraph sets the agent's execution graph

func (*Agent) SetStreamingMode

func (a *Agent) SetStreamingMode(mode llm.StreamMode) error

SetStreamingMode sets the streaming mode for the agent

func (*Agent) UpdateConfig

func (a *Agent) UpdateConfig(config *AgentConfig)

UpdateConfig updates the agent configuration

type AgentConfig

type AgentConfig struct {
	ID              string                 `json:"id"`
	Name            string                 `json:"name"`
	Type            AgentType              `json:"type"`
	Model           string                 `json:"model"`
	Provider        string                 `json:"provider"`
	SystemPrompt    string                 `json:"system_prompt"`
	Temperature     float64                `json:"temperature"`
	MaxTokens       int                    `json:"max_tokens"`
	MaxIterations   int                    `json:"max_iterations"`
	Tools           []string               `json:"tools"`
	EnableStreaming bool                   `json:"enable_streaming"`
	StreamingMode   llm.StreamMode         `json:"streaming_mode,omitempty"`
	Timeout         time.Duration          `json:"timeout"`
	Metadata        map[string]interface{} `json:"metadata"`
}

AgentConfig represents agent configuration

func DefaultAgentConfig

func DefaultAgentConfig() *AgentConfig

DefaultAgentConfig returns default agent configuration

func (*AgentConfig) Validate

func (config *AgentConfig) Validate() error

Validate validates the agent configuration

func (*AgentConfig) ValidateAndSanitize

func (config *AgentConfig) ValidateAndSanitize() error

ValidateAndSanitize validates the agent configuration and sanitizes problematic values

type AgentDefinition

type AgentDefinition interface {
	// GetConfig returns the base configuration for the agent
	GetConfig() *AgentConfig

	// Initialize sets up the agent with the provided managers
	Initialize(llmManager *llm.ProviderManager, toolRegistry *tools.ToolRegistry) error

	// CreateAgent creates and returns the configured agent instance
	CreateAgent() (*Agent, error)

	// GetMetadata returns additional metadata about the agent
	GetMetadata() map[string]interface{}

	// Validate validates the agent definition
	Validate() error
}

AgentDefinition represents a programmatic agent definition

type AgentDefinitionBuilder

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

AgentDefinitionBuilder provides a fluent interface for building agent definitions

func NewAgentDefinitionBuilder

func NewAgentDefinitionBuilder() *AgentDefinitionBuilder

NewAgentDefinitionBuilder creates a new agent definition builder

func (*AgentDefinitionBuilder) Build

Build creates the agent definition

func (*AgentDefinitionBuilder) WithMaxTokens

func (adb *AgentDefinitionBuilder) WithMaxTokens(maxTokens int) *AgentDefinitionBuilder

WithMaxTokens sets the max tokens

func (*AgentDefinitionBuilder) WithMetadata

func (adb *AgentDefinitionBuilder) WithMetadata(key string, value interface{}) *AgentDefinitionBuilder

WithMetadata sets metadata

func (*AgentDefinitionBuilder) WithModel

func (adb *AgentDefinitionBuilder) WithModel(model string) *AgentDefinitionBuilder

WithModel sets the LLM model

func (*AgentDefinitionBuilder) WithName

WithName sets the agent name

func (*AgentDefinitionBuilder) WithProvider

func (adb *AgentDefinitionBuilder) WithProvider(provider string) *AgentDefinitionBuilder

WithProvider sets the LLM provider

func (*AgentDefinitionBuilder) WithSystemPrompt

func (adb *AgentDefinitionBuilder) WithSystemPrompt(prompt string) *AgentDefinitionBuilder

WithSystemPrompt sets the system prompt

func (*AgentDefinitionBuilder) WithTemperature

func (adb *AgentDefinitionBuilder) WithTemperature(temperature float64) *AgentDefinitionBuilder

WithTemperature sets the temperature

func (*AgentDefinitionBuilder) WithTools

func (adb *AgentDefinitionBuilder) WithTools(tools ...string) *AgentDefinitionBuilder

WithTools sets the tools

func (*AgentDefinitionBuilder) WithType

func (adb *AgentDefinitionBuilder) WithType(agentType AgentType) *AgentDefinitionBuilder

WithType sets the agent type

type AgentExecution

type AgentExecution struct {
	ID               string                 `json:"id"`
	Timestamp        time.Time              `json:"timestamp"`
	Input            string                 `json:"input"`
	Output           string                 `json:"output"`            // Legacy string output for backward compatibility
	StructuredOutput interface{}            `json:"structured_output"` // New structured JSON output
	ToolCalls        []llm.ToolCall         `json:"tool_calls"`
	Duration         time.Duration          `json:"duration"`
	Success          bool                   `json:"success"`
	Error            error                  `json:"error,omitempty"`
	Metadata         map[string]interface{} `json:"metadata"`
	ExecutionPath    []string               `json:"execution_path"`          // Track which nodes were executed
	StateChanges     []StateChange          `json:"state_changes,omitempty"` // Track state progression
}

AgentExecution represents an agent execution record

type AgentFactory

type AgentFactory func() AgentDefinition

AgentFactory is a function type for creating agent definitions

type AgentInfo

type AgentInfo struct {
	ID       string                 `json:"id"`
	Source   AgentSource            `json:"source"`
	Config   *AgentConfig           `json:"config,omitempty"`
	Metadata map[string]interface{} `json:"metadata"`
}

AgentInfo provides information about a registered agent

type AgentMetrics

type AgentMetrics struct {
	RequestCount   int64         `json:"request_count"`
	ErrorCount     int64         `json:"error_count"`
	AverageLatency time.Duration `json:"average_latency"`
	LastRequest    time.Time     `json:"last_request"`
	TotalLatency   time.Duration `json:"total_latency"`
}

AgentMetrics tracks metrics for individual agents

type AgentRegistry

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

AgentRegistry manages programmatically defined agents

func GetGlobalRegistry

func GetGlobalRegistry() *AgentRegistry

GetGlobalRegistry returns the global agent registry

func NewAgentRegistry

func NewAgentRegistry() *AgentRegistry

NewAgentRegistry creates a new agent registry

func (*AgentRegistry) CreateAgentFromDefinition

func (ar *AgentRegistry) CreateAgentFromDefinition(id string, llmManager *llm.ProviderManager, toolRegistry *tools.ToolRegistry) (*Agent, error)

CreateAgentFromDefinition creates an agent from a registered definition

func (*AgentRegistry) CreateAgentFromFactory

func (ar *AgentRegistry) CreateAgentFromFactory(id string, llmManager *llm.ProviderManager, toolRegistry *tools.ToolRegistry) (*Agent, error)

CreateAgentFromFactory creates an agent using a registered factory

func (*AgentRegistry) GetAgentInfo

func (ar *AgentRegistry) GetAgentInfo() []AgentInfo

GetAgentInfo returns information about all registered agents

func (*AgentRegistry) GetDefinition

func (ar *AgentRegistry) GetDefinition(id string) (AgentDefinition, bool)

GetDefinition retrieves an agent definition by ID

func (*AgentRegistry) GetMetadata

func (ar *AgentRegistry) GetMetadata() map[string]map[string]interface{}

GetMetadata returns metadata for all registered agents

func (*AgentRegistry) ListDefinitions

func (ar *AgentRegistry) ListDefinitions() []string

ListDefinitions returns all registered agent definition IDs

func (*AgentRegistry) ListFactories

func (ar *AgentRegistry) ListFactories() []string

ListFactories returns all registered agent factory IDs

func (*AgentRegistry) LoadFromPlugin

func (ar *AgentRegistry) LoadFromPlugin(pluginPath string) error

LoadFromPlugin loads agent definitions from a Go plugin

func (*AgentRegistry) RegisterDefinition

func (ar *AgentRegistry) RegisterDefinition(id string, definition AgentDefinition) error

RegisterDefinition registers an agent definition with a unique ID

func (*AgentRegistry) RegisterFactory

func (ar *AgentRegistry) RegisterFactory(id string, factory AgentFactory) error

RegisterFactory registers an agent factory function

type AgentSource

type AgentSource string

AgentSource represents where an agent definition comes from

const (
	SourceConfig     AgentSource = "config"
	SourceDefinition AgentSource = "definition"
	SourceFactory    AgentSource = "factory"
	SourcePlugin     AgentSource = "plugin"
)

type AgentState

type AgentState struct {
	ID           string                 `json:"id"`
	Status       string                 `json:"status"` // "starting", "running", "stopping", "stopped", "error"
	StartedAt    time.Time              `json:"started_at"`
	UpdatedAt    time.Time              `json:"updated_at"`
	RequestCount int64                  `json:"request_count"`
	ErrorCount   int64                  `json:"error_count"`
	LastRequest  time.Time              `json:"last_request"`
	LastError    string                 `json:"last_error"`
	HealthStatus string                 `json:"health_status"`
	Metadata     map[string]interface{} `json:"metadata"`
}

AgentState tracks the state of individual agents

type AgentType

type AgentType string

AgentType represents the type of agent

const (
	AgentTypeReAct AgentType = "react"
	AgentTypeChat  AgentType = "chat"
	AgentTypeTool  AgentType = "tool"
)

type AlertRule

type AlertRule struct {
	Name        string            `json:"name" yaml:"name"`
	Description string            `json:"description" yaml:"description"`
	Metric      string            `json:"metric" yaml:"metric"`
	Condition   string            `json:"condition" yaml:"condition"`
	Threshold   float64           `json:"threshold" yaml:"threshold"`
	Duration    time.Duration     `json:"duration" yaml:"duration"`
	Labels      map[string]string `json:"labels" yaml:"labels"`
	Annotations map[string]string `json:"annotations" yaml:"annotations"`
}

AlertRule defines alert rule

type AlertingConfig

type AlertingConfig struct {
	Enabled  bool            `json:"enabled" yaml:"enabled"`
	Webhooks []WebhookConfig `json:"webhooks" yaml:"webhooks"`
	Email    *EmailConfig    `json:"email" yaml:"email"`
	Slack    *SlackConfig    `json:"slack" yaml:"slack"`
	Rules    []AlertRule     `json:"rules" yaml:"rules"`
}

AlertingConfig defines alerting configuration

type AuthConfig

type AuthConfig struct {
	Type     string                 `json:"type" yaml:"type"` // "jwt", "oauth", "basic", "apikey"
	Config   map[string]interface{} `json:"config" yaml:"config"`
	Enabled  bool                   `json:"enabled" yaml:"enabled"`
	Required bool                   `json:"required" yaml:"required"`
}

AuthConfig defines authentication configuration

type AuthzConfig

type AuthzConfig struct {
	Type    string                 `json:"type" yaml:"type"` // "rbac", "acl", "policy"
	Config  map[string]interface{} `json:"config" yaml:"config"`
	Enabled bool                   `json:"enabled" yaml:"enabled"`
}

AuthzConfig defines authorization configuration

type BaseAgentDefinition

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

BaseAgentDefinition provides a base implementation of AgentDefinition

func NewBaseAgentDefinition

func NewBaseAgentDefinition(config *AgentConfig) *BaseAgentDefinition

NewBaseAgentDefinition creates a new base agent definition

func (*BaseAgentDefinition) CreateAgent

func (bad *BaseAgentDefinition) CreateAgent() (*Agent, error)

CreateAgent creates a standard agent instance

func (*BaseAgentDefinition) GetConfig

func (bad *BaseAgentDefinition) GetConfig() *AgentConfig

GetConfig returns the agent configuration

func (*BaseAgentDefinition) GetMetadata

func (bad *BaseAgentDefinition) GetMetadata() map[string]interface{}

GetMetadata returns agent metadata

func (*BaseAgentDefinition) Initialize

func (bad *BaseAgentDefinition) Initialize(llmManager *llm.ProviderManager, toolRegistry *tools.ToolRegistry) error

Initialize sets up the agent with managers

func (*BaseAgentDefinition) SetMetadata

func (bad *BaseAgentDefinition) SetMetadata(key string, value interface{})

SetMetadata sets a metadata value

func (*BaseAgentDefinition) Validate

func (bad *BaseAgentDefinition) Validate() error

Validate validates the agent definition

type CORSConfig

type CORSConfig struct {
	Enabled          bool     `json:"enabled" yaml:"enabled"`
	AllowedOrigins   []string `json:"allowed_origins" yaml:"allowed_origins"`
	AllowedMethods   []string `json:"allowed_methods" yaml:"allowed_methods"`
	AllowedHeaders   []string `json:"allowed_headers" yaml:"allowed_headers"`
	ExposedHeaders   []string `json:"exposed_headers" yaml:"exposed_headers"`
	AllowCredentials bool     `json:"allow_credentials" yaml:"allow_credentials"`
	MaxAge           int      `json:"max_age" yaml:"max_age"`
}

CORSConfig defines CORS configuration

type CacheConfig

type CacheConfig struct {
	Type       string        `json:"type" yaml:"type"`
	Host       string        `json:"host" yaml:"host"`
	Port       int           `json:"port" yaml:"port"`
	Password   string        `json:"password" yaml:"password"`
	Database   int           `json:"database" yaml:"database"`
	TTL        time.Duration `json:"ttl" yaml:"ttl"`
	MaxRetries int           `json:"max_retries" yaml:"max_retries"`
}

CacheConfig defines cache configuration

type CustomAgentDefinition

type CustomAgentDefinition interface {
	AgentDefinition

	// BuildGraph allows custom graph construction
	BuildGraph() (*core.Graph, error)

	// GetCustomTools returns custom tools specific to this agent
	GetCustomTools() []tools.Tool

	// GetCustomMiddleware returns custom middleware for this agent
	GetCustomMiddleware() []func(next func(*core.BaseState) (*core.BaseState, error)) func(*core.BaseState) (*core.BaseState, error)
}

CustomAgentDefinition allows for completely custom agent creation

type CustomMetricConfig

type CustomMetricConfig struct {
	Name        string `json:"name" yaml:"name"`
	Type        string `json:"type" yaml:"type"`
	Query       string `json:"query" yaml:"query"`
	TargetValue string `json:"target_value" yaml:"target_value"`
	Resource    string `json:"resource" yaml:"resource"`
}

CustomMetricConfig defines custom metric for scaling

type DNSConfig

type DNSConfig struct {
	Policy      string   `json:"policy" yaml:"policy"`
	Nameservers []string `json:"nameservers" yaml:"nameservers"`
	Searches    []string `json:"searches" yaml:"searches"`
	Options     []string `json:"options" yaml:"options"`
}

DNSConfig defines DNS configuration

type DatabaseConfig

type DatabaseConfig struct {
	Type         string        `json:"type" yaml:"type"`
	Host         string        `json:"host" yaml:"host"`
	Port         int           `json:"port" yaml:"port"`
	Database     string        `json:"database" yaml:"database"`
	Username     string        `json:"username" yaml:"username"`
	Password     string        `json:"password" yaml:"password"`
	SSLMode      string        `json:"ssl_mode" yaml:"ssl_mode"`
	MaxConns     int           `json:"max_conns" yaml:"max_conns"`
	MaxIdleConns int           `json:"max_idle_conns" yaml:"max_idle_conns"`
	MaxLifetime  time.Duration `json:"max_lifetime" yaml:"max_lifetime"`
}

DatabaseConfig defines database configuration

type DeploymentConfig

type DeploymentConfig struct {
	Type        string                 `json:"type" yaml:"type"` // "docker", "kubernetes", "serverless"
	Environment string                 `json:"environment" yaml:"environment"`
	Replicas    int                    `json:"replicas" yaml:"replicas"`
	Resources   *ResourceConfig        `json:"resources" yaml:"resources"`
	Networking  *NetworkingConfig      `json:"networking" yaml:"networking"`
	Scaling     *ScalingConfig         `json:"scaling" yaml:"scaling"`
	HealthCheck *HealthCheckConfig     `json:"health_check" yaml:"health_check"`
	Secrets     map[string]string      `json:"secrets" yaml:"secrets"`
	ConfigMaps  map[string]string      `json:"config_maps" yaml:"config_maps"`
	Volumes     []VolumeConfig         `json:"volumes" yaml:"volumes"`
	Metadata    map[string]interface{} `json:"metadata" yaml:"metadata"`
}

DeploymentConfig defines deployment configuration

type DeploymentState

type DeploymentState struct {
	Status      string                 `json:"status"`
	StartedAt   time.Time              `json:"started_at"`
	UpdatedAt   time.Time              `json:"updated_at"`
	AgentStates map[string]*AgentState `json:"agent_states"`
	ErrorCount  int                    `json:"error_count"`
	LastError   string                 `json:"last_error"`
	Metadata    map[string]interface{} `json:"metadata"`
}

DeploymentState tracks the deployment state of agents

type EmailConfig

type EmailConfig struct {
	SMTP     *SMTPConfig `json:"smtp" yaml:"smtp"`
	From     string      `json:"from" yaml:"from"`
	To       []string    `json:"to" yaml:"to"`
	Subject  string      `json:"subject" yaml:"subject"`
	Template string      `json:"template" yaml:"template"`
}

EmailConfig defines email configuration

type EncryptionAtRestConfig

type EncryptionAtRestConfig struct {
	Enabled   bool   `json:"enabled" yaml:"enabled"`
	Algorithm string `json:"algorithm" yaml:"algorithm"`
	KeyID     string `json:"key_id" yaml:"key_id"`
	Provider  string `json:"provider" yaml:"provider"`
}

EncryptionAtRestConfig defines encryption at rest configuration

type EncryptionConfig

type EncryptionConfig struct {
	AtRest    *EncryptionAtRestConfig    `json:"at_rest" yaml:"at_rest"`
	InTransit *EncryptionInTransitConfig `json:"in_transit" yaml:"in_transit"`
}

EncryptionConfig defines encryption configuration

type EncryptionInTransitConfig

type EncryptionInTransitConfig struct {
	Enabled  bool     `json:"enabled" yaml:"enabled"`
	MinTLS   string   `json:"min_tls" yaml:"min_tls"`
	Ciphers  []string `json:"ciphers" yaml:"ciphers"`
	CertFile string   `json:"cert_file" yaml:"cert_file"`
	KeyFile  string   `json:"key_file" yaml:"key_file"`
}

EncryptionInTransitConfig defines encryption in transit configuration

type ExtendedAgentConfig

type ExtendedAgentConfig struct {
	*AgentConfig
	Path         string             `json:"path" yaml:"path"`
	Port         int                `json:"port" yaml:"port"`
	Host         string             `json:"host" yaml:"host"`
	Subdomain    string             `json:"subdomain" yaml:"subdomain"`
	Schema       *SchemaConfig      `json:"schema" yaml:"schema"`
	Middleware   []MiddlewareConfig `json:"middleware" yaml:"middleware"`
	Resources    *ResourceConfig    `json:"resources" yaml:"resources"`
	Scaling      *ScalingConfig     `json:"scaling" yaml:"scaling"`
	Environment  map[string]string  `json:"environment" yaml:"environment"`
	Secrets      map[string]string  `json:"secrets" yaml:"secrets"`
	ConfigMaps   map[string]string  `json:"config_maps" yaml:"config_maps"`
	Volumes      []VolumeConfig     `json:"volumes" yaml:"volumes"`
	Dependencies []string           `json:"dependencies" yaml:"dependencies"`
	Priority     int                `json:"priority" yaml:"priority"`
	Labels       map[string]string  `json:"labels" yaml:"labels"`
	Annotations  map[string]string  `json:"annotations" yaml:"annotations"`
	Disabled     bool               `json:"disabled" yaml:"disabled"`
}

ExtendedAgentConfig extends AgentConfig with additional deployment-specific fields

type FileBasedAgentLoader

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

FileBasedAgentLoader loads agent definitions from Go files

func NewFileBasedAgentLoader

func NewFileBasedAgentLoader(registry *AgentRegistry) *FileBasedAgentLoader

NewFileBasedAgentLoader creates a new file-based agent loader

func (*FileBasedAgentLoader) LoadFromDirectory

func (fbal *FileBasedAgentLoader) LoadFromDirectory(directory string) error

LoadFromDirectory loads all agent definitions from a directory

type HTTPHeader

type HTTPHeader struct {
	Name  string `json:"name" yaml:"name"`
	Value string `json:"value" yaml:"value"`
}

HTTPHeader defines HTTP header for health checks

type HealthCheckConfig

type HealthCheckConfig struct {
	Enabled             bool                          `json:"enabled" yaml:"enabled"`
	Path                string                        `json:"path" yaml:"path"`
	Port                int                           `json:"port" yaml:"port"`
	InitialDelaySeconds int                           `json:"initial_delay_seconds" yaml:"initial_delay_seconds"`
	PeriodSeconds       int                           `json:"period_seconds" yaml:"period_seconds"`
	TimeoutSeconds      int                           `json:"timeout_seconds" yaml:"timeout_seconds"`
	SuccessThreshold    int                           `json:"success_threshold" yaml:"success_threshold"`
	FailureThreshold    int                           `json:"failure_threshold" yaml:"failure_threshold"`
	HTTPHeaders         []HTTPHeader                  `json:"http_headers" yaml:"http_headers"`
	AgentSpecific       map[string]*HealthCheckConfig `json:"agent_specific" yaml:"agent_specific"`
}

HealthCheckConfig defines health check configuration

type HealthChecker

type HealthChecker struct {
	AgentID          string
	Config           *HealthCheckConfig
	LastCheck        time.Time
	Status           string
	ConsecutiveFails int
	Logger           *logrus.Logger
}

HealthChecker performs health checks for agents

type IngressConfig

type IngressConfig struct {
	Enabled     bool              `json:"enabled" yaml:"enabled"`
	ClassName   string            `json:"class_name" yaml:"class_name"`
	Hosts       []string          `json:"hosts" yaml:"hosts"`
	Rules       []IngressRule     `json:"rules" yaml:"rules"`
	TLS         []IngressTLS      `json:"tls" yaml:"tls"`
	Annotations map[string]string `json:"annotations" yaml:"annotations"`
}

IngressConfig defines ingress configuration

type IngressPath

type IngressPath struct {
	Path        string `json:"path" yaml:"path"`
	PathType    string `json:"path_type" yaml:"path_type"`
	ServiceName string `json:"service_name" yaml:"service_name"`
	ServicePort int    `json:"service_port" yaml:"service_port"`
	AgentID     string `json:"agent_id" yaml:"agent_id"`
}

IngressPath defines ingress path

type IngressRule

type IngressRule struct {
	Host    string        `json:"host" yaml:"host"`
	Paths   []IngressPath `json:"paths" yaml:"paths"`
	AgentID string        `json:"agent_id" yaml:"agent_id"`
}

IngressRule defines ingress rule

type IngressTLS

type IngressTLS struct {
	Hosts      []string `json:"hosts" yaml:"hosts"`
	SecretName string   `json:"secret_name" yaml:"secret_name"`
}

IngressTLS defines TLS configuration for ingress

type LLMProviderConfig

type LLMProviderConfig struct {
	Type       string                 `json:"type" yaml:"type"`
	APIKey     string                 `json:"api_key" yaml:"api_key"`
	Endpoint   string                 `json:"endpoint" yaml:"endpoint"`
	Model      string                 `json:"model" yaml:"model"`
	Config     map[string]interface{} `json:"config" yaml:"config"`
	Timeout    time.Duration          `json:"timeout" yaml:"timeout"`
	MaxRetries int                    `json:"max_retries" yaml:"max_retries"`
}

LLMProviderConfig defines LLM provider configuration

type LoggingConfig

type LoggingConfig struct {
	Level      string            `json:"level" yaml:"level"`
	Format     string            `json:"format" yaml:"format"`
	Output     []string          `json:"output" yaml:"output"`
	Structured bool              `json:"structured" yaml:"structured"`
	Fields     map[string]string `json:"fields" yaml:"fields"`
}

LoggingConfig defines logging configuration

type MetricsConfig

type MetricsConfig struct {
	Enabled   bool   `json:"enabled" yaml:"enabled"`
	Path      string `json:"path" yaml:"path"`
	Port      int    `json:"port" yaml:"port"`
	Namespace string `json:"namespace" yaml:"namespace"`
	Subsystem string `json:"subsystem" yaml:"subsystem"`
}

MetricsConfig defines metrics configuration

type MiddlewareConfig

type MiddlewareConfig struct {
	Type    string                 `json:"type" yaml:"type"`
	Config  map[string]interface{} `json:"config" yaml:"config"`
	Enabled bool                   `json:"enabled" yaml:"enabled"`
}

MiddlewareConfig defines middleware configuration

type MiddlewareFunc

type MiddlewareFunc func(next http.Handler) http.Handler

MiddlewareFunc defines middleware function signature

type MonitoringConfig

type MonitoringConfig struct {
	Enabled  bool            `json:"enabled" yaml:"enabled"`
	Metrics  *MetricsConfig  `json:"metrics" yaml:"metrics"`
	Tracing  *TracingConfig  `json:"tracing" yaml:"tracing"`
	Alerting *AlertingConfig `json:"alerting" yaml:"alerting"`
}

MonitoringConfig defines monitoring configuration

type MultiAgentConfig

type MultiAgentConfig struct {
	Name        string                  `json:"name" yaml:"name"`
	Version     string                  `json:"version" yaml:"version"`
	Description string                  `json:"description" yaml:"description"`
	Agents      map[string]*AgentConfig `json:"agents" yaml:"agents"`
	Routing     *RoutingConfig          `json:"routing" yaml:"routing"`
	Deployment  *DeploymentConfig       `json:"deployment" yaml:"deployment"`
	Shared      *SharedConfig           `json:"shared" yaml:"shared"`
	Metadata    map[string]interface{}  `json:"metadata" yaml:"metadata"`
}

MultiAgentConfig represents a configuration for multiple agents

func DefaultMultiAgentConfig

func DefaultMultiAgentConfig() *MultiAgentConfig

DefaultMultiAgentConfig returns default multi-agent configuration

func LoadMultiAgentConfigFromFile

func LoadMultiAgentConfigFromFile(filename string) (*MultiAgentConfig, error)

LoadConfigFromFile loads multi-agent configuration from a file

func (*MultiAgentConfig) GetAgentByPath

func (mac *MultiAgentConfig) GetAgentByPath(path string) (string, bool)

GetAgentByPath returns the agent ID for a given path

func (*MultiAgentConfig) GetAgentPaths

func (mac *MultiAgentConfig) GetAgentPaths() map[string][]string

GetAgentPaths returns all paths for each agent

func (*MultiAgentConfig) GetAgentPort

func (mac *MultiAgentConfig) GetAgentPort(agentID string) int

GetAgentPort returns the port for a specific agent

func (*MultiAgentConfig) GetEnabledAgents

func (mac *MultiAgentConfig) GetEnabledAgents() map[string]*AgentConfig

GetEnabledAgents returns only enabled agents

func (*MultiAgentConfig) ListAgentIDs

func (mac *MultiAgentConfig) ListAgentIDs() []string

ListAgentIDs returns all agent IDs

func (*MultiAgentConfig) Validate

func (mac *MultiAgentConfig) Validate() error

Validate validates the multi-agent configuration

type MultiAgentCoordinator

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

MultiAgentCoordinator manages multiple agents working together

func NewMultiAgentCoordinator

func NewMultiAgentCoordinator() *MultiAgentCoordinator

NewMultiAgentCoordinator creates a new multi-agent coordinator

func (*MultiAgentCoordinator) AddAgent

func (mac *MultiAgentCoordinator) AddAgent(id string, agent *Agent)

AddAgent adds an agent to the coordinator

func (*MultiAgentCoordinator) ExecuteParallel

func (mac *MultiAgentCoordinator) ExecuteParallel(ctx context.Context, agentIDs []string, input string) (map[string]AgentExecution, error)

ExecuteParallel executes agents in parallel with the same input

func (*MultiAgentCoordinator) ExecuteSequential

func (mac *MultiAgentCoordinator) ExecuteSequential(ctx context.Context, agentIDs []string, initialInput string) ([]AgentExecution, error)

ExecuteSequential executes agents sequentially, passing output to the next

func (*MultiAgentCoordinator) GetAgent

func (mac *MultiAgentCoordinator) GetAgent(id string) (*Agent, bool)

GetAgent returns an agent by ID

func (*MultiAgentCoordinator) ListAgents

func (mac *MultiAgentCoordinator) ListAgents() []string

ListAgents returns all agent IDs

func (*MultiAgentCoordinator) RemoveAgent

func (mac *MultiAgentCoordinator) RemoveAgent(id string)

RemoveAgent removes an agent from the coordinator

type MultiAgentManager

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

MultiAgentManager manages multiple agents with routing and deployment capabilities

func NewMultiAgentManager

func NewMultiAgentManager(config *MultiAgentConfig, llmManager *llm.ProviderManager, toolRegistry *tools.ToolRegistry) (*MultiAgentManager, error)

NewMultiAgentManager creates a new multi-agent manager

func (*MultiAgentManager) GetConfig

func (mam *MultiAgentManager) GetConfig() *MultiAgentConfig

GetConfig returns the multi-agent configuration

func (*MultiAgentManager) GetDeploymentState

func (mam *MultiAgentManager) GetDeploymentState() *DeploymentState

GetDeploymentState returns current deployment state

func (*MultiAgentManager) GetMetrics

func (mam *MultiAgentManager) GetMetrics() *MultiAgentMetrics

GetMetrics returns current metrics

func (*MultiAgentManager) GetRouter

func (mam *MultiAgentManager) GetRouter() *mux.Router

GetRouter returns the HTTP router

func (*MultiAgentManager) Start

func (mam *MultiAgentManager) Start(ctx context.Context) error

Start starts the multi-agent manager

func (*MultiAgentManager) Stop

func (mam *MultiAgentManager) Stop(ctx context.Context) error

Stop stops the multi-agent manager

type MultiAgentMetrics

type MultiAgentMetrics struct {
	TotalRequests  int64                    `json:"total_requests"`
	TotalErrors    int64                    `json:"total_errors"`
	AgentMetrics   map[string]*AgentMetrics `json:"agent_metrics"`
	RoutingMetrics *RoutingMetrics          `json:"routing_metrics"`
	LastUpdated    time.Time                `json:"last_updated"`
	// contains filtered or unexported fields
}

MultiAgentMetrics tracks metrics for multi-agent system

type NetworkingConfig

type NetworkingConfig struct {
	Type        string            `json:"type" yaml:"type"` // "ClusterIP", "NodePort", "LoadBalancer"
	Ports       []PortConfig      `json:"ports" yaml:"ports"`
	Ingress     *IngressConfig    `json:"ingress" yaml:"ingress"`
	DNS         *DNSConfig        `json:"dns" yaml:"dns"`
	TLS         *TLSConfig        `json:"tls" yaml:"tls"`
	Proxy       *ProxyConfig      `json:"proxy" yaml:"proxy"`
	Annotations map[string]string `json:"annotations" yaml:"annotations"`
}

NetworkingConfig defines networking configuration

type PortConfig

type PortConfig struct {
	Name       string `json:"name" yaml:"name"`
	Port       int    `json:"port" yaml:"port"`
	TargetPort int    `json:"target_port" yaml:"target_port"`
	Protocol   string `json:"protocol" yaml:"protocol"`
	AgentID    string `json:"agent_id" yaml:"agent_id"`
}

PortConfig defines port configuration

type PropertyDefinition

type PropertyDefinition struct {
	Type        string                         `json:"type" yaml:"type"`
	Description string                         `json:"description" yaml:"description"`
	Properties  map[string]*PropertyDefinition `json:"properties" yaml:"properties"`
	Items       *PropertyDefinition            `json:"items" yaml:"items"`
	Required    []string                       `json:"required" yaml:"required"`
	MinLength   int                            `json:"min_length" yaml:"min_length"`
	MaxLength   int                            `json:"max_length" yaml:"max_length"`
	Minimum     float64                        `json:"minimum" yaml:"minimum"`
	Maximum     float64                        `json:"maximum" yaml:"maximum"`
	Pattern     string                         `json:"pattern" yaml:"pattern"`
	Format      string                         `json:"format" yaml:"format"`
	Enum        []interface{}                  `json:"enum" yaml:"enum"`
	Default     interface{}                    `json:"default" yaml:"default"`
	Example     interface{}                    `json:"example" yaml:"example"`
}

PropertyDefinition defines property definition

type ProxyConfig

type ProxyConfig struct {
	Enabled      bool              `json:"enabled" yaml:"enabled"`
	Type         string            `json:"type" yaml:"type"` // "http", "socks5"
	URL          string            `json:"url" yaml:"url"`
	Headers      map[string]string `json:"headers" yaml:"headers"`
	Timeout      time.Duration     `json:"timeout" yaml:"timeout"`
	Retries      int               `json:"retries" yaml:"retries"`
	MaxIdleConns int               `json:"max_idle_conns" yaml:"max_idle_conns"`
}

ProxyConfig defines proxy configuration

type RateLimit

type RateLimit struct {
	Requests  int           `json:"requests" yaml:"requests"`
	Period    time.Duration `json:"period" yaml:"period"`
	Burst     int           `json:"burst" yaml:"burst"`
	SkipPaths []string      `json:"skip_paths" yaml:"skip_paths"`
}

RateLimit defines rate limit configuration

type RateLimitConfig

type RateLimitConfig struct {
	Enabled    bool                  `json:"enabled" yaml:"enabled"`
	Global     *RateLimit            `json:"global" yaml:"global"`
	PerAgent   map[string]*RateLimit `json:"per_agent" yaml:"per_agent"`
	PerUser    *RateLimit            `json:"per_user" yaml:"per_user"`
	PerIP      *RateLimit            `json:"per_ip" yaml:"per_ip"`
	BurstLimit int                   `json:"burst_limit" yaml:"burst_limit"`
	WindowSize time.Duration         `json:"window_size" yaml:"window_size"`
}

RateLimitConfig defines rate limiting configuration

type ResourceConfig

type ResourceConfig struct {
	CPU      string `json:"cpu" yaml:"cpu"`
	Memory   string `json:"memory" yaml:"memory"`
	Storage  string `json:"storage" yaml:"storage"`
	GPU      string `json:"gpu" yaml:"gpu"`
	Requests *struct {
		CPU     string `json:"cpu" yaml:"cpu"`
		Memory  string `json:"memory" yaml:"memory"`
		Storage string `json:"storage" yaml:"storage"`
	} `json:"requests" yaml:"requests"`
	Limits *struct {
		CPU     string `json:"cpu" yaml:"cpu"`
		Memory  string `json:"memory" yaml:"memory"`
		Storage string `json:"storage" yaml:"storage"`
	} `json:"limits" yaml:"limits"`
}

ResourceConfig defines resource limits and requests

type RoutingCondition

type RoutingCondition struct {
	Type     string `json:"type" yaml:"type"` // "header", "query", "body", "ip"
	Key      string `json:"key" yaml:"key"`
	Value    string `json:"value" yaml:"value"`
	Operator string `json:"operator" yaml:"operator"` // "equals", "contains", "regex", "prefix", "suffix"
}

RoutingCondition defines conditions for routing

type RoutingConfig

type RoutingConfig struct {
	Type         string             `json:"type" yaml:"type"` // "path", "header", "query", "subdomain"
	DefaultAgent string             `json:"default_agent" yaml:"default_agent"`
	Rules        []RoutingRule      `json:"rules" yaml:"rules"`
	Middleware   []MiddlewareConfig `json:"middleware" yaml:"middleware"`
}

RoutingConfig defines how requests are routed to different agents

type RoutingMetrics

type RoutingMetrics struct {
	RoutingDecisions map[string]int64 `json:"routing_decisions"`
	DefaultRoutes    int64            `json:"default_routes"`
	FailedRoutes     int64            `json:"failed_routes"`
}

RoutingMetrics tracks routing statistics

type RoutingRule

type RoutingRule struct {
	ID         string                 `json:"id" yaml:"id"`
	Pattern    string                 `json:"pattern" yaml:"pattern"`
	AgentID    string                 `json:"agent_id" yaml:"agent_id"`
	Method     string                 `json:"method" yaml:"method"`
	Priority   int                    `json:"priority" yaml:"priority"`
	Conditions []RoutingCondition     `json:"conditions" yaml:"conditions"`
	Metadata   map[string]interface{} `json:"metadata" yaml:"metadata"`
}

RoutingRule defines a routing rule

type SMTPConfig

type SMTPConfig struct {
	Host     string `json:"host" yaml:"host"`
	Port     int    `json:"port" yaml:"port"`
	Username string `json:"username" yaml:"username"`
	Password string `json:"password" yaml:"password"`
	TLS      bool   `json:"tls" yaml:"tls"`
}

SMTPConfig defines SMTP configuration

type ScalingConfig

type ScalingConfig struct {
	Enabled             bool                 `json:"enabled" yaml:"enabled"`
	MinReplicas         int                  `json:"min_replicas" yaml:"min_replicas"`
	MaxReplicas         int                  `json:"max_replicas" yaml:"max_replicas"`
	TargetCPUPercent    int                  `json:"target_cpu_percent" yaml:"target_cpu_percent"`
	TargetMemoryPercent int                  `json:"target_memory_percent" yaml:"target_memory_percent"`
	ScaleUpCooldown     time.Duration        `json:"scale_up_cooldown" yaml:"scale_up_cooldown"`
	ScaleDownCooldown   time.Duration        `json:"scale_down_cooldown" yaml:"scale_down_cooldown"`
	CustomMetrics       []CustomMetricConfig `json:"custom_metrics" yaml:"custom_metrics"`
}

ScalingConfig defines scaling configuration

type SchemaConfig

type SchemaConfig struct {
	Input  *SchemaDefinition `json:"input" yaml:"input"`
	Output *SchemaDefinition `json:"output" yaml:"output"`
}

SchemaConfig defines input/output schema validation

type SchemaDefinition

type SchemaDefinition struct {
	Type       string                         `json:"type" yaml:"type"`
	Properties map[string]*PropertyDefinition `json:"properties" yaml:"properties"`
	Required   []string                       `json:"required" yaml:"required"`
	MinLength  int                            `json:"min_length" yaml:"min_length"`
	MaxLength  int                            `json:"max_length" yaml:"max_length"`
	Pattern    string                         `json:"pattern" yaml:"pattern"`
	Format     string                         `json:"format" yaml:"format"`
	Enum       []interface{}                  `json:"enum" yaml:"enum"`
	Example    interface{}                    `json:"example" yaml:"example"`
}

SchemaDefinition defines schema definition

type SecurityConfig

type SecurityConfig struct {
	Authentication *AuthConfig       `json:"authentication" yaml:"authentication"`
	Authorization  *AuthzConfig      `json:"authorization" yaml:"authorization"`
	Encryption     *EncryptionConfig `json:"encryption" yaml:"encryption"`
	RateLimit      *RateLimitConfig  `json:"rate_limit" yaml:"rate_limit"`
	CORS           *CORSConfig       `json:"cors" yaml:"cors"`
	Headers        map[string]string `json:"headers" yaml:"headers"`
}

SecurityConfig defines security configuration

type SharedConfig

type SharedConfig struct {
	Database     *DatabaseConfig               `json:"database" yaml:"database"`
	Cache        *CacheConfig                  `json:"cache" yaml:"cache"`
	Logging      *LoggingConfig                `json:"logging" yaml:"logging"`
	Monitoring   *MonitoringConfig             `json:"monitoring" yaml:"monitoring"`
	Security     *SecurityConfig               `json:"security" yaml:"security"`
	Environment  map[string]string             `json:"environment" yaml:"environment"`
	Secrets      map[string]string             `json:"secrets" yaml:"secrets"`
	LLMProviders map[string]*LLMProviderConfig `json:"llm_providers" yaml:"llm_providers"`
}

SharedConfig defines shared configuration for all agents

type SlackConfig

type SlackConfig struct {
	WebhookURL string `json:"webhook_url" yaml:"webhook_url"`
	Channel    string `json:"channel" yaml:"channel"`
	Username   string `json:"username" yaml:"username"`
	IconEmoji  string `json:"icon_emoji" yaml:"icon_emoji"`
}

SlackConfig defines Slack configuration

type StateChange

type StateChange struct {
	NodeID    string                 `json:"node_id"`
	NodeName  string                 `json:"node_name"`
	Timestamp time.Time              `json:"timestamp"`
	Before    map[string]interface{} `json:"before,omitempty"`
	After     map[string]interface{} `json:"after,omitempty"`
	Duration  time.Duration          `json:"duration"`
}

StateChange represents a change in agent state during execution

type TLSConfig

type TLSConfig struct {
	Enabled            bool   `json:"enabled" yaml:"enabled"`
	CertFile           string `json:"cert_file" yaml:"cert_file"`
	KeyFile            string `json:"key_file" yaml:"key_file"`
	CAFile             string `json:"ca_file" yaml:"ca_file"`
	InsecureSkipVerify bool   `json:"insecure_skip_verify" yaml:"insecure_skip_verify"`
}

TLSConfig defines TLS configuration

type TracingConfig

type TracingConfig struct {
	Enabled     bool    `json:"enabled" yaml:"enabled"`
	Endpoint    string  `json:"endpoint" yaml:"endpoint"`
	ServiceName string  `json:"service_name" yaml:"service_name"`
	SampleRate  float64 `json:"sample_rate" yaml:"sample_rate"`
}

TracingConfig defines tracing configuration

type VolumeConfig

type VolumeConfig struct {
	Name      string `json:"name" yaml:"name"`
	Type      string `json:"type" yaml:"type"` // "configmap", "secret", "emptydir", "persistentvolume"
	Source    string `json:"source" yaml:"source"`
	MountPath string `json:"mount_path" yaml:"mount_path"`
	ReadOnly  bool   `json:"read_only" yaml:"read_only"`
	AgentID   string `json:"agent_id" yaml:"agent_id"`
}

VolumeConfig defines volume configuration

type WebhookConfig

type WebhookConfig struct {
	URL     string            `json:"url" yaml:"url"`
	Method  string            `json:"method" yaml:"method"`
	Headers map[string]string `json:"headers" yaml:"headers"`
	Timeout time.Duration     `json:"timeout" yaml:"timeout"`
}

WebhookConfig defines webhook configuration

Jump to

Keyboard shortcuts

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