agent

package
v1.833.347 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIdFromServerNameAndToolName

func GetIdFromServerNameAndToolName(ServerName, toolName string) string

func GetMCPClientMap

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

func GetServerNameAndToolNameFromId

func GetServerNameAndToolNameFromId(id string) (string, string)

Types

type AgentClients

type AgentClients struct {
	Clients          map[string]*client.Client
	Tools            []*protocol.Tool
	BuiltinToolReg   *builtin_tool.ToolRegistry
	WebSearchEnabled bool
}

func MergeBuiltinAndWebSearchTools

func MergeBuiltinAndWebSearchTools(agentClients *AgentClients, selectedTools []string, webSearchEnabled bool) *AgentClients

type AgentProvider

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

func GetAgentProvider

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

type McpAgentProvider

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

func NewMcpAgentProvider

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

func (*McpAgentProvider) GetAgentClients

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 McpToolsList

type McpToolsList []*McpTools

McpToolsList is a typed alias for []*McpTools that implements sql.Scanner + driver.Valuer. Use it in DB-mapped structs.

func (*McpToolsList) Scan

func (l *McpToolsList) Scan(src any) error

Scan implements sql.Scanner for the slice. Accepts string, []byte, or nil.

func (McpToolsList) Value

func (l McpToolsList) Value() (driver.Value, error)

Value implements driver.Valuer. Returns JSON string (empty list as `[]`).

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"`

	// Transport type: "sse", "stdio", "streamablehttp"
	// If not specified, auto-detected based on URL field:
	// - URL not empty -> SSE
	// - URL empty -> Stdio
	Type string `json:"type,omitempty"`
}

Directories

Path Synopsis
web
Package webtools gives every Responses-API agent the three capabilities the platform already serves and no agent could reach: web search, page fetch, and deep research.
Package webtools gives every Responses-API agent the three capabilities the platform already serves and no agent could reach: web search, page fetch, and deep research.

Jump to

Keyboard shortcuts

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