Documentation
¶
Index ¶
- type AgentManager
- type AutoServer
- func (as *AutoServer) GenerateEndpoints() error
- func (as *AutoServer) LoadAgentsFromConfig(configPath string) error
- func (as *AutoServer) LoadAgentsFromDirectory(directory string) error
- func (as *AutoServer) RegisterAgent(id string, definition agent.AgentDefinition) error
- func (as *AutoServer) Start(ctx context.Context) error
- type AutoServerConfig
- type Server
- func (s *Server) SetAgentManager(manager *AgentManager)
- func (s *Server) SetLLMManager(manager *llm.ProviderManager)
- func (s *Server) SetSessionManager(manager *persistence.SessionManager)
- func (s *Server) SetToolRegistry(registry *tools.ToolRegistry)
- func (s *Server) Start() error
- func (s *Server) Stop(ctx context.Context) error
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentManager ¶
type AgentManager struct {
// contains filtered or unexported fields
}
AgentManager manages multiple agents
func NewAgentManager ¶
func NewAgentManager(llmManager *llm.ProviderManager, toolRegistry *tools.ToolRegistry) *AgentManager
NewAgentManager creates a new agent manager
func (*AgentManager) CreateAgent ¶
func (am *AgentManager) CreateAgent(config *agent.AgentConfig) (*agent.Agent, error)
CreateAgent creates a new agent
func (*AgentManager) DeleteAgent ¶
func (am *AgentManager) DeleteAgent(id string)
DeleteAgent removes an agent
func (*AgentManager) GetAgent ¶
func (am *AgentManager) GetAgent(id string) (*agent.Agent, bool)
GetAgent retrieves an agent by ID
func (*AgentManager) ListAgents ¶
func (am *AgentManager) ListAgents() []string
ListAgents returns all agent IDs
type AutoServer ¶
type AutoServer struct {
// contains filtered or unexported fields
}
AutoServer automatically generates REST endpoints for agents
func NewAutoServer ¶
func NewAutoServer(config *AutoServerConfig) *AutoServer
NewAutoServer creates a new auto-server instance
func (*AutoServer) GenerateEndpoints ¶
func (as *AutoServer) GenerateEndpoints() error
GenerateEndpoints automatically generates REST endpoints for all registered agents
func (*AutoServer) LoadAgentsFromConfig ¶
func (as *AutoServer) LoadAgentsFromConfig(configPath string) error
LoadAgentsFromConfig loads agents from a multi-agent config file
func (*AutoServer) LoadAgentsFromDirectory ¶
func (as *AutoServer) LoadAgentsFromDirectory(directory string) error
LoadAgentsFromDirectory loads agent definitions from a directory
func (*AutoServer) RegisterAgent ¶
func (as *AutoServer) RegisterAgent(id string, definition agent.AgentDefinition) error
RegisterAgent registers a single agent programmatically
type AutoServerConfig ¶
type AutoServerConfig struct {
Host string `yaml:"host" json:"host"`
Port int `yaml:"port" json:"port"`
BasePath string `yaml:"base_path" json:"base_path"`
EnableWebUI bool `yaml:"enable_web_ui" json:"enable_web_ui"`
EnablePlayground bool `yaml:"enable_playground" json:"enable_playground"`
EnableSchemaAPI bool `yaml:"enable_schema_api" json:"enable_schema_api"`
EnableMetricsAPI bool `yaml:"enable_metrics_api" json:"enable_metrics_api"`
EnableCORS bool `yaml:"enable_cors" json:"enable_cors"`
SchemaValidation bool `yaml:"schema_validation" json:"schema_validation"`
OllamaEndpoint string `yaml:"ollama_endpoint" json:"ollama_endpoint"`
LLMProviders map[string]interface{} `yaml:"llm_providers" json:"llm_providers"`
ServerTimeout time.Duration `yaml:"server_timeout" json:"server_timeout"`
MaxRequestSize int64 `yaml:"max_request_size" json:"max_request_size"`
Middleware []string `yaml:"middleware" json:"middleware"`
}
AutoServerConfig configures the auto-generated server
func DefaultAutoServerConfig ¶
func DefaultAutoServerConfig() *AutoServerConfig
DefaultAutoServerConfig returns default configuration
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the HTTP server
func (*Server) SetAgentManager ¶
func (s *Server) SetAgentManager(manager *AgentManager)
SetAgentManager sets the agent manager
func (*Server) SetLLMManager ¶
func (s *Server) SetLLMManager(manager *llm.ProviderManager)
SetLLMManager sets the LLM provider manager
func (*Server) SetSessionManager ¶
func (s *Server) SetSessionManager(manager *persistence.SessionManager)
SetSessionManager sets the session manager
func (*Server) SetToolRegistry ¶
func (s *Server) SetToolRegistry(registry *tools.ToolRegistry)
SetToolRegistry sets the tool registry
type ServerConfig ¶
type ServerConfig struct {
Host string `json:"host"`
Port int `json:"port"`
ReadTimeout time.Duration `json:"read_timeout"`
WriteTimeout time.Duration `json:"write_timeout"`
MaxHeaderBytes int `json:"max_header_bytes"`
EnableCORS bool `json:"enable_cors"`
StaticDir string `json:"static_dir"`
DevMode bool `json:"dev_mode"`
LogLevel string `json:"log_level"`
}
ServerConfig represents server configuration
func DefaultServerConfig ¶
func DefaultServerConfig() *ServerConfig
DefaultServerConfig returns default server configuration