agent

package
v1.380.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIdFromServerNameAndToolName added in v1.374.0

func GetIdFromServerNameAndToolName(ServerName, toolName string) string

func GetMCPClientMap added in v1.374.0

func GetMCPClientMap(config string, toolsMap map[string]bool) (map[string]*client.Client, error)

func GetServerNameAndToolNameFromId added in v1.374.0

func GetServerNameAndToolNameFromId(id string) (string, string)

Types

type AgentClients added in v1.374.0

type AgentClients struct {
	Clients map[string]*client.Client
	Tools   []*protocol.Tool
}

type AgentProvider added in v1.374.0

type AgentProvider interface {
	GetAgentClients() (*AgentClients, error)
}

func GetAgentProvider added in v1.374.0

func GetAgentProvider(typ string, subType string, text string, mcpTools []*McpTools) (AgentProvider, error)

type McpAgentProvider added in v1.374.0

type McpAgentProvider struct {
	Typ        string
	SubType    string
	McpServers string
	McpTools   []*McpTools
}

func NewMcpAgentProvider added in v1.374.0

func NewMcpAgentProvider(typ string, subType string, mcpServers string, mcpTools []*McpTools) (*McpAgentProvider, error)

func (*McpAgentProvider) GetAgentClients added in v1.374.0

func (p *McpAgentProvider) GetAgentClients() (*AgentClients, error)

type McpTools

type McpTools struct {
	ServerName string `json:"serverName"`
	Tools      string `json:"tools"`
	IsEnabled  bool   `json:"isEnabled"`
}

func GetToolsList

func GetToolsList(config string) ([]*McpTools, error)

type ServerConfig

type ServerConfig struct {
	// Stdio config
	Command string            `json:"command"`
	Args    []string          `json:"args"`
	Env     map[string]string `json:"env"`

	// SSE config
	URL string `json:"url"`
}

Jump to

Keyboard shortcuts

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